Game object data structure. More...
#include <object.h>
Public Attributes | |
| u16 | action |
| u8 | count |
| u8 | dir |
| u16 | height |
| u8 | hitpoints |
| u16 | next |
| u8 | nID |
| u8 | objnotused [7] |
| u8 | onscreen |
| u16 | parentID |
| u16 | prev |
| u16 | sprblk3216 |
| u8 | sprflip |
| u16 | sprframe |
| u16 | sprid3216 |
| u16 | sprnum |
| u8 | sprpal |
| u8 | sprrefresh |
| u8 | status |
| u8 | tempo |
| u16 | tileabove |
| u16 | tilebprop |
| u16 | tilesprop |
| u16 | tilestand |
| u8 | type |
| u16 | width |
| u16 | xmax |
| u16 | xmin |
| u16 | xofs |
| u8 | xpos [3] |
| s16 | xvel |
| u16 | yofs |
| u8 | ypos [3] |
| s16 | yvel |
Game object data structure.
Each object is 64 bytes. Fields are accessed through the objWorkspace variable during C callbacks.
| u16 t_objs::action |
46: Current action (ACT_STAND, ACT_WALK, etc.)
| u8 t_objs::count |
50: General-purpose counter
| u8 t_objs::dir |
51: Direction (game-defined)
| u16 t_objs::height |
28: Collision box height
| u8 t_objs::hitpoints |
54: Hit points
| u16 t_objs::next |
2: Next object in linked list
| u8 t_objs::nID |
5: Unique ID in linked list
| u8 t_objs::objnotused[7] |
57-63: Reserved for future use
| u8 t_objs::onscreen |
56: 1 if object is visible on screen
| u16 t_objs::parentID |
52: Parent object ID (for projectiles)
| u16 t_objs::prev |
0: Previous object in linked list
| u16 t_objs::sprblk3216 |
10: Sprite OAM VRAM block address
| u8 t_objs::sprflip |
12: Sprite flip attribute
| u16 t_objs::sprframe |
14: Current animation frame
| u16 t_objs::sprid3216 |
8: Sprite OAM id in sprite memory
| u16 t_objs::sprnum |
6: Sprite OAM number (multiple of 4)
| u8 t_objs::sprpal |
13: Sprite palette
| u8 t_objs::sprrefresh |
55: Set to 1 to refresh sprite
| u8 t_objs::status |
48: Collision status
| u8 t_objs::tempo |
49: Object tempo counter
| u16 t_objs::tileabove |
40: Tile above (from collision)
| u16 t_objs::tilebprop |
44: Tile property on left/right side
| u16 t_objs::tilesprop |
42: Tile property standing on
| u16 t_objs::tilestand |
38: Tile standing on (from collision)
| u8 t_objs::type |
4: Object type (game-defined)
| u16 t_objs::width |
26: Collision box width
| u16 t_objs::xmax |
32: Maximum X boundary
| u16 t_objs::xmin |
30: Minimum X boundary
| u16 t_objs::xofs |
22: X offset from collision box origin
| u8 t_objs::xpos[3] |
16: X position (24-bit fixed point)
| s16 t_objs::xvel |
34: X velocity (fixed point)
| u16 t_objs::yofs |
24: Y offset from collision box origin
| u8 t_objs::ypos[3] |
19: Y position (24-bit fixed point)
| s16 t_objs::yvel |
36: Y velocity (fixed point)