Skip to Content
The Alchemy Project

include/field/engine_stubs.h

The stub calls into the field engine module, as the other modules' code calls them.

Included by field_actor_motion.c, field_move_by_keys.c, game_units.c, shop_run.c, screens_debug.c and window_debug.c.

Functions

NameDescription
struct ACTOR *fdActorGetByIdStub (Sint32 actorId)Returns actor actorId, or NULL if it does not exist.
voidgmMainRoutineRunStub (Sint32 start)The main routine: runs one engine after another and never returns.
voidfdScriptWaitTransitionTicksStub (void)The script command "wait for screen": waits as long as the transition runs.
voidfdScriptStartScreenTransitionStub (void)The script command "open screen": starts the script's screen transition.
voidfdParticleSetPosStub (struct FIELD_PARTICLE *effect, Sint32 x, Sint32 z)Places a field effect sprite at (x, z), at rest with no target.
Sint32fdParticleHasPendingTargetStub (struct FIELD_PARTICLE *effect)Reports an unfinished target only for effects that stop on arrival.
voidfdParticleUpdateStub (void *effect)Updates one field effect sprite: its age, callback, motion and picture.
voidfdParticleInitStub (struct FIELD_PARTICLE *effect, Sint32 kind, Sint32 x, Sint32 z)Starts a field effect sprite with a sprite of the given kind at (x, z).
voidfdParticleSetCallbackStub (struct FIELD_PARTICLE *effect, void (*callback)(struct FIELD_PARTICLE *))Gives a field effect sprite its per-tick callback, starting at state 0.
voidfdParticleSetAnimationStub (struct FIELD_PARTICLE *effect, Sint32 mode)Sets the animation of a field effect sprite.
voidfdScriptSetDestinationStub (Sint32 scene, Sint32 entrance)Makes the script leave for entrance of scene.
voidfdScriptEndAllLastingPsynergyStub (void)Ends every lasting Psynergy.
Sint32fdSpeakerGetVoiceStub (Uint16 id)Returns the voice of sprite id's messages, the first of its blip sounds, or 0 for none or with the Speech option off.
voidfdParticleFreeStub (struct FIELD_PARTICLE *effect)Frees a field effect sprite and its sprite, clearing it to zero.
Sint32fdBattleBackgroundGetSelectedStub (void)Returns the battle background chosen for the current scene.
Sint32fdMapGridIsClimbableMetatileStub (Sint32 x, Sint32 z, Sint32 kind)Returns whether the metatile at (x, z) is climbable for the given kind.
Sint32fdActorGetMetatileIndexStub (struct ACTOR *actor)Returns the actor's metatile index.
Sint32fdFlagBlockPlaceAllMarkingEdgesStub (struct ACTOR *actor)Places all marking edges for a flag block actor.
Sint32fdActorCheckBlockedStub (struct ACTOR *actor)Checks whether the actor is blocked.

Description

The stub calls into the field engine module, as the other modules' code calls them.

Functions in detail

fdActorGetByIdStub

struct ACTOR *fdActorGetByIdStub(Sint32 actorId)

Returns actor actorId, or NULL if it does not exist.

Referenced by fdActorCrossRope(), mnForgeRun(), mnInnCheckIn(), mnSanctumRun() and mnShopRun().

Definition at line 12 of file engine_stubs.h.

gmMainRoutineRunStub

void gmMainRoutineRunStub(Sint32 start)

The main routine: runs one engine after another and never returns.

Referenced by gmRestartQuest() and syInit().

Definition at line 14 of file engine_stubs.h.

fdScriptWaitTransitionTicksStub

void fdScriptWaitTransitionTicksStub(void)

The script command "wait for screen": waits as long as the transition runs.

Referenced by mnInnPlaySleep().

Definition at line 16 of file engine_stubs.h.

fdScriptStartScreenTransitionStub

void fdScriptStartScreenTransitionStub(void)

The script command "open screen": starts the script's screen transition.

Referenced by mnInnPlaySleep().

Definition at line 18 of file engine_stubs.h.

fdParticleSetPosStub

void fdParticleSetPosStub(struct FIELD_PARTICLE *effect, Sint32 x, Sint32 z)

Places a field effect sprite at (x, z), at rest with no target.

Referenced by mnSanctumUpdateBurstSparkle().

Definition at line 20 of file engine_stubs.h.

fdParticleHasPendingTargetStub

