Alchemy
Loading...
Searching...
No Matches

engine_call.h File Reference

The engine call layer: one typed inline for each of the thirteen main-image routines below that the scene, menu and debug overlays import; every overlay call of them goes through it. More...

Go to the source code of this file.

Functions

static s32 FieldScheduler_AddCallback (SchedulerCallback callback, s32 priority)
 Registers a main-image scheduler callback.
static void FieldUiTextResource_Initialize (struct MenuSprite *cursor, s32 *slot)
static void FieldUiTextResource_SetPosition (struct MenuSprite *cursor, s32 x, s32 y)
static void FieldUi_AdjustValueWithoutLimit (s32 message, u16 *buffer)
static void FieldMap_SetViewBounds (s32 minX, s32 minY, s32 maxX, s32 maxY)
static void FieldBattleFx_RunRisingObjectSequence (s32 actor, s32 mode, s32 action)
static s32 FieldObject_CheckMovementCollision (struct FieldActor *actor, struct FieldPosition *position)
static s32 FieldGameFlag_GetByte (s32 flag)
static void FieldGameFlag_SetByte (s32 flag, s32 value)
static s32 FieldParty_ListActiveOwners (s16 *owners)
static s32 FieldUnit_AddHp (s32 owner, s32 delta)
static s32 FieldResource_DecodeType01 (const void *source, void *destination)
 Decodes type-01 compressed data.
static void DisplayScroll_StartHBlankDma (s32 mode, s32 freqX, s32 stepX, s32 ampX, s32 freqY, s32 stepY, s32 ampY)

Detailed Description

The engine call layer: one typed inline for each of the thirteen main-image routines below that the scene, menu and debug overlays import; every overlay call of them goes through it.

It is a habit of the whole game written once: a layer, not a compiler-steering device (AGENTS.md S2). An overlay writes FieldScheduler_AddCallback(callback, TASK_PRIORITY_SCENE) and the inline calls Scheduler_AddOrUpdateCallback, which resolves to the overlay's import stub. Main-image code calls the routines as ordinary functions; only the shared scene/common/scroll_initialize_hblank_dma.h, which object/psynergy_effects.c includes as lemurian_ship.c does, reaches the layer there. field_service.h includes this layer; rooms without the scene command layer use it directly.

Definition in file engine_call.h.

Function Documentation

◆ FieldScheduler_AddCallback()

s32 FieldScheduler_AddCallback ( SchedulerCallback callback,
s32 priority )
inlinestatic

Registers a main-image scheduler callback.

The scene layer's Task_AddCallback and FieldScheduler_AddOrUpdateCallback also use this wrapper, so overlays import this routine under one name.

Definition at line 36 of file engine_call.h.

