src/field/field_actors.c
Actors: a sprite dissolving pixel by pixel, the actor system, creating and releasing actors, their animations and scripts, and placing their sprites each tick under the scrolling or the fixed camera. More…
#include "field/actor_script.h"#include "field/map_grid.h"#include "field/script_operands.h"#include "graphics/glyph.h"
Included by field.c.
Macros
| Name | Description | |
|---|---|---|
#define | TRACK_END_WAIT_TICKS 90 | The ticks fdSpriteWaitForTrackEnd waits at most. |
#define | ACTOR_WAIT_TICKS_MAX 600 | The longest an actor's script or move is waited for: 10 seconds. |
#define | DISSOLVE_ORDER_STRIDE 16 | How much further along the pixel order each tile reads than the tile before, besides the step it is ahead. |
#define | PIXEL_PAIR_ODD_MASK 0xff00 | Keeps a pixel pair's odd pixel, its high byte, clearing the even one. |
#define | OUTLINE_EDGE_COLOR 15 | The colour fdGridDrawOutlineArm draws an outlined sprite's edge in: the basic sprite palette's white, which SPRITE_COLOR_WHITE paints with too. |
Functions
| Name | Description | |
|---|---|---|
void | fdSpriteWaitForTrackEnd (SPR *sprite) | Waits, at most TRACK_END_WAIT_TICKS, for a sprite's animation to change or for its first layer's script to reach ANIMCMD_HOLD. |
void | fdSpriteDissolveStep (Uint8 *spritePtr, Uint32 step) | Step step of dissolving a sprite: clears the one pixel of each of its tiles that this step takes, tile after tile one step later than the tile before. |
void | fdSpriteDissolveRun (Uint8 *sprite) | Dissolves a sprite pixel by pixel, four steps a tick, over 32 ticks. |
void | fdSpriteDissolveRunMany (Uint8 **sprites, Sint32 count) | Dissolves count sprites together, pixel by pixel, over 32 ticks. |
Sint32 | fdMapGridGetScreenRelativePos (ACTOR *actor, Sint32 *screenPos) | Writes the actor's screen position, in pixels, to screenPos[0..1] and returns 0 when it is on or near the screen; otherwise writes 0, 0 and returns -1. |
void | fdActorSystemInit (Sint32 mode) | Sets up the actor system: allocates and zeroes the 64 actors and the system's state, sets the outline's colours and registers the per-tick updates (mode is an ACTOR_SYSTEM_MODE). |
void | fdActorSystemReservedNoOperationA (void) | Unused: an empty function beside the actor system's, in both games. |
void | fdActorSystemReservedNoOperationB (void) | Unused: a second empty function. |
void * | fdActorFindFree (void) | Returns an unused actor (one without a script) from the 64 slots, or 0 if none is free. |
void | fdActorRelease (ACTOR *actor) | Releases an actor's sprites and zeroes it, releasing its slot. |
ACTOR * | fdActorCreate (Sint32 encodedSprite, FIXED x, FIXED y, FIXED z) | Creates an actor at (x, y, z), in 16.16 pixels, or returns NULL when every slot is in use. encodedSprite / 4096 is what it is made with (ACTOR_CREATE) and its low 12 bits the sprite id. |
void | fdActorStartScript (ACTOR *actor, const Sint32 *script) | Gives an actor a script and starts it from the top. |
void | fdActorSelectAnimation (ACTOR *actor, Sint32 animation) | Starts an animation on an actor's sprite, or on each of the four sprites of a group. |
void | fdActorSetAnimationSpeed (ACTOR *actor, Sint32 step) | Sets the animation speed, the timer step, of an actor's sprite, or of each sprite of a group (SPRITE_ANIMATION_NORMAL_STEP is normal speed). |
void | fdActorSetAnimationAndSpeed (ACTOR *actor, Sint32 animation, Sint32 step) | Both of the above: starts an animation on all of an actor's sprites at the speed step. |
void | fdActorSetSpriteRotation (ACTOR *actor, Uint32 value) | Sets the rotation of an actor's sprite, when it has just one. |
void | fdActorSetFirstSpriteAnimation (ACTOR *actor, Sint32 animationId) | Changes the animation id of a one-sprite actor's first sprite animation, and restarts its animations; a negative id leaves them as they are. |
void | fdActorAddSpriteAnimation (ACTOR *actor, Sint32 animationId) | Adds a sprite animation, by its id, to a one-sprite actor's sprite; a negative id adds none. |
void | fdActorStartApproachWatched (ACTOR *actor, Sint32 watchedActorHandle) | Starts an actor on the script that approaches its watched actor (SC_APPROACH_WATCHED), watching watchedActorHandle. |
void | fdActorStartMovementModeScript (ACTOR *actor) | Starts the leader's control script for the way the party moves now (MainRoutineStateWork.movementMode), waiting a tick first for Sand on the World Map. |
void | fdActorStartIdle (ACTOR *actor) | Starts an actor on the idle script (a lone SC_END). |
void | fdActorStartCamera (ACTOR *actor, Sint32 watchedActorHandle) | Starts an actor on the camera script (SC_CAMERA). |
void | fdActorWaitForScriptEnd (ACTOR *actor) | Waits until the actor's script reaches SC_END, at most ACTOR_WAIT_TICKS_MAX ticks; it returns as soon as the script idles, and after the limit whether or not it has. |
void | fdActorSetSpriteFlags (ACTOR *actor, Uint32 value) | Sets the flags of a one-sprite actor's sprite (SPR_FLAG). |
void | fdActorSetBlendMode (ACTOR *actor, Uint32 mode) | Sets the OAM blend mode of a one-sprite actor's sprite. |
void | fdActorSetOwnScale (ACTOR *actor, Uint32 value) | Sets a one-sprite actor's sprite's own-scale bit: drawn at its own scale, not scaled by distance. |
void | fdActorSetSpriteColorMode (ACTOR *actor, Uint32 value) | Sets the colour mode (SPR_COL_MODE) of a one-sprite actor's sprite animations, except those drawn hidden. |
void | fdActorSetSpritePriorityDirect (ACTOR *actor, Sint32 priority) | Fixes the priority of a one-sprite actor's sprite and its shadow, which then no longer follow the metatiles under it (ACTOR_PRIORITY_AUTOMATIC). |
void | fdActorSetItemIcon (ACTOR *owner, Sint32 id) | Shows item id's icon on its owner's sprite, 16 pixels square at scale 1.0 in 16-colour palette 0. |
Sint32 | fdActorGetSpriteId (ACTOR *actor) | The sprite id (SPRITE_*) an actor shows: its first sprite animation's id, or 0 for none. |
void | fdActorWaitForTrackEnd (ACTOR *actor) | fdSpriteWaitForTrackEnd on an actor's sprite. |
void | fdActorSystemSuspendProjectionAndShowSprites (void) | Stops placing the actors' sprites, starts the palette fading back to normal and, a tick later, shows the sprites alone with BG1-3 hidden, leaving BG0 as it is. |
void | fdActorSystemResumeProjectionAndHideLayers (void) | Places the actors' sprites again, and hides BG1-3 and the sprites. |
Sint32 | fdActorReturnTrue (void) | Unused: returns 1. |
Description
Actors: a sprite dissolving pixel by pixel, the actor system, creating and
releasing actors, their animations and scripts, and placing their sprites
each tick under the scrolling or the fixed camera. Part of field.c.
Macros in detail
TRACK_END_WAIT_TICKS
#define TRACK_END_WAIT_TICKS 90
The ticks fdSpriteWaitForTrackEnd waits at most.
Referenced by fdSpriteWaitForTrackEnd().
Definition at line 11 of file field_actors.c.
ACTOR_WAIT_TICKS_MAX
#define ACTOR_WAIT_TICKS_MAX 600
The longest an actor's script or move is waited for: 10 seconds.
Referenced by fdActorWaitForMove() and fdActorWaitForScriptEnd().
Definition at line 13 of file field_actors.c.
DISSOLVE_ORDER_STRIDE
#define DISSOLVE_ORDER_STRIDE 16
How much further along the pixel order each tile reads than the tile before, besides the step it is ahead.
Referenced by fdSpriteDissolveStep().
Definition at line 43 of file field_actors.c.
PIXEL_PAIR_ODD_MASK
#define PIXEL_PAIR_ODD_MASK 0xff00
Keeps a pixel pair's odd pixel, its high byte, clearing the even one.
Referenced by fdSpriteDissolveStep().
Definition at line 45 of file field_actors.c.
OUTLINE_EDGE_COLOR
#define OUTLINE_EDGE_COLOR 15
The colour fdGridDrawOutlineArm draws an outlined sprite's edge in: the basic
sprite palette's white, which SPRITE_COLOR_WHITE paints with too.
Referenced by fdActorSystemInit().
Definition at line 180 of file field_actors.c.
Functions in detail
fdSpriteWaitForTrackEnd
void fdSpriteWaitForTrackEnd(SPR *sprite)
Waits, at most TRACK_END_WAIT_TICKS, for a sprite's animation to change or
for its first layer's script to reach ANIMCMD_HOLD.
References Sint32 and sySynch().
Referenced by fdActorWaitForTrackEnd().
Definition at line 17 of file field_actors.c.
fdSpriteDissolveStep
void fdSpriteDissolveStep(Uint8 *spritePtr, Uint32 step)
Step step of dissolving a sprite: clears the one pixel of each of its tiles
that this step takes, tile after tile one step later than the tile before.
References Sint32, SpriteDissolvePixelOrder and VramCacheEntries.
Referenced by fdSpriteDissolveRun() and fdSpriteDissolveRunMany().
Definition at line 49 of file field_actors.c.
fdSpriteDissolveRun
void fdSpriteDissolveRun(Uint8 *sprite)
Dissolves a sprite pixel by pixel, four steps a tick, over 32 ticks.
References fdSpriteDissolveStep() and sySynch().
Definition at line 100 of file field_actors.c.
fdSpriteDissolveRunMany
void fdSpriteDissolveRunMany(Uint8 **sprites, Sint32 count)
Dissolves count sprites together, pixel by pixel, over 32 ticks.
References fdSpriteDissolveStep(), Sint32 and sySynch().
Definition at line 117 of file field_actors.c.
fdMapGridGetScreenRelativePos
Sint32 fdMapGridGetScreenRelativePos(ACTOR *actor, Sint32 *screenPos)
Writes the actor's screen position, in pixels, to screenPos[0..1] and returns 0 when it is on or near the screen; otherwise writes 0, 0 and returns -1.
References fdMapStateView() and Sint32.
Definition at line 152 of file field_actors.c.
fdActorSystemInit
void fdActorSystemInit(Sint32 mode)
Sets up the actor system: allocates and zeroes the 64 actors and the system's
state, sets the outline's colours and registers the per-tick updates (mode is
an ACTOR_SYSTEM_MODE). A battle moves its actors with fdActorUpdateAllMotion;
the World Map and a battle place their sprites with the fixed camera.
References fdActorMoveWithCarriers(), fdActorSystemConfigure(), fdActorSystemPlaceSprites(), fdActorSystemProjectSprites(), fdActorUpdateAllMotion(), fdActorUpdateAllOnField(), Sint32, syHeapSlotAllocateEWRAM() and sySetEvent().
Referenced by fdSpriteViewerRun().
Definition at line 186 of file field_actors.c.
fdActorSystemReservedNoOperationA
void fdActorSystemReservedNoOperationA(void)
Unused: an empty function beside the actor system's, in both games.
Definition at line 219 of file field_actors.c.
fdActorSystemReservedNoOperationB
void fdActorSystemReservedNoOperationB(void)
Unused: a second empty function.
Definition at line 224 of file field_actors.c.
fdActorFindFree
void *fdActorFindFree(void)
Returns an unused actor (one without a script) from the 64 slots, or 0 if none is free.
References Sint32.
Referenced by fdActorCreate().
Definition at line 232 of file field_actors.c.
fdActorRelease
void fdActorRelease(ACTOR *actor)
Releases an actor's sprites and zeroes it, releasing its slot. Clearing the
script lets fdActorFindFree hand the actor out again.
References fdSpriteDestroy() and Sint32.
Referenced by fdActorScriptRelease(), scActorGrowDown(), scActorGrowUp(), scAirsRockBlowGust(), scAirsRockInsideBlowGust(), scAirsRockInsideRiseOnLift(), scAirsRockInsideUpdateVentPuff(), scAirsRockInsideVanishStone(), scAnemosInnerSanctumDropMimicStone(), scAnemosInnerSanctumLightSymbol(), scAquaRockFlowSparkleUpStream(), scCavernsFinishMovingAngaraBlock(), scContigoBabyThinks(), scContigoWhirlLeaf(), scDehkanPlateauTakePoundCube(), scEasternAlhafraFinishPushing(), scFlameThrowersRelease(), scFlameThrowersReleaseFlame(), scGabombaStatueChamberGabombaNamesWitchDoctor(), scGabombaStatueSawEnergyFlow(), scGaiaRockInsideRaiseSandTablet(), scInit(), scIsletsGiveTurtle(), scIsletsTradeWithBird(), scIsletsTradeWithCow(), scIsletsTradeWithDog(), scJupiterLighthouseCycloneDropsLeader(), scJupiterLighthouseCycloneLiftsLeader(), scKandoreanTempleReceiveLash(), scKibomboSpinSpark(), scLemurianShipDeckReturnToShip(), scLemuriaPalaceCastMapSparks(), scMagmaRockFireFromStatue(), scMagmaRockInsideFadeStoneAway(), scMagmaRockInsideFinishPushingPillar(), scMagmaRockInsideFireFromStatue(), scMagmaRockRaiseFlamePart(), scMarsLighthouseAerieLightBeacon(), scMarsLighthouseStarRoomTakeMarsStar(), scMarsLighthouseStarRoomUpdateRisingSpark(), scMarsLighthouseStarRoomUseMarsStar(), scSeaOfTimeOpen(), scShamanVillageShowShamansRod(), scSmokeDrift(), scVenusLighthouseEntranceBlastActorSkyward(), scWorldMapUpdatePlacedActors(), scYampiDesertDropScoopGem() and SinkPillar().
Definition at line 253 of file field_actors.c.
fdActorCreate
ACTOR *fdActorCreate(Sint32 encodedSprite, FIXED x, FIXED y, FIXED z)
Creates an actor at (x, y, z), in 16.16 pixels, or returns NULL when every
slot is in use. encodedSprite / 4096 is what it is made with (ACTOR_CREATE)
and its low 12 bits the sprite id.
References ActorScriptEndScript, fdActorFindFree(), fdActorSetPosAndResetMotion(), fdResourceGetMetadataRecordStub(), fdSpriteCreate(), Sint32 and syDMAXCopy().
Referenced by fdActorFlyOnWorldMap(), fdActorMoveAsSand(), fdActorMoveAsSandOnWorldMap(), fdActorMoveOnWorldMap(), fdActorSailOnWorldMap(), fdActorSpawnWaterSplash() and fdActorUpdatePlayerControl().
Definition at line 280 of file field_actors.c.
fdActorStartScript
void fdActorStartScript(ACTOR *actor, const Sint32 *script)
Gives an actor a script and starts it from the top. Sets the script and clears the cursor, the pause, the loop count and the last flag test.
References Sint32.
Referenced by fdActorFlyOnWorldMap(), fdActorMoveAsSand(), fdActorMoveAsSandOnWorldMap(), fdActorMoveOnWorldMap(), fdActorSailOnWorldMap(), fdActorSpawnWaterSplash(), fdActorStartApproachWatched(), fdActorStartCamera(), fdActorStartIdle(), fdActorStartMovementModeScript(), fdActorUpdatePlayerControl(), scActorAttach(), scActorEmitRipples(), scActorEmitWadingSplashes(), scActorResetScriptedFor(), scActorScatterCrumbs(), scActorSetupScripted(), scActorSetupScriptedFor(), scActorSetupScriptedPart(), scActorSpawnWadingSplash(), scActorStartScripted(), scAirsRockBlowGust(), scAirsRockCrumbleRock(), scAirsRockInsideBlowGust(), scAirsRockInsideMovePooledWhirlwind(), scAirsRockInsideMoveWhirlwind(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockMoveWhirlwind(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scAnemosInnerSanctumLeaveSpark(), scAnemosInnerSanctumLightSymbol(), scAnemosInnerSanctumMimicLeader(), scAnemosInnerSanctumPressRoundSwitch(), scAnemosInnerSanctumSendSpark(), scAnemosInnerSanctumSparkRing(), scAquaRockInsidePiersLearnsParch(), scAquaRockInsideSplashBeneath(), scChampaSpawnQuestionMark(), scDehkanPlateauCrackPillar(), scDustBurst(), scDustScatter(), scFieldEffectSpawn(), scFieldEffectSpawnLocal(), scGabombaCatacombsGabombaBestowsPower(), scGabombaCatacombsWadeStream(), scGabombaStatueMoveCharge() and 63 more.
Definition at line 365 of file field_actors.c.
fdActorSelectAnimation
void fdActorSelectAnimation(ACTOR *actor, Sint32 animation)
Starts an animation on an actor's sprite, or on each of the four sprites of a group.
References fdSpriteStartAnimation() and Sint32.
Referenced by fdActorApproachWatchedActor(), fdActorCrossRope(), fdActorCrossTightrope(), fdActorFlyOnWorldMap(), fdActorMoveAsSand(), fdActorMoveAsSandOnWorldMap(), fdActorMoveByKeys(), fdActorMoveOnWorldMap(), fdActorSailOnMap(), fdActorSailOnWorldMap(), fdActorScriptSetAnimation(), fdActorSetMetatileOpen(), fdActorSteerByPad(), fdActorUpdateHoverControl(), fdActorUpdatePlayerControl(), fdActorUpdateWalkingControl(), fdLeaderSlideOnIce(), fdLeaderSlideOnIceAhead(), scActorAttach(), scActorEmitWadingSplashes(), scActorPopUp(), scActorPopUpSlow(), scActorSetupScripted(), scActorSetupScriptedFor(), scActorStartScripted(), scAirsRockBlowGust(), scAirsRockCrumbleRock(), scAirsRockDropOffLedge(), scAirsRockInsideBlowGust(), scAirsRockInsidePlaceStakes(), scAirsRockInsidePoundStake(), scAirsRockInsidePuffVent(), scAirsRockInsideRideWhirlwind(), scAirsRockInsideRiseOnLift(), scAirsRockInsideScatterMote(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideStatueBreathesPooledWhirlwind(), scAirsRockInsideStatueBreathesWhirlwind(), scAirsRockInsideStepOntoStake(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockRideWhirlwind(), scAirsRockStatueBreathesWhirlwind(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scAlhafranCaveChauchaAndEoleoVisit(), scAnemosInnerSanctumLeaveSpark(), scAnemosInnerSanctumLightTorch(), scAnemosInnerSanctumMimicLeader() and 139 more.
Definition at line 379 of file field_actors.c.
fdActorSetAnimationSpeed
void fdActorSetAnimationSpeed(ACTOR *actor, Sint32 step)
Sets the animation speed, the timer step, of an actor's sprite, or of each
sprite of a group (SPRITE_ANIMATION_NORMAL_STEP is normal speed).
References fdSpriteSetAnimationSpeed() and Sint32.
Referenced by fdActorCrossRope(), fdActorCrossTightrope(), fdActorSteerByPad(), fdLeaderSlideOnIce(), fdLeaderSlideOnIceAhead(), scAirsRockInsideDriftMote(), scAirsRockInsideMovePooledWhirlwind(), scAirsRockInsideMoveWhirlwind(), scAirsRockInsideUpdateVentPuff(), scAirsRockMoveWhirlwind(), scGabombaStatuePauseCogsInMenus(), scGaiaRockInsideCaskEmpties(), scGaiaRockInsideCaskRests(), scGaiaRockInsideRestoreSusa(), scGaiaRockInsideSaveSusa(), scGaiaRockInsideSusaThrowsCask(), scInit(), scJupiterLighthouseActivateTheLighthouse(), scJupiterLighthouseRideTheBeam(), scJupiterLighthouseUpdateSpark(), scLeaderSlideOnIceFromEdge(), scLemuriaSpringSetActorAppearance(), scMarsLighthouseEntranceFallIntoHole(), scMarsLighthouseEntranceFallThroughCrack(), scWhirlwindUpdate() and scYampiDesertUpdateSandFlow().
Definition at line 407 of file field_actors.c.
fdActorSetAnimationAndSpeed
void fdActorSetAnimationAndSpeed(ACTOR *actor, Sint32 animation, Sint32 step)
Both of the above: starts an animation on all of an actor's sprites at the
speed step.
References fdSpriteSetAnimationSpeed(), fdSpriteStartAnimation() and Sint32.
Definition at line 435 of file field_actors.c.
fdActorSetSpriteRotation
void fdActorSetSpriteRotation(ACTOR *actor, Uint32 value)
Sets the rotation of an actor's sprite, when it has just one.
Definition at line 466 of file field_actors.c.
fdActorSetFirstSpriteAnimation
void fdActorSetFirstSpriteAnimation(ACTOR *actor, Sint32 animationId)
Changes the animation id of a one-sprite actor's first sprite animation, and restarts its animations; a negative id leaves them as they are.
References fdSpriteResetAnimations() and Sint32.
Referenced by scLemuriaAdmirePalace(), scLemuriaKeepLookingAround(), scLemuriaMarvelAtCity(), scLemuriaRestoreGirl() and scLemuriaTryStuckDoor().
Definition at line 476 of file field_actors.c.
fdActorAddSpriteAnimation
void fdActorAddSpriteAnimation(ACTOR *actor, Sint32 animationId)
Adds a sprite animation, by its id, to a one-sprite actor's sprite; a negative id adds none.
References fdSpriteAddAnimation() and Sint32.
Definition at line 495 of file field_actors.c.
fdActorStartApproachWatched
void fdActorStartApproachWatched(ACTOR *actor, Sint32 watchedActorHandle)
Starts an actor on the script that approaches its watched actor
(SC_APPROACH_WATCHED), watching watchedActorHandle.
References ActorApproachWatchedScript, fdActorStartScript() and Sint32.
Definition at line 509 of file field_actors.c.
fdActorStartMovementModeScript
void fdActorStartMovementModeScript(ACTOR *actor)
Starts the leader's control script for the way the party moves now
(MainRoutineStateWork.movementMode), waiting a tick first for Sand on the
World Map.
References ActorFlyScript, ActorHoverScript, ActorKeyCheckScript, ActorKeysScript, ActorPlayerScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandScript, ActorScriptEndScript, ActorTightropeScript, ActorWalkingScript, ActorWorldMapScript, fdActorStartScript(), MainRoutineStateWork, Sint32 and sySynch().
Referenced by scWorldMapSetUpFlyingShip().
Definition at line 518 of file field_actors.c.
fdActorStartIdle
void fdActorStartIdle(ACTOR *actor)
Starts an actor on the idle script (a lone SC_END).
References ActorScriptEndScript and fdActorStartScript().
Referenced by scDailaRoomsTakeSeaGodsTear(), scGabombaStatueRunCharges(), scJupiterLighthouseStartBeam(), scKibomboMountainsDropOffLedge(), scTrialRoadMoveRival(), scWorldMapBoardShip() and scWorldMapLeaveShip().
Definition at line 547 of file field_actors.c.
fdActorStartCamera
void fdActorStartCamera(ACTOR *actor, Sint32 watchedActorHandle)
Starts an actor on the camera script (SC_CAMERA). With a leader to follow, it
also gets a speed limit of 4 pixels a tick and an acceleration of 0.5.
References ActorCameraScript, fdActorStartScript() and Sint32.
Definition at line 554 of file field_actors.c.
fdActorWaitForScriptEnd
void fdActorWaitForScriptEnd(ACTOR *actor)
Waits until the actor's script reaches SC_END, at most ACTOR_WAIT_TICKS_MAX
ticks; it returns as soon as the script idles, and after the limit whether or
not it has.
References Sint32 and sySynch().
Definition at line 569 of file field_actors.c.
fdActorSetSpriteFlags
void fdActorSetSpriteFlags(ACTOR *actor, Uint32 value)
Sets the flags of a one-sprite actor's sprite (SPR_FLAG).
Referenced by dbPsynergyTest2RaiseStatue(), dbPsynergyTestRaiseStatue(), dbShopTestRaiseStatue(), EFFECT_SPAWN, fdActorFlyOnWorldMap(), fdWhirlwindCarryLeader(), scActorAttach(), scActorEmitWadingSplashes(), scActorFreeze(), scActorResetScriptedFor(), scActorScatterCrumbs(), scActorSetupScripted(), scActorSetupScriptedFor(), scActorSetupScriptedPart(), scActorsSetMetatilesOpen(), scActorStartScripted(), scAirsRockBlowGust(), scAirsRockClearScriptedActorSpriteFlags(), scAirsRockCrumbleRock(), scAirsRockDropOffLedge(), scAirsRockInsideBlowGust(), scAirsRockInsidePlaceStakes(), scAirsRockInsidePuffVent(), scAirsRockInsideRideWhirlwind(), scAirsRockInsideRiseOnLift(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideSpawnMotes(), scAirsRockInsideStatueBreathesPooledWhirlwind(), scAirsRockInsideStatueBreathesWhirlwind(), scAirsRockInsideVanishStone(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockInsideWakeMovableStatue(), scAirsRockRideWhirlwind(), scAirsRockStatueBreathesWhirlwind(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scAlhafranCaveSetUpJail(), scAncientLemuriaCycloneRevealsRime(), scAnemosInnerSanctumClearScriptedActorSpriteFlags(), scAnemosInnerSanctumDullahanOpenTheWay(), scAnemosInnerSanctumDullahanRemoveShadow(), scAnemosInnerSanctumDullahanShadowByHeight(), scAnemosInnerSanctumLeaveSpark(), scAnemosInnerSanctumLightSymbol(), scAnemosInnerSanctumLightTorch(), scAnemosInnerSanctumMimicLeader(), scAnemosInnerSanctumPressRoundSwitch(), scAnemosInnerSanctumSendSpark() and 255 more.
Definition at line 589 of file field_actors.c.
fdActorSetBlendMode
void fdActorSetBlendMode(ACTOR *actor, Uint32 mode)
Sets the OAM blend mode of a one-sprite actor's sprite.
Referenced by scAirsRockInsidePuffVent(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideSpawnMotes(), scAnemosInnerSanctumLeaveSpark(), scAnemosInnerSanctumLightSymbol(), scAnemosInnerSanctumSendSpark(), scAnemosInnerSanctumSparkRing(), scAquaRockInsidePiersLearnsParch(), scFlameThrowerSendSpark(), scGaiaRockInsideFelixLearnsSand(), scInit(), scJupiterLighthouseSpawnSparks(), scKandoreanTempleBlowSteam(), scKandoreanTempleBlowStreamSteam(), scKibomboRaiseSmoke(), scKibomboSpawnFlame(), scMagmaRockInsideLearnBlaze(), scMagmaRockInsideSpawnSpark(), scMarsLighthouseAerieLightBeacon(), scMarsLighthouseAerieSetUpBeacon(), scMarsLighthouseStarRoomSpawnRisingSparks(), scOrbitSparkSpawn(), scPlaceTranslucentBlackActorFX(), scShamanVillageSpawnSmoke(), scSmokeSpawn(), scStaffCreditShowBeacon(), scTaopoSwampPuffSteam(), scVentPuff() and scVenusLighthouseCreateBlendedPassageEffect().
Definition at line 598 of file field_actors.c.
fdActorSetOwnScale
void fdActorSetOwnScale(ACTOR *actor, Uint32 value)
Sets a one-sprite actor's sprite's own-scale bit: drawn at its own scale, not scaled by distance.
Definition at line 609 of file field_actors.c.
fdActorSetSpriteColorMode
void fdActorSetSpriteColorMode(ACTOR *actor, Uint32 value)
Sets the colour mode (SPR_COL_MODE) of a one-sprite actor's sprite
animations, except those drawn hidden.
References fdSpriteSetAnimationColorModes().
Referenced by dbPsynergyTestUpdateRings(), fdActorBlink(), KNOCK_BACK(), scActorAnimateAndEmit(), scActorCycleColorSwaps(), scActorFlashWhite(), scActorPopUp(), scActorPopUpSlow(), scActorSetFlightMode(), scAlhafranCaveChauchaAndEoleoVisit(), scAlhafranCaveSetUpCave(), scAlhafranCaveSetUpJail(), scApojiiIslandsStopFlashing(), scAquaRockFlashMoai(), scAquaRockInsideFallThroughWater(), scAquaRockInsideRideFalls(), scAquaRockStopFlashing(), scContigoRaiseSparkle(), scFireballCarryLeader(), scGabombaCatacombsGabombaBestowsPower(), scGabombaStatueSendCharge(), scGaiaRockInsidePulseSidewaysArrow(), scGaiaRockInsidePulseUpDownArrow(), scIceChipsSpawn(), scInit(), scJupiterLighthouseFlashColors(), scJupiterLighthouseFlickerBeam(), scJupiterLighthousePlaceRaisedActors(), scJupiterLighthouseStopBeamFlicker(), scMarsLighthouseAerieSetUpBeacon(), scMarsLighthouseAerieUpdateRisingRings(), scMarsLighthouseEntranceFlickerDragonFace(), scMarsLighthouseEntranceRideFireball(), scMarsLighthouseEntranceScatterIceChips(), scMarsLighthouseStarRoomScatterIceChips(), scMarsLighthouseTowersPushPipeOrJump(), scMarsLighthouseTowersScatterRubble(), scNorthernReachesFireMagmaBall(), scStaffCreditFlashPoweringUp(), scStaffCreditFlashWithSparks(), scStaffCreditGlowInFlight(), scTrialRoadMeltIceBesideTorch(), scWorldMapChangeSparkleColor(), scWorldMapCircleEcho(), scWorldMapFlashPoweringUp(), scWorldMapFlashWithSparks(), scWorldMapGlowInFlight() and scWorldMapMeetEcho().
Definition at line 617 of file field_actors.c.
fdActorSetSpritePriorityDirect
void fdActorSetSpritePriorityDirect(ACTOR *actor, Sint32 priority)
Fixes the priority of a one-sprite actor's sprite and its shadow, which then
no longer follow the metatiles under it (ACTOR_PRIORITY_AUTOMATIC).
References Sint32.
Referenced by scActorPopUp(), scActorPopUpSlow(), scAnkohlRuinsPushStoneFaceOffLedge(), scContigoPauseWhenFaced(), scGaiaRockInsidePlaceDollOnCobwebAltar(), scGaiaRockInsidePlaceDollOnEastAltar(), scGaiaRockInsidePlaceDollOnEntranceAltar(), scGaiaRockInsidePlaceDollOnWestAltar(), scGaiaRockSpawnCirclingLeaves(), scGaiaRockStatueBlowsWind(), scInit(), scJupiterLighthouseDrawColumnBelowLedge(), scLemuriaNoticeLeader(), scQuestionMarkPop() and scTaopoSwampDripAtRandom().
Definition at line 625 of file field_actors.c.
fdActorSetItemIcon
void fdActorSetItemIcon(ACTOR *owner, Sint32 id)
Shows item id's icon on its owner's sprite, 16 pixels square at scale 1.0 in 16-colour palette 0.
References mnIconDrawItemStub(), Sint32, syHeapSlotAllocate(), syHeapSlotRelease() and syVRAMCacheLoad().
Referenced by scFieldActorSetItemIcon(), scInit(), scIsletsTradeWithCow(), scMadraRoomsPlaceBlackCrystal() and scNaribweRoomsReadFortune().
Definition at line 641 of file field_actors.c.
fdActorGetSpriteId
Sint32 fdActorGetSpriteId(ACTOR *actor)
The sprite id (SPRITE_*) an actor shows: its first sprite animation's id, or 0 for none.
References Sint32.
Definition at line 673 of file field_actors.c.
fdActorWaitForTrackEnd
void fdActorWaitForTrackEnd(ACTOR *actor)
fdSpriteWaitForTrackEnd on an actor's sprite.
References fdSpriteWaitForTrackEnd().
Definition at line 683 of file field_actors.c.
fdActorSystemSuspendProjectionAndShowSprites
void fdActorSystemSuspendProjectionAndShowSprites(void)
Stops placing the actors' sprites, starts the palette fading back to normal and, a tick later, shows the sprites alone with BG1-3 hidden, leaving BG0 as it is.
References fdActorSystemPlaceSprites(), fdActorSystemProjectSprites(), fdPaletteFadeSetTargetStub(), fdPaletteFadeStartInterpolationStub(), sySuspendEvent() and sySynch().
Referenced by scGabombaStatueChamberGabombaNamesWitchDoctor() and scGarohRoomsWakeAtInn().
Definition at line 692 of file field_actors.c.
fdActorSystemResumeProjectionAndHideLayers
void fdActorSystemResumeProjectionAndHideLayers(void)
Places the actors' sprites again, and hides BG1-3 and the sprites.
References fdActorSystemPlaceSprites(), fdActorSystemProjectSprites() and syResumeEvent().
Referenced by scGabombaStatueChamberGabombaNamesWitchDoctor() and scGarohRoomsWakeAtInn().
Definition at line 708 of file field_actors.c.
fdActorReturnTrue
Sint32 fdActorReturnTrue(void)
Unused: returns 1.
References Sint32.
Definition at line 717 of file field_actors.c.