Sint32 fdParticleHasPendingTargetStub(struct FIELD_PARTICLE *effect)

Reports an unfinished target only for effects that stop on arrival.

Referenced by mnSanctumUpdateBurstSparkle().

Definition at line 22 of file engine_stubs.h.

fdParticleUpdateStub

void fdParticleUpdateStub(void *effect)

Updates one field effect sprite: its age, callback, motion and picture.

Referenced by mnSanctumUpdateBurst().

Definition at line 24 of file engine_stubs.h.

fdParticleInitStub

void fdParticleInitStub(struct FIELD_PARTICLE *effect, Sint32 kind, Sint32 x, Sint32 z)

Starts a field effect sprite with a sprite of the given kind at (x, z).

Referenced by mnSanctumRunMemberIconBurst().

Definition at line 26 of file engine_stubs.h.

fdParticleSetCallbackStub

void fdParticleSetCallbackStub(struct FIELD_PARTICLE *effect, void (*callback)(struct FIELD_PARTICLE *))

Gives a field effect sprite its per-tick callback, starting at state 0.

Referenced by mnSanctumRunMemberIconBurst().

Definition at line 31 of file engine_stubs.h.

fdParticleSetAnimationStub

void fdParticleSetAnimationStub(struct FIELD_PARTICLE *effect, Sint32 mode)

Sets the animation of a field effect sprite.

Referenced by mnSanctumRunMemberIconBurst().

Definition at line 34 of file engine_stubs.h.

fdScriptSetDestinationStub

void fdScriptSetDestinationStub(Sint32 scene, Sint32 entrance)

Makes the script leave for entrance of scene.

Referenced by mnDebugSceneSelectRun(), mnDebugWarpArafura2(), mnDebugWarpArafura3(), mnDebugWarpChampa2(), mnDebugWarpJupiter(), mnDebugWarpKaoruSpecial1(), mnDebugWarpKaoruSpecial2(), mnDebugWarpKaoruSpecial3() and mnDebugWarpKaoruSpecial4().

Definition at line 36 of file engine_stubs.h.

fdScriptEndAllLastingPsynergyStub

void fdScriptEndAllLastingPsynergyStub(void)

Ends every lasting Psynergy.

Referenced by mnShopInitState().

Definition at line 38 of file engine_stubs.h.

fdSpeakerGetVoiceStub

Sint32 fdSpeakerGetVoiceStub(Uint16 id)

Returns the voice of sprite id's messages, the first of its blip sounds, or 0 for none or with the Speech option off.

Referenced by mnSanctumShowKeeperMessage(), mnSanctumShowKeeperMessageHidingCursor(), mnShopShowKeeperMessage() and mnShopShowKeeperMessageHidingCursor().

Definition at line 41 of file engine_stubs.h.

fdParticleFreeStub

void fdParticleFreeStub(struct FIELD_PARTICLE *effect)

Frees a field effect sprite and its sprite, clearing it to zero.

Referenced by mnSanctumRunMemberIconBurst() and mnSanctumUpdateBurstSparkle().

Definition at line 43 of file engine_stubs.h.

fdBattleBackgroundGetSelectedStub

Sint32 fdBattleBackgroundGetSelectedStub(void)

Returns the battle background chosen for the current scene.

Referenced by btRun().

Definition at line 45 of file engine_stubs.h.

fdMapGridIsClimbableMetatileStub

Sint32 fdMapGridIsClimbableMetatileStub(Sint32 x, Sint32 z, Sint32 kind)

Returns whether the metatile at (x, z) is climbable for the given kind.

Referenced by fdActorMoveAsSand().

Definition at line 48 of file engine_stubs.h.

fdActorGetMetatileIndexStub

Sint32 fdActorGetMetatileIndexStub(struct ACTOR *actor)

Returns the actor's metatile index.

Referenced by fdActorMoveByKeys().

Definition at line 51 of file engine_stubs.h.

fdFlagBlockPlaceAllMarkingEdgesStub

Sint32 fdFlagBlockPlaceAllMarkingEdgesStub(struct ACTOR *actor)

Places all marking edges for a flag block actor.

Definition at line 54 of file engine_stubs.h.

fdActorCheckBlockedStub

Sint32 fdActorCheckBlockedStub(struct ACTOR *actor)

Checks whether the actor is blocked.

Referenced by fdSandCheckEndKeys().

Definition at line 57 of file engine_stubs.h.