Alchemy
Loading...
Searching...
No Matches

update.h File Reference

Go to the source code of this file.

Enumerations

enum  ArrivalAxis { ARRIVAL_AXIS_NONE = 0 , ARRIVAL_AXIS_X = 16 , ARRIVAL_AXIS_Y = 17 , ARRIVAL_AXIS_Z = 18 }
 The axis a moving object watches to know it has arrived at its target: the one along which it has the furthest to go. More...

Functions

void Object_UpdateAll (void)
 Advances the eight script-driven objects by one frame.

Enumeration Type Documentation

◆ ArrivalAxis

The axis a moving object watches to know it has arrived at its target: the one along which it has the furthest to go.

Enumerator
ARRIVAL_AXIS_NONE 

no arrival test; set again once it arrives

ARRIVAL_AXIS_X 
ARRIVAL_AXIS_Y 
ARRIVAL_AXIS_Z 

Definition at line 8 of file update.h.

Function Documentation

◆ Object_UpdateAll()

void Object_UpdateAll ( void )

Advances the eight script-driven objects by one frame.

For each live one: run its hook, then its script (unless it waits or is paused); steer it towards its target, or brake it when it has none; apply gravity and bounce off the ground; detect arrival at the target; and turn it to face the way it moves. Copied to RAM and run from there. Writes each object's position, velocity and facing, and unsets its target on arrival. Only Object_RunUpdateAllFromHeap copies and runs it, and nothing calls that; the field runs Object_UpdateAllThumb instead.

Definition at line 36 of file update.c.

Referenced by Object_RunUpdateAllFromHeap(), and Object_UpdateAll().