Referenced by AltinPeak_RestoreRoom7(), AltinPeak_RunBoulderChase(), AltinPeak_StartHydrosBattle(), AltinPeak_StartPaletteAnim(), AltinPeak_StartSpitting(), Bilibin_Initialize(), Colosso_MovePointer(), Colosso_ShowPointer(), Colosso_StartRaceGauge(), Colosso_StartRival(), ColossoLog_Initialize(), ColossoLogRollingStage_InitializeModeTask(), ColossoLogRollingStage_StartSceneTask(), ColossoRiver_Initialize(), ColossoRiver_SelectPresentationScript(), ColossoRiver_StartBrokenBridge(), ColossoWall_Initialize(), ColossoWall_StartLetteringAnimation(), ColossoWall_StartMovingPlatforms(), ColossoWall_StartRivalPath(), CrossboneIslePillarRooms_AnimateWaterLevel(), CrossboneIslePlatformRooms_InitializeScene2(), CrossboneIslePlatformRooms_InitializeScene3(), Curtain_Start(), DisplayScroll_InitializeHBlankDma(), Event_ApproachSuspects(), Event_ConfrontSaturosAndMenardi(), Event_DemonstrateLevitation(), Event_DemonstratePsynergy(), Event_EnterWaterfallGrotto(), Event_FreezeThirdPool(), Event_GaretComesHome(), Event_GuardsCatchParty(), Event_GuardsThrowLeaderOut(), Event_PushStumpOver(), Event_ReadCorneredSuspectsMinds(), Event_RevealSecrets(), Event_RevealStarts(), Event_RoofMended(), Event_WatchBoulderFall(), FieldScene_BuildDescriptorAndInstallTask(), FieldScheduler_AddCallback(), FieldScheduler_AddOrUpdateCallback(), Fuchin_LightDragonWithEye(), HeatGauge_Start(), Imil_Initialize(), Kalay_PrepareTown(), Kalay_PrepareTunnel(), Kalay_StartGuidesPacing(), Kolima_WitnessForestCurse(), KolimaForestBend_FlipFloodgateSwitch(), KolimaForestBridge_WitnessForestCurse(), KolimaForestTree_RejectHermesWater(), KolimaForestTree_RestoreTret(), LamakanDesert_Initialize(), LinkLobby_EnterBattle(), LinkLobby_RunRoundResult(), MercuryLighthouse_Initialize(), MercuryLighthouse_OpenFountainWithSpray(), MercuryLighthouse_StartStatueSpray(), MercuryLighthouse_WalkLeaderIn(), MercuryLighthouseAerie_Initialize(), MercuryLighthouseEntrance_ActivateWithPly(), MercuryLighthouseEntrance_Initialize(), RaiseTheShip(), SaveMenu_Run(), Scene_Initialize(), Scene_RunEntrySetup(), SolSanctum_StartFloatingLights(), SolSanctumEruption_PlayWiseOneRescue(), SolSanctumEruption_RaiseElementalArcs(), SolSanctumLunaSolRooms_RunStatueLightSequence(), SolSanctumStatue_InitializeScrollingSprites(), SuhallaDesert_CatchInStorm(), Task_AddCallback(), Title_RevealScreen(), TolbiShipDeck_ApplyEntryState(), TolbiShipInteriors_ApplyEntryState(), TolbiShipInteriors_NoticeShipRocking(), TolbiShipMast_Initialize(), TolbiSpring_InitializeTossSimulation(), TretTreeBranch_StartBg3Split(), TretTreeInteriors_EnterRoom(), TretTreeInteriors_PlayPostBattleConversation(), TunnelRuins_Initialize(), Vale_Initialize(), ValeStorm_Initialize(), ValeStorm_ShowBoulderSweepingDownriver(), VaultCave_StartFrostControlledFalls(), VaultCave_StartTimedFalls(), VenusLighthouse_AnimateEastTileWave(), VenusLighthouse_AnimateWestTileWave(), VenusLighthouseAerie_EruptBeacon(), VenusLighthouseAerie_RestorePartyOnBrokenAerie(), VenusLighthouseAerie_ShowSaturosAndMenardiFall(), VenusLighthouseAerie_StageShebasFall(), Village_ApplyWaterLevel(), WorldMap_DepartWithTravelers(), WorldMap_Initialize(), WorldMap_PlayLighthouseTransition(), WorldMap_RunOpeningRise(), WorldMap_StartAirborneTravel(), WorldMap_StartTransitionEffect(), Xian_FreezeSpilledWater(), Xian_Initialize(), Xian_StrikeTrainingTreeWithForce(), and Xian_TalkToKungFuStudent().

◆ FieldUiTextResource_Initialize()

void FieldUiTextResource_Initialize ( struct MenuSprite * cursor,
s32 * slot )
inlinestatic

Definition at line 41 of file engine_call.h.

Referenced by FieldUiTextResource_Initialize(), and Sanctum_ChooseRestartOption().

◆ FieldUiTextResource_SetPosition()

void FieldUiTextResource_SetPosition ( struct MenuSprite * cursor,
s32 x,
s32 y )
inlinestatic

Definition at line 46 of file engine_call.h.

Referenced by FieldUiTextResource_SetPosition(), and Sanctum_ChooseRestartOption().

◆ FieldUi_AdjustValueWithoutLimit()

void FieldUi_AdjustValueWithoutLimit ( s32 message,
u16 * buffer )
inlinestatic

Definition at line 51 of file engine_call.h.

Referenced by FieldUi_AdjustValueWithoutLimit(), and LinkLobby_ReceivePartyRecords().

◆ FieldMap_SetViewBounds()

void FieldMap_SetViewBounds ( s32 minX,
s32 minY,
s32 maxX,
s32 maxY )
inlinestatic

◆ FieldBattleFx_RunRisingObjectSequence()

◆ FieldObject_CheckMovementCollision()

◆ FieldGameFlag_GetByte()

◆ FieldGameFlag_SetByte()

◆ FieldParty_ListActiveOwners()

s32 FieldParty_ListActiveOwners ( s16 * owners)
inlinestatic

◆ FieldUnit_AddHp()

s32 FieldUnit_AddHp ( s32 owner,
s32 delta )
inlinestatic

Definition at line 83 of file engine_call.h.

Referenced by DebugMenu_DamageAndAfflictParty(), and FieldUnit_AddHp().

◆ FieldResource_DecodeType01()

s32 FieldResource_DecodeType01 ( const void * source,
void * destination )
inlinestatic

◆ DisplayScroll_StartHBlankDma()

void DisplayScroll_StartHBlankDma ( s32 mode,
s32 freqX,
s32 stepX,
s32 ampX,
s32 freqY,
s32 stepY,
s32 ampY )
inlinestatic

Definition at line 95 of file engine_call.h.

Referenced by DisplayScroll_StartHBlankDma(), and Reveal_HideSecrets().