include/field/stubs.h
The stub calls into the field module, as the other modules' code calls them.
Included by battle_internal.h, battle_effect_internal.h, field_engine_internal.h, field_psynergy_internal.h, script_commands_internal.h, menu_internal.h, shop_buy.c and screens_save.c.
Functions
| Name | Description | |
|---|---|---|
struct ANIMATION_METADATA * | fdResourceGetMetadataRecordStubStub (Uint32 number) | Looks up animation metadata using the descriptor ID in the low twelve bits. |
void | fdWorldMapLoadGraphicsStub (Sint32 x, Sint32 z) | Loads the world map's palette and tiles for the area at (x, z). |
void | fdActorSystemInitStub (Sint32 mode) | Sets up the actor system: its 64 actors, its state and its per-tick updates (mode is an ACTOR_SYSTEM_MODE). |
Sint32 | fdSpriteStartAnimationStub (void *sprite, Sint32 animation) | Starts an animation on a sprite, unless the sprite plays it already. |
FIXED | fdMapGridGetTerrainHeightAboveStub (FIXED x, FIXED z, Sint32 layer, FIXED base) | The height of the ground at (x, z) (16.16 pixels) on the given layer, less base. |
struct ACTOR * | fdActorCreateStub (Sint32 encodedSprite, FIXED x, FIXED y, FIXED z) | Creates an actor at (x, y, z), in 16.16 pixels, or returns 0 when every slot is in use; encodedSprite is the kind of actor and its sprite. |
Sint32 | fdSpritePictureCacheLoadStub (Uint32 slot, Uint32 *buf, Sint32 number, Uint32 variant) | Loads the pictures of animation id number into picture cache slot's buffer, their colours remapped for variant. |
void | fdSpriteAnimationStartStub (void *layer, Sint32 animation) | Starts animation on a sprite animation when its set has it. |
void | fdActorShadowFreeTilesStub (void) | Frees the actors' shadow tiles. |
void | fdActorShadowLoadTilesStub (void) | Loads the actors' shadow tiles. |
Sint32 | fdWorldMapGetBattleEnvironmentStub (void *pos, Sint32 *encounterRegion) | Returns the world map's battle environment at position, and its encounter region in encounterRegion. |
void | fdWorldMapInitPerspectiveStub (void) | Sets up the world map's perspective view. |
void | fdMapGridLoadMapStub (Sint32 index) | Loads map index from MapsWork: its pictures, collision, metatiles and scripts, and starts its layers scrolling. |
void | fdWorldMapUpdateCurrentTileBlockStub (void) | Loads and draws the 2x2 world map tiles around the player in both layers. |
void | fdMapApplySetFlagEditsStub (void) | Plays every edit of the map whose flag is set. |
void | fdActorStartMovementModeScriptStub (struct ACTOR *actor) | Gives the leader the control script of the party's movement mode (MainRoutineStateWork.movementMode). |
void | fdWorldMapStartStillImageStub (void) | Freezes the world map's perspective view as a still image on BG1. |
void | fdWorldMapLoadAreaGraphicsStub (void) | Reloads the world map area's palette and tiles after the still image, puts the default metatiles back and returns to the perspective view. |
struct RESOURCE_OBJECT * | fdSpriteCreateStub (Sint32 resource) | Creates a sprite for animation resource, taking one of the 64 free sprites and a VRAM cache entry for its tiles. |
void | fdSpriteDestroyStub (struct SPR *sprite) | Releases a sprite and, unless it keeps it, its VRAM cache entry. |
void | fdActorStartScriptStub (struct ACTOR *actor, const Sint32 *script) | Gives an actor a script and starts it from the top. |
void | fdSpriteSetAnimationColorModesStub (void *sprite, Uint32 colorMode) | Sets the colour mode of every sprite animation of the sprite that is not hidden. |
void | fdActorSetSpriteFlagsStub (struct ACTOR *actor, Uint32 flags) | Sets a one-sprite actor's sprite flags. |
void | fdActorSetSpriteColorModeStub (struct ACTOR *actor, Uint32 colorMode) | Sets the colour mode of a one-sprite actor's sprite. |
void | fdActorSetSpritePriorityDirectStub (struct ACTOR *actor, Sint32 priority) | Fixes the priority of a one-sprite actor's sprite and its shadow. |
Description
The stub calls into the field module, as the other modules' code calls them.
Functions in detail
fdResourceGetMetadataRecordStubStub
struct ANIMATION_METADATA *fdResourceGetMetadataRecordStubStub(Uint32 number)
Looks up animation metadata using the descriptor ID in the low twelve bits.
Referenced by btObjectSpawnObjectsForList(), fdActorGetScreenPos(), fdEffectCopyWatchedActorPos(), fdPsynergyBlaze() and fdPsynergyUpdateMindReadWave().
Definition at line 14 of file stubs.h.
fdWorldMapLoadGraphicsStub
void fdWorldMapLoadGraphicsStub(Sint32 x, Sint32 z)
Loads the world map's palette and tiles for the area at (x, z).
Referenced by fdEngineRun().
Definition at line 17 of file stubs.h.
fdActorSystemInitStub
void fdActorSystemInitStub(Sint32 mode)
Sets up the actor system: its 64 actors, its state and its per-tick updates
(mode is an ACTOR_SYSTEM_MODE).
Referenced by btRun() and fdEngineRun().
Definition at line 20 of file stubs.h.
fdSpriteStartAnimationStub
Sint32 fdSpriteStartAnimationStub(void *sprite, Sint32 animation)
Starts an animation on a sprite, unless the sprite plays it already.
Referenced by btEffectCreateSprites(), btEffectRunBoreas(), btEffectRunCybele(), btEffectRunDragonFire(), btEffectRunGaia(), btEffectRunHaures(), btEffectRunJudgment(), btEffectRunRamses(), btEffectRunStarfieldFall(), btEffectRunZagan(), btEffectSpriteAcquire(), btEffectSpriteCreateWithTiles(), btEffectTintBattler(), btMotionPlayFall(), btMotionShowDowned(), btPlaybackRun(), btUlyssesFlutterFlake(), fdAvoidDropRing(), fdParticleSetAnimation(), mnCreatePairFigures(), mnCreatePartyFigures(), mnDjinnFiguresInitTopRow(), mnDjinnFiguresReplaceSlot(), mnEquipmentMenuStopCompatibilityIndicators(), mnEquipmentMenuUpdateCompatibilityIndicators(), mnFileListShowPartySprites(), mnItemMenuRunList(), mnPsynergyMenuRunList(), mnSanctumHighlightMembers() and mnShopDrawParty().
Definition at line 22 of file stubs.h.
fdMapGridGetTerrainHeightAboveStub
FIXED fdMapGridGetTerrainHeightAboveStub(FIXED x, FIXED z, Sint32 layer, FIXED base)
The height of the ground at (x, z) (16.16 pixels) on the given layer, less base.
Referenced by fdFlagBlockPlaceAllMarkingEdges(), fdMapGridMarkJumpIfOpen() and fdMeasurePsynergyHeight().
Definition at line 25 of file stubs.h.
fdActorCreateStub
struct ACTOR * fdActorCreateStub(Sint32 encodedSprite, FIXED x, FIXED y, FIXED z)
Creates an actor at (x, y, z), in 16.16 pixels, or returns 0 when every slot is in use; encodedSprite is the kind of actor and its sprite.
Referenced by btObjectMake(), btObjectReset(), fdActorResetForLeader(), fdActorShowEmoteById(), fdActorSpawn(), fdAvoidDropRing(), fdDjinnRunBattleStartHop(), fdDjinnRunMercuryJoinEffect(), fdEffectSetAttached(), fdEffectSpawnDustPuff(), fdEffectSpawnResident(), fdEffectSpawnRevealMarkers(), fdItemDisplayShowItem(), fdItemDisplayShowItemInFront(), fdMadPlantLeapAtLeader(), fdPlaceTreasureSpots(), fdPsynergyUpdateMindReadWave(), fdScoopDigUpItem() and fdScriptSpawnActorTable().
Definition at line 31 of file stubs.h.
fdSpritePictureCacheLoadStub
Sint32 fdSpritePictureCacheLoadStub(Uint32 slot, Uint32 *buf, Sint32 number, Uint32 variant)
Loads the pictures of animation id number into picture cache slot's buffer, their colours remapped for variant.
Referenced by btEnemySpriteLoadIntoSlots(), btMotionCallBeast(), btMotionDismissBeast() and btObjectReleaseSpriteSlots().
Definition at line 35 of file stubs.h.
fdSpriteAnimationStartStub
void fdSpriteAnimationStartStub(void *layer, Sint32 animation)
Starts animation on a sprite animation when its set has it.
Referenced by btMotionPlayHitFlash(), btObjectSpawnObjectsForList() and btStatusIconCycle().
Definition at line 40 of file stubs.h.
fdActorShadowFreeTilesStub
void fdActorShadowFreeTilesStub(void)
Frees the actors' shadow tiles.
Referenced by btEffectRunCatastrophe() and btEffectRunEclipse().
Definition at line 42 of file stubs.h.
fdActorShadowLoadTilesStub
void fdActorShadowLoadTilesStub(void)
Loads the actors' shadow tiles.
Referenced by btEffectRunCatastrophe() and btEffectRunEclipse().
Definition at line 44 of file stubs.h.
fdWorldMapGetBattleEnvironmentStub
Sint32 fdWorldMapGetBattleEnvironmentStub(void *pos, Sint32 *encounterRegion)
Returns the world map's battle environment at position, and its encounter region in encounterRegion.
Referenced by fdEncounterResolveWorldMapZoneAndBackdrop().
Definition at line 47 of file stubs.h.
fdWorldMapInitPerspectiveStub
void fdWorldMapInitPerspectiveStub(void)
Sets up the world map's perspective view.
Referenced by fdEngineRun().
Definition at line 49 of file stubs.h.
fdMapGridLoadMapStub
void fdMapGridLoadMapStub(Sint32 index)
Loads map index from MapsWork: its pictures, collision, metatiles and
scripts, and starts its layers scrolling.
Referenced by fdEngineRun().
Definition at line 52 of file stubs.h.
fdWorldMapUpdateCurrentTileBlockStub
void fdWorldMapUpdateCurrentTileBlockStub(void)
Loads and draws the 2x2 world map tiles around the player in both layers.
Referenced by fdEngineRun().
Definition at line 54 of file stubs.h.
fdMapApplySetFlagEditsStub
void fdMapApplySetFlagEditsStub(void)
Plays every edit of the map whose flag is set.
Referenced by fdEngineRun().
Definition at line 56 of file stubs.h.
fdActorStartMovementModeScriptStub
void fdActorStartMovementModeScriptStub(struct ACTOR *actor)
Gives the leader the control script of the party's movement mode
(MainRoutineStateWork.movementMode).
Referenced by fdEngineRun().
Definition at line 59 of file stubs.h.
fdWorldMapStartStillImageStub
void fdWorldMapStartStillImageStub(void)
Freezes the world map's perspective view as a still image on BG1.
Referenced by fdWorldMapFreeze().
Definition at line 61 of file stubs.h.
fdWorldMapLoadAreaGraphicsStub
void fdWorldMapLoadAreaGraphicsStub(void)
Reloads the world map area's palette and tiles after the still image, puts the default metatiles back and returns to the perspective view.
Referenced by fdMapScreenShow() and fdWorldMapReloadPendingAreaGraphics().
Definition at line 64 of file stubs.h.
fdSpriteCreateStub
struct RESOURCE_OBJECT *fdSpriteCreateStub(Sint32 resource)
Creates a sprite for animation resource, taking one of the 64 free sprites
and a VRAM cache entry for its tiles.
Referenced by btEffectCreateSprites(), btEffectRunGaia(), btEffectRunHaures(), btEffectRunJudgment(), btEffectRunRamses(), btEffectRunStarfieldFall(), btObjectSpawnObjectsForList(), fdParticleInit(), mnCreatePairFigures(), mnCreatePartyFigures(), mnDjinnFiguresInitTopRow(), mnDjinnFiguresReplaceSlot() and mnFileListShowPartySprites().
Definition at line 68 of file stubs.h.
fdSpriteDestroyStub
void fdSpriteDestroyStub(struct SPR *sprite)
Releases a sprite and, unless it keeps it, its VRAM cache entry.
Referenced by btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunHaures(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMegaera(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunMoloch(), btEffectRunNeptune(), btEffectRunNereid(), btEffectRunNereidCopy(), btEffectRunProcne(), btEffectRunRamses(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTrident(), btEffectRunUlysses(), btEffectRunZagan(), btObjectDestroySprites(), fdParticleFree(), mnCreatePairFigures(), mnCreatePartyFigures(), mnDjinnFiguresInitTopRow(), mnDjinnFiguresReleaseTopRow(), mnDjinnFiguresReplaceSlot(), mnFileListHidePartySprites() and mnReleasePartyFigures().
Definition at line 71 of file stubs.h.
fdActorStartScriptStub
void fdActorStartScriptStub(struct ACTOR *actor, const Sint32 *script)
Gives an actor a script and starts it from the top.
Referenced by btObjectMake(), btObjectReset(), fdActorFaceDirectionAndRefreshById(), fdActorFaceDirectionById(), fdActorInitSparkle(), fdActorLaunchFromLeader(), fdActorSetMovementType(), fdActorShowEmoteById(), fdActorStartRepeatedMotion(), fdActorWalkByById(), fdActorWatchAndStartScript(), fdBattleEffectSpawnScatterParticle(), fdDjinnRunVenusJoinEffect(), fdEffectBurstHand(), fdEffectInitFallingFragment(), fdEffectLandDouseDrop(), fdEffectRunSparkEmitter(), fdEffectSetAttached(), fdEffectSpawnBurstParticleField(), fdEffectSpawnDustPuff(), fdEffectSpawnHeavyImpact(), fdEffectSpawnMoveHand(), fdEffectSpawnResident(), fdEffectSpawnRevealMarkers(), fdEffectUpdateDriftingFallActor(), fdEffectUpdateOrbitingParticleFade(), fdEffectUpdateShrinkingOrbitActor(), fdEffectWanderAroundAnchor(), fdItemDisplayRaiseAboveLeader(), fdItemDisplayShowItemInFront(), fdItemDisplayShowPicture(), fdMindReadUpdateCrescent(), fdPsynergyCarry(), fdPsynergyForce(), fdPsynergyGrowth(), fdPsynergyGrowthOnTarget(), fdPsynergyLift(), fdPsynergyLiftOnTarget(), fdPsynergySteerLiftedTarget(), fdPsynergySteerPushedTarget(), fdSummonTabletPlayRunes() and fdTalkToActor().
Definition at line 74 of file stubs.h.
fdSpriteSetAnimationColorModesStub
void fdSpriteSetAnimationColorModesStub(void *sprite, Uint32 colorMode)
Sets the colour mode of every sprite animation of the sprite that is not hidden.
Referenced by fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdPsynergyForce(), fdPsynergyHalt(), fdPsynergyRetreat(), mnSanctumRunMemberIconBurst() and mnSanctumUpdateBurst().
Definition at line 78 of file stubs.h.
fdActorSetSpriteFlagsStub
void fdActorSetSpriteFlagsStub(struct ACTOR *actor, Uint32 flags)
Sets a one-sprite actor's sprite flags.
Referenced by fdActorAppearInSparks(), fdActorAppearInWhirlwind(), fdActorClearSpriteAndCollisionFlags(), fdActorClearSpriteFlags(), fdActorDisableById(), fdActorJumpDownLedge(), fdActorPlaceBlocks(), fdActorResetForLeader(), fdActorRestore(), fdActorSpawn(), fdClimbDown(), fdClimbUp(), fdDjinnRunBattleStartHop(), fdDjinnRunMercuryJoinEffect(), fdEffectSpawnBurstParticleField(), fdEffectSpawnRevealMarkers(), fdEngineRun(), fdFlagBlockPlaceAll(), fdFlagBlockPlaceAllMarkingEdges(), fdHangingVineHang(), fdHangingVineSwing(), fdItemDisplayShowPicture(), fdMadPlantLeapAtLeader(), fdPlaceTreasureSpots(), fdPsynergyCyclone(), fdPsynergyEndSand(), fdPsynergyGrowthOnTarget(), fdPsynergyRetreat(), fdPsynergySand(), fdPsynergySteerLiftedTarget(), fdTeleportPlaySparks(), fdTeleportPlayWhirl(), fdTreasureSpotLaunchMimic() and fdTryJumpForward().
Definition at line 81 of file stubs.h.
fdActorSetSpriteColorModeStub
void fdActorSetSpriteColorModeStub(struct ACTOR *actor, Uint32 colorMode)
Sets the colour mode of a one-sprite actor's sprite.
Referenced by fdActorSetLayersColorMode(), fdBattleEffectSetObjectUpdateMode(), fdDjinnRunBattleStartHop(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectCycleActorAndSpawnArcs(), fdEffectFlickerActorAndSpawnArcs(), fdEffectRunSparkEmitter(), fdEffectSpawnBurstParticleField(), fdEffectUpdateFrostGlint(), fdPsynergyAvoid(), fdPsynergyCatch(), fdPsynergyDouse(), fdPsynergyForce(), fdPsynergyFrost(), fdPsynergyPly(), fdPsynergyResumeHaltedActor(), fdPsynergyRetreat(), fdPsynergyScoop(), fdPsynergySteerLiftedTarget(), fdPsynergySteerPushedTarget() and fdPsynergyUpdateHaltedActor().
Definition at line 84 of file stubs.h.
fdActorSetSpritePriorityDirectStub
void fdActorSetSpritePriorityDirectStub(struct ACTOR *actor, Sint32 priority)
Fixes the priority of a one-sprite actor's sprite and its shadow.
Referenced by fdItemDisplayRaiseAboveLeader() and fdPsynergyGrowFromCaster().
Definition at line 87 of file stubs.h.