Loading...
Searching...
No Matches
t_objs Struct Reference

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
 

Detailed Description

Game object data structure.

Each object is 64 bytes. Fields are accessed through the objWorkspace variable during C callbacks.

Member Data Documentation

◆ action

u16 t_objs::action

46: Current action (ACT_STAND, ACT_WALK, etc.)

◆ count

u8 t_objs::count

50: General-purpose counter

◆ dir

u8 t_objs::dir

51: Direction (game-defined)

◆ height

u16 t_objs::height

28: Collision box height

◆ hitpoints

u8 t_objs::hitpoints

54: Hit points

◆ next

u16 t_objs::next

2: Next object in linked list

◆ nID

u8 t_objs::nID

5: Unique ID in linked list

◆ objnotused

u8 t_objs::objnotused[7]

57-63: Reserved for future use

◆ onscreen

u8 t_objs::onscreen

56: 1 if object is visible on screen

◆ parentID

u16 t_objs::parentID

52: Parent object ID (for projectiles)

◆ prev

u16 t_objs::prev

0: Previous object in linked list

◆ sprblk3216

u16 t_objs::sprblk3216

10: Sprite OAM VRAM block address

◆ sprflip

u8 t_objs::sprflip

12: Sprite flip attribute

◆ sprframe

u16 t_objs::sprframe

14: Current animation frame

◆ sprid3216

u16 t_objs::sprid3216

8: Sprite OAM id in sprite memory

◆ sprnum

u16 t_objs::sprnum

6: Sprite OAM number (multiple of 4)

◆ sprpal

u8 t_objs::sprpal

13: Sprite palette

◆ sprrefresh

u8 t_objs::sprrefresh

55: Set to 1 to refresh sprite

◆ status

u8 t_objs::status

48: Collision status

◆ tempo

u8 t_objs::tempo

49: Object tempo counter

◆ tileabove

u16 t_objs::tileabove

40: Tile above (from collision)

◆ tilebprop

u16 t_objs::tilebprop

44: Tile property on left/right side

◆ tilesprop

u16 t_objs::tilesprop

42: Tile property standing on

◆ tilestand

u16 t_objs::tilestand

38: Tile standing on (from collision)

◆ type

u8 t_objs::type

4: Object type (game-defined)

◆ width

u16 t_objs::width

26: Collision box width

◆ xmax

u16 t_objs::xmax

32: Maximum X boundary

◆ xmin

u16 t_objs::xmin

30: Minimum X boundary

◆ xofs

u16 t_objs::xofs

22: X offset from collision box origin

◆ xpos

u8 t_objs::xpos[3]

16: X position (24-bit fixed point)

◆ xvel

s16 t_objs::xvel

34: X velocity (fixed point)

◆ yofs

u16 t_objs::yofs

24: Y offset from collision box origin

◆ ypos

u8 t_objs::ypos[3]

19: Y position (24-bit fixed point)

◆ yvel

s16 t_objs::yvel

36: Y velocity (fixed point)


The documentation for this struct was generated from the following file: