Skip to content

Commit

Permalink
fix(doc): add default object functions definition
Browse files Browse the repository at this point in the history
  • Loading branch information
alekmaul committed Feb 15, 2024
1 parent b7fa9f9 commit 9d5f157
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pvsneslib/include/snes/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ void objInitGravity(u16 objgravity, u16 objfriction);
\param initfct The address of the function when we init the type of object
\param updfct The address of the function when we update the type of object (need to be called once per frame)
\param reffct The address of the function when we refresh sprites of object (need to be called once per frame)
init function must have 5 unsigned short (u16) parameters: xp, yp, type, minx, maxx
where
- xp,yp are default coordinates values for x and y
- type is the type oobjects
- minx, miny and minimal and maximal values for objects in x axis
update function must have 1 parameter:idx
where
- idx is the id of the object in the object list
refresh function must have 1 parameter:idx
where
- idx is the id of the object in the object list
*/
void objInitFunctions(u8 objtype, void *initfct, void *updfct, void *reffct);

Expand Down

0 comments on commit 9d5f157

Please sign in to comment.