PVSnesLib  4.3.0
Documentation to code in C or ASM for the Nintendo SNES
t_objs Struct Reference

object definition (64 bytes) More...

#include <object.h>

Data Fields

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

object definition (64 bytes)

Examples
games/likemario/LikeMario.c, and objects/moveobjects/moveobjects.c.

Field Documentation

◆ action

u16 t_objs::action

46 current action of the object, depends of game

Examples
games/likemario/LikeMario.c.

◆ count

u8 t_objs::count

50 if object needs a counter

◆ dir

u8 t_objs::dir

51 if object needs to manage direction

◆ height

u16 t_objs::height

28 height of the object (from the square 16x16 or 32x32)

Examples
games/likemario/LikeMario.c.

◆ hitpoints

u8 t_objs::hitpoints

54 number of hit points of object

◆ next

u16 t_objs::next

2 next object in linked list

◆ nID

u8 t_objs::nID

5 obj ID in linked list

◆ objnotused

u8 t_objs::objnotused[7]

OB_SIZE-55-1 for future use

◆ onscreen

u8 t_objs::onscreen

56 to know if object is on screen or not

◆ parentID

u16 t_objs::parentID

52 obj ID of parent (useful for projectiles)

◆ prev

u16 t_objs::prev

0 previous object linked list

◆ sprblk3216

u16 t_objs::sprblk3216

10 sprite oam address in sprites tiles memory

◆ sprflip

u8 t_objs::sprflip

12 sprite flip attribute

◆ sprframe

u16 t_objs::sprframe

14 current frame

◆ sprid3216

u16 t_objs::sprid3216

8 sprite oam id in sprite oam memory

◆ sprnum

u16 t_objs::sprnum

6 sprite oam number of the object (multiple of 4)

Examples
objects/moveobjects/moveobjects.c.

◆ sprpal

u8 t_objs::sprpal

13 sprite palette

◆ sprrefresh

u8 t_objs::sprrefresh

55 if object needs sprite to be refresh

◆ status

u8 t_objs::status

48 status of object regarding collision

◆ tempo

u8 t_objs::tempo

49 if object needs tempo

◆ tileabove

u16 t_objs::tileabove

40 tile number above object

◆ tilebprop

u16 t_objs::tilebprop

44 tile property on left/right side

◆ tilesprop

u16 t_objs::tilesprop

42 tile property stand on

◆ tilestand

u16 t_objs::tilestand

38 tile number object is standing on

Examples
games/likemario/LikeMario.c.

◆ type

u8 t_objs::type

4 type of object, depend of the game

◆ width

u16 t_objs::width

26 width of the object (from the square 16x16 or 32x32)

Examples
games/likemario/LikeMario.c.

◆ xmax

u16 t_objs::xmax

32 max x coordinate for action of object, depends of game (ex: revert direction)

◆ xmin

u16 t_objs::xmin

30 min x coordinate for action of object, depends of game (ex: revert direction)

◆ xofs

u16 t_objs::xofs

22 x offset of the object (from the square 16x16 or 32x32)

◆ xpos

u8 t_objs::xpos[3]

16 x position on the screen (3 fixed point)

Examples
games/likemario/LikeMario.c, and objects/moveobjects/moveobjects.c.

◆ xvel

s16 t_objs::xvel

34 x velocity

Examples
games/likemario/LikeMario.c.

◆ yofs

u16 t_objs::yofs

24 y offset of the object (from the square 16x16 or 32x32)

◆ ypos

u8 t_objs::ypos[3]

19 y position on the screen (3 fixed point)

Examples
games/likemario/LikeMario.c, and objects/moveobjects/moveobjects.c.

◆ yvel

s16 t_objs::yvel

36 y velocity

Examples
games/likemario/LikeMario.c.

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