src/field/script_commands_cloak.c
Cloak: the leader blinks into a dark outline and stays hidden while it walks on metatiles that allow it (METATILE_BEHAVIOR_CLOAK). More…
Included by script_commands.c.
Functions
| Name | Description | |
|---|---|---|
void | fdPsynergyCheckCloakTile (void) | Event of Cloak: when the metatile under the leader is not METATILE_BEHAVIOR_CLOAK, requests CLOAK_END. |
void | fdPsynergyEndCloak (void) | Ends Cloak: stops the metatile check and makes the leader blink back into sight, clearing cloaked. |
void | fdPsynergyResumeCloakCheck (void) | Starts the Cloak metatile check if the leader is hidden. |
void | fdPsynergyStartCloak (void) | The leader blinks 10 times and hides (cloaked set), and the metatile check starts; where the leader cannot hide it shows again at once. |
Description
Cloak: the leader blinks into a dark outline and stays hidden while it walks
on metatiles that allow it (METATILE_BEHAVIOR_CLOAK). Part of
script_commands.c.
Functions in detail
fdPsynergyCheckCloakTile
void fdPsynergyCheckCloakTile(void)
Event of Cloak: when the metatile under the leader is not
METATILE_BEHAVIOR_CLOAK, requests CLOAK_END. The behavior is byte 2 of a
metatile (MAP_GRID_METATILE.behavior), or of a 4-byte MetatileTiles entry on
the World Map.
References fdActorLookup(), MainRoutineStateWork, MapGridMetatileBuffer, MetatileTiles and state.
Referenced by fdPsynergyEndCloak(), fdPsynergyResumeCloakCheck() and fdPsynergyStartCloak().
Definition at line 11 of file script_commands_cloak.c.
fdPsynergyEndCloak
void fdPsynergyEndCloak(void)
Ends Cloak: stops the metatile check and makes the leader blink back into sight, clearing cloaked.
References fdActorLookup(), fdActorSelectAnimationStub(), fdPsynergyCheckCloakTile(), MainRoutineStateWork, syCloseEvent(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyRunEnd() and fdPsynergyStartCloak().
Definition at line 67 of file script_commands_cloak.c.
fdPsynergyResumeCloakCheck
void fdPsynergyResumeCloakCheck(void)
Starts the Cloak metatile check if the leader is hidden. fdEngineRun calls it
as a scene loads, since MainRoutineStateWork.cloaked outlives the scene.
References fdPsynergyCheckCloakTile(), MainRoutineStateWork and sySetEvent().
Referenced by fdEngineRun().
Definition at line 111 of file script_commands_cloak.c.
fdPsynergyStartCloak
void fdPsynergyStartCloak(void)
The leader blinks 10 times and hides (cloaked set), and the metatile check starts; where the leader cannot hide it shows again at once.
References fdActorLookup(), fdActorSelectAnimationStub(), fdPsynergyCheckCloakTile(), fdPsynergyEndCloak(), MainRoutineStateWork, state, sySetEvent(), sySoundPlayStub() and sySynch().
Referenced by fdPsynergyDispatch() and fdPsynergyRun().
Definition at line 121 of file script_commands_cloak.c.