Go to the source code of this file.
Macros | |
| #define | OBJECT_SLOTS 8 |
| script-driven objects updated each frame | |
| #define | TARGET_UNSET ((s32)0x80000000) |
| no movement target | |
| #define | TURN_MAX 0x1000 |
| the most an object turns in one frame | |
| #define | IWRAM_ENTRY(type, offset) |
| Calls a resident IWRAM routine at its absolute address, which this code still reaches when it runs from its copy in RAM. | |
| #define | IwramSqrt IWRAM_ENTRY(s32 (*)(s32 value), Iwram_SqrtOffset) |
| #define | IwramRatioMulQ14 IWRAM_ENTRY(s32 (*)(s32 divisor, s32 value), Iwram_RatioMulQ14Offset) |
Functions | |
| s32 | ArcTan2FarArm (s32 z, s32 x) |
| s32 | IwramSqrtFarArm (s32 value) |
| s32 | IwramRatioMulQ14FarArm (s32 divisor, s32 value) |
| void | Object_UpdateAll (void) |
| Advances the eight script-driven objects by one frame. | |
Variables | |
| struct ScriptMotionObject * | gObjectSlots |
| #define OBJECT_SLOTS 8 |
script-driven objects updated each frame
Definition at line 10 of file update.c.
Referenced by Object_UpdateAll().
| #define TURN_MAX 0x1000 |
the most an object turns in one frame
Definition at line 12 of file update.c.
Referenced by Object_UpdateAll().
| #define IWRAM_ENTRY | ( | type, | |
| offset ) |
Calls a resident IWRAM routine at its absolute address, which this code still reaches when it runs from its copy in RAM.
| #define IwramSqrt IWRAM_ENTRY(s32 (*)(s32 value), Iwram_SqrtOffset) |
Definition at line 17 of file update.c.
Referenced by Object_ApproachLinkedObject(), and Object_UpdateAll().
| #define IwramRatioMulQ14 IWRAM_ENTRY(s32 (*)(s32 divisor, s32 value), Iwram_RatioMulQ14Offset) |
Definition at line 18 of file update.c.
Referenced by Object_UpdateAll().
Referenced by ArcTan2FarArm(), and Object_UpdateAll().
Referenced by IwramSqrtFarArm(), and Object_UpdateAll().
Referenced by IwramRatioMulQ14FarArm(), and 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().
|
extern |
Referenced by FieldObject_UpdatePlayerControl(), Object_FindNearestFacingTarget(), Object_UpdateAll(), Object_UpdateAllMotion(), Object_UpdateAllThumb(), ObjectDispatch_ApplyValueToKind200Children(), ObjectDispatch_FindFreeObject(), ObjectSystem_UpdateCamera(), ObjectSystem_UpdateCameraFixed(), ScriptObject_CheckOverlap(), and ScriptObject_FindOverlappingEntry().