Jump to content

Actor: Difference between revisions

no edit summary
No edit summary
 
Line 58: Line 58:
* <code>Actor* Actor_Create(u8 priority, uint size)</code>: malloc()s an actor and adds to g_ActorLists.
* <code>Actor* Actor_Create(u8 priority, uint size)</code>: malloc()s an actor and adds to g_ActorLists.
* <code>void Actor_SetCallbacks(Actor* actor, FrameCallback onFrame, DestroyCallback onDestroy)</code>: Just sets the onFrame/onDestroy fields
* <code>void Actor_SetCallbacks(Actor* actor, FrameCallback onFrame, DestroyCallback onDestroy)</code>: Just sets the onFrame/onDestroy fields
* <code>void Actor_Destroy(Actor* actor)</code>: Schedules an actor for deletion during the next frame (sets actor->flags |= 1). The next Actor_RunAll() will call the onDestroy callback, and then call Actor_Uninstall() followed by free().
* <code>void Actor_Install(Actor* actor)</code>: Adds an actor to g_ActorLists (automatically called by Actor_Create).
* <code>void Actor_Install(Actor* actor)</code>: Adds an actor to g_ActorLists (automatically called by Actor_Create).
* <code>void Actor_Uninstall(Actor* actor)</code>: Removes an actor from g_ActorLists (automatically called by Actor_RunAll).
* <code>void Actor_Uninstall(Actor* actor)</code>: Removes an actor from g_ActorLists (automatically called by Actor_RunAll).