Skip to Content
The Alchemy Project

src/field/actor_update_arm.c

Unused: an ARM copy of the actors' update, made to run from RAM. More…

Macros

NameDescription
#defineACTOR_SLOTS 8script-driven actors updated each tick
#defineTURN_MAX (TRIG_TURN / 16)the most an actor turns in one tick
#defineIWRAM_ENTRY (type, offset) ((type)(syIWRAMIRQMain + (offset)))Calls a resident IWRAM function at its absolute address, which this code still reaches when it runs from its copy in RAM.
#definesyIWRAMSquart IWRAM_ENTRY(Sint32 (*)(Sint32 value), sySquartOffset)
#definesyIWRAMDivFX

Functions

NameDescription
ANGLEfdTrigAtanStubArm (FIXED z, FIXED x)stub copied to RAM together with this code (actor_update_far.s).
Sint32fdMathSqrtStubArm (Sint32 value)
Sint32fdFixedDivStubArm (Sint32 divisor, Sint32 value)
voidfdActorUpdateAll (void)Advances the eight script-driven actors by one tick.

Description

Unused: an ARM copy of the actors' update, made to run from RAM. Nothing runs it; the field engine moves its actors with fdActorUpdateAllOnField.

Macros in detail

ACTOR_SLOTS

#define ACTOR_SLOTS 8

script-driven actors updated each tick

Referenced by fdActorUpdateAll().

Definition at line 12 of file actor_update_arm.c.

TURN_MAX

#define TURN_MAX (TRIG_TURN / 16)

the most an actor turns in one tick

Referenced by fdActorUpdateAll().

Definition at line 13 of file actor_update_arm.c.

IWRAM_ENTRY

#define IWRAM_ENTRY(type, offset) ((type)(syIWRAMIRQMain + (offset)))

Calls a resident IWRAM function at its absolute address, which this code still reaches when it runs from its copy in RAM.

Definition at line 17 of file actor_update_arm.c.

syIWRAMSquart

#define syIWRAMSquart IWRAM_ENTRY(Sint32 (*)(Sint32 value), sySquartOffset)

Referenced by fdActorUpdateAll().

Definition at line 18 of file actor_update_arm.c.

syIWRAMDivFX

#define syIWRAMDivFX

Referenced by fdActorUpdateAll().

Definition at line 19 of file actor_update_arm.c.

Functions in detail

fdTrigAtanStubArm

ANGLE fdTrigAtanStubArm(FIXED z, FIXED x)

stub copied to RAM together with this code (actor_update_far.s).

Referenced by fdActorUpdateAll().

Definition at line 23 of file actor_update_arm.c.

fdMathSqrtStubArm

Sint32 fdMathSqrtStubArm(Sint32 value)

Referenced by fdActorUpdateAll().

Definition at line 24 of file actor_update_arm.c.

fdFixedDivStubArm

Sint32 fdFixedDivStubArm(Sint32 divisor, Sint32 value)

Referenced by fdActorUpdateAll().

Definition at line 25 of file actor_update_arm.c.

fdActorUpdateAll

void fdActorUpdateAll(void)

Advances the eight script-driven actors by one tick.

References ActorScriptCommandTable, fdFixedDivStubArm(), fdMathSqrtStubArm(), fdTrigAtanStubArm(), Sint32 and syMulFXArm().

Referenced by fdActorRunUpdateAllFromHeap().

Definition at line 28 of file actor_update_arm.c.