src/field/script_commands_actor_commands.c
Script commands on actors: placing, moving and animating them. More…
Included by script_commands.c.
Macros
| Name | Description | |
|---|---|---|
#define | REPEATED_MOTION_MAX 3 | The most times a repeated motion repeats: RepeatedSquashScript holds the motion that many times over, REPEATED_MOTION_SCRIPT_BYTES (32 words) each. |
#define | REPEATED_MOTION_SCRIPT_BYTES (32 * sizeof(Sint32)) | |
#define | DUST_PUFF_DRAG_X 18 | The share of a dust puff's x and z velocity that drag takes each tick, as one part in this many. |
#define | DUST_PUFF_DRAG_Z 16 | |
#define | LEDGE_JUMP_SINK_TICKS 14 | The ticks a ledge jump sinks for, 2 pixels a tick, and the most it waits to land. |
#define | LEDGE_JUMP_LANDING_TICKS 180 | |
#define | ACTOR_WATCH_ACTOR_MASK 0xff | The actor in fdActorWatchAndStartScript's targetId, below its enum ACTOR_WATCH_FLAG bits. |
#define | FOLLOW_DISTANCE 40 | The distance, in pixels, a follower stays behind the actor it watches (fdActorMoveTowardTarget reads it from the follower's timer). |
Functions
| Name | Description | |
|---|---|---|
ACTOR * | fdActorGetById (Sint32 actorId) | Returns an actor, or NULL if it does not exist. |
void | fdActorSetSpeedParams (Uint32 actorId, FIXED speedLimit, FIXED acceleration) | Sets an actor's top speed and acceleration, in 16.16 pixels per tick. |
void | fdActorSetMovementTypeById (Uint32 actorId, Sint32 movement) | Gives an actor a movement type or actor script (fdActorSetMovementType) and makes it face where it moves (ACTOR_FACES_MOTION). |
void | fdActorStop (Uint32 actorId) | Stops an actor's movement type and puts it back under script control, on the idle script (a lone SC_END), and sets ACTOR_FACES_MOTION. |
void | fdActorWatchAndSetScript (Uint32 actorId, Uint32 watchedActorId) | Makes an actor follow another (the watched actor script): writes its watchedActor. |
void | fdActorWaitForScriptEndById (Uint32 actorId) | Waits, at most 300 ticks, for an actor's script to reach its end (SC_END). |
void | fdActorSetMovementTypeAndWaitById (Uint32 actorId, Sint32 movement) | Starts a movement type or supplied actor script, as fdActorSetMovementTypeById does, then waits up to 300 ticks for its script to end. |
void | fdActorSetDestinationById (Uint32 actorId, Sint32 x, Sint32 z) | Sends an actor toward (x, z), in pixels, keeping its current animation. |
void | fdActorMoveToAndWaitById (Uint32 actorId, Sint32 x, Sint32 z) | As fdActorSetDestinationById, then waits (at most 600 ticks) for the actor to arrive. |
void | fdActorWalkToById (Uint32 actorId, Sint32 x, Sint32 z) | Walks an actor toward (x, z), in pixels. |
void | fdActorWalkToAndWaitById (Uint32 actorId, Sint32 x, Sint32 z) | Walks the actor to (x, z), in pixels, waits for it to arrive and stands it still. |
void | fdActorCenterOnColumn (Uint32 actorId, Sint32 priority, Sint32 zOffset) | Walks the actor sideways to the middle of its 16-pixel column, sets its sprite priority to priority (fdActorSetSpritePriority), then sends it zOffset pixels along z. |
void | fdActorSetDestinationOffsetById (Uint32 actorId, Sint32 xOffset, Sint32 zOffset) | Sends an actor (xOffset, zOffset) pixels from where it stands, keeping its current animation. |
void | fdActorWalkByById (Uint32 actorId, Sint32 xOffset, Sint32 zOffset) | Walks the actor (xOffset, zOffset) pixels from where it stands. |
void | fdActorWalkByAndWaitById (Uint32 actorId, Sint32 xOffset, Sint32 zOffset) | Walks the actor (xOffset, zOffset) pixels, waits for it to arrive and stands it still. |
void | fdActorLaunchFromLeader (Uint32 actorId, Sint32 xOffset, Sint32 zOffset, Sint32 facing) | Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0.6 and acceleration 0.3; once there, the launch script turns it to face facing. |
void | fdActorWaitForMoveById (Uint32 actorId) | Waits (at most 600 ticks) for the actor to arrive and stands it still. |
void | fdActorSetHorizontalPosWithTerrain (Uint32 actorId, FIXED x, FIXED z) | Puts the actor at (x, z), 16.16 pixels, at rest. |
void | fdActorSetPosWithTerrain (Uint32 actorId, FIXED x, FIXED y, FIXED z) | Puts the actor at (x, y, z), 16.16 pixels, at rest; an actor that follows the ground (ACTOR_FOLLOWS_TERRAIN) is raised by the ground height there, read as fdActorSetHorizontalPosWithTerrain reads it. |
void | fdActorSetAnimationById (Uint32 actorId, Sint32 animation) | Switches an actor to an animation (an ACTOR_ANIMATION: ANIM_STAND, ANIM_WALK, ANIM_NOD, ANIM_SHAKE_HEAD and so on). |
void | fdActorSetAnimationSpeedById (Uint32 actorId, Sint32 steps) | Sets the animation timer steps of each of an actor's sprites (fdSpriteSetAnimationSpeed). |
void | fdActorWaitForAnimationChange (Uint32 actorId) | Waits, at most 90 ticks, for an actor's animation to change. |
void | fdActorSetAnimationAndWait (Uint32 actorId, Sint32 animation) | Plays an animation and waits for it to end. |
void | fdActorNoOperation (void) | An empty function, reached only through an unnamed stub in the stub call table of this object's module. |
void | fdActorJump (Uint32 actorId, Sint32 speed, Sint32 ticks) | Throws the actor upward at speed pixels per tick with a jump sound (a higher one above 5), then waits ticks ticks. |
void | fdActorStartRepeatedMotion (Uint32 actorId, Sint32 count) | Makes an actor squash and spring back count times (1 to REPEATED_MOTION_MAX), through RepeatedSquashScript. |
void | fdActorRunRepeatedMotion (Uint32 actorId, Sint32 count) | As fdActorStartRepeatedMotion, then waits for it to end. |
void | fdEffectUpdateDustPuff (ACTOR *particle) | Moves a dust puff of fdEffectSpawnDustPuff: it drifts with its x and z velocity (kept in speed and acceleration), which drag slows each tick, and rises 1/64 pixel a tick. |
void | fdEffectSpawnDustPuff (ACTOR *src, Sint32 color) | Kicks up a dust puff (SPRITE_DUST_PUFF) where source stands: it flies off toward the back at 0.5 to 1.4 pixels a tick and sideways at up to 1.4, with one of two animations, in the colour mode color. |
void | fdActorJumpDownLedge (Sint32 actorId, Uint32 pose, Sint32 dustColor) | Makes an actor jump down off a ledge in front of it (the field runs it for the leader when the player presses down at a ledge): it shows pose for 10 ticks, hops 12 pixels south, turns toward FACING_SOUTH_SOUTHWEST (1/16 turn past FACING_SOUTH) while sinking 28 pixels with a dust puff every other tick in the colour mode dustColor (none when it is -1), then jumps on to 16 pixels south of where it started and lands. |
void | fdActorFaceActorById (Sint32 firstId, Sint32 secondId, Sint32 ticks) | Turns the first actor at once to face the second, then waits the given number of ticks. |
void | fdActorTurnToFaceEachOther (Sint32 firstId, Sint32 secondId, Sint32 ticks) | Turns two actors toward each other, then waits the given number of ticks. |
void | fdActorTurnPairToFaceEachOther (ACTOR *first, ACTOR *second) | Turns two actors to face each other, at most 1/16 turn a tick each, until both do (at most 60 ticks). |
void | fdActorReleaseById (Sint32 actorId) | Releases the actor and empties its slot, writing NULL to its place in the field state's actor table. |
void | fdActorReleaseNoOperation (void) | |
void | fdActorConfigureSpriteColor (Sint32 actorId, Sint32 color) | Gives every sprite part of an actor the colour mode color (fdActorSetSpriteColor), or with SPRITE_COLOR_BLINK makes it blink. |
void | fdActorUpdateBlink (ACTOR *actor) | Per-tick update function of a blinking actor: sets its sprite parts' colour mode from ActorBlinkSpriteColors (SPRITE_COLOR_WHITE for two ticks out of eight, otherwise SPRITE_COLOR_NORMAL). |
void | fdActorSetSpriteColor (ACTOR *actor, Sint32 color) | Sets the colour mode of every animated part of an actor's sprite. |
void | fdActorWatchAndStartScript (Uint32 actorId, Sint32 targetId, const void *script) | Makes an actor follow the actor in targetId's ACTOR_WATCH_ACTOR_MASK bits and starts script on it. |
Sint32 | fdActorStepAngle (ACTOR *actor) | SC_CALL function that turns an actor toward the angle kept in its timer: the whole way when within 1/16 turn, otherwise 1/32 turn. |
void | fdActorClearDestinationAndStand (Uint32 actorId) | Clears an actor's destination, puts it under script control and stands it still. |
void | fdActorFaceDirectionById (Sint32 actorId, Sint32 angle, Sint32 ticks) | Turns an actor toward angle (TRIG_TURN a full turn; fdActorStepAngle), then the script waits the given number of ticks. |
void | fdActorSetSpritePriority (Sint32 actorId, Sint32 priority) | Fixes the priority of the actor's sprite, which then no longer follows its depth: clears ACTOR_PRIORITY_AUTOMATIC. |
void | fdActorCopyGraphics (Uint32 targetId, Uint32 srcId) | Makes the target actor's sprite show the source actor's graphics (its VRAM block and tile). |
void | fdActorReservedNoOperation (void) | |
void | fdScriptSetMessageId (Sint32 msg) | Sets the number of the script's next message. |
Sint32 | fdActorGetSpriteById (Sint32 actorId) | Returns the sprite (the first animation's id) of the actor in the low 12 bits of actorId, or -1 if there is no such animated actor. |
Sint32 | fdActorFindBySprite (Sint32 sprite) | Returns the first of the scene's actors (ACTOR_FIRST_PLACED to ACTOR_LAST_ID) showing sprite, or -1. |
Description
Script commands on actors: placing, moving and animating them. Part of
script_commands.c.
Macros in detail
REPEATED_MOTION_MAX
#define REPEATED_MOTION_MAX 3
The most times a repeated motion repeats: RepeatedSquashScript holds the
motion that many times over, REPEATED_MOTION_SCRIPT_BYTES (32 words) each.
Referenced by fdActorStartRepeatedMotion().
Definition at line 428 of file script_commands_actor_commands.c.
REPEATED_MOTION_SCRIPT_BYTES
#define REPEATED_MOTION_SCRIPT_BYTES (32 * sizeof(Sint32))
Referenced by fdActorStartRepeatedMotion().
Definition at line 429 of file script_commands_actor_commands.c.
DUST_PUFF_DRAG_X
#define DUST_PUFF_DRAG_X 18
The share of a dust puff's x and z velocity that drag takes each tick, as one part in this many.
Referenced by fdEffectUpdateDustPuff().
Definition at line 461 of file script_commands_actor_commands.c.
DUST_PUFF_DRAG_Z
#define DUST_PUFF_DRAG_Z 16
Referenced by fdEffectUpdateDustPuff().
Definition at line 462 of file script_commands_actor_commands.c.
LEDGE_JUMP_SINK_TICKS
#define LEDGE_JUMP_SINK_TICKS 14
The ticks a ledge jump sinks for, 2 pixels a tick, and the most it waits to land.
Referenced by fdActorJumpDownLedge().
Definition at line 539 of file script_commands_actor_commands.c.
LEDGE_JUMP_LANDING_TICKS
#define LEDGE_JUMP_LANDING_TICKS 180
Referenced by fdActorJumpDownLedge().
Definition at line 540 of file script_commands_actor_commands.c.
ACTOR_WATCH_ACTOR_MASK
#define ACTOR_WATCH_ACTOR_MASK 0xff
The actor in fdActorWatchAndStartScript's targetId, below its enum
ACTOR_WATCH_FLAG bits.
Referenced by fdActorWatchAndStartScript().
Definition at line 804 of file script_commands_actor_commands.c.
FOLLOW_DISTANCE
#define FOLLOW_DISTANCE 40
The distance, in pixels, a follower stays behind the actor it watches
(fdActorMoveTowardTarget reads it from the follower's timer).
Referenced by fdActorWatchAndStartScript().
Definition at line 807 of file script_commands_actor_commands.c.
Functions in detail
fdActorGetById
ACTOR *fdActorGetById(Sint32 actorId)
Returns an actor, or NULL if it does not exist.
References fdActorLookup() and Sint32.
Referenced by fdActorCopyGraphics(), fdActorGet(), fdActorJumpDownLedge(), fdActorLaunchFromLeader(), fdActorSetMovementType(), fdActorWatchAndSetScript(), fdChestOpenAndShowItem(), fdClimbDown(), fdClimbUp(), fdDjinnRunBattleStartHop(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdEffectRunAngledApproachPhases(), fdEffectUpdateDescendingOrbitActor(), fdEffectUpdateMarsSpark(), fdEffectUpdateRadialSpread(), fdEffectUpdateRandomTargetParticle(), fdMapScreenInit(), fdPsynergySteerPushedTarget(), fdPsynergyStopMindReadWave(), fdPsynergyUpdateMindReadWave(), fdTalkToActor(), fdTryJumpForward(), fdUpdateActorVisibilityBounds(), scActorFindNearestFloatingPlatform(), scActorFloatLogWithLeader(), scActorResetMotionFields(), scActorSwapPositionsByDepth(), scActorUpdateBlockDrawOrder(), scColossoAskDoneCheering(), scColossoAskDoneLookingAround(), scColossoFadeInWarrior(), scColossoFindActorAhead(), scColossoOfferCheeringSpot(), scColossoRestoreWarrior(), scColossoShowItemIcon(), scColossoTakePlaceForMatch(), scColossoUpdatePathOpponent(), scFieldEffectSpawnNineRadialEffects(), scFloatNut(), scGomaCavePillarDropStumpFragment(), scInit(), scKolimaForestHopEast(), scKolimaForestHopTo(), scMercuryLighthouseArriveWithSparks(), scMercuryLighthouseWalkIntoWaterfall(), scPushedActorAdvancePair(), scPushedActorBlockFootprint() and 9 more.
Definition at line 7 of file script_commands_actor_commands.c.
fdActorSetSpeedParams
void fdActorSetSpeedParams(Uint32 actorId, FIXED speedLimit, FIXED acceleration)
Sets an actor's top speed and acceleration, in 16.16 pixels per tick.
References fdActorLookup().
Referenced by fdActorLaunchFromLeader() and fdActorSetSpeedFX().
Definition at line 17 of file script_commands_actor_commands.c.
fdActorSetMovementTypeById
void fdActorSetMovementTypeById(Uint32 actorId, Sint32 movement)
Gives an actor a movement type or actor script (fdActorSetMovementType) and
makes it face where it moves (ACTOR_FACES_MOTION).
References fdActorLookup(), fdActorSetMovementType() and Sint32.
Referenced by fdActorSetScript(), scColosseumEntranceAnnounceFinals(), scColosseumEntranceTalkToAzart(), scCrossboneIsleSteppingStonesFreezeThirdPuddle(), scInit(), scKalayTolbiDocksGaretSeesTheKaragol(), scLogRoomsBReadMindAndWelcomeIsaacBack(), scLunpaFortressEntranceGuardThrowsPartyOut(), scLunpaFortressGuardThrowsPartyOut(), scLunpaFortressSentriesThrowPartyOut(), scLunpaFortressUnusedFirstPatrolThrowsPartyOut(), scSanctumAskToAcceptQuest(), scSanctumReadMindAboutGoldenStatue(), scSolSanctumElementalStarRoomEnterStarRoom(), scSolSanctumElementalStarRoomStandAroundHostages(), scValeMendingTheRoof(), scValePlazaTalkAboutFallenStone(), scValeRoofMended(), scValeUnusedRoofMended(), scVaultRevisitReadMindOnJailKey(), scXianTalkToWaterCarrier() and scXianWaterCarrierStartsRoundAgain().
Definition at line 30 of file script_commands_actor_commands.c.
fdActorStop
void fdActorStop(Uint32 actorId)
Stops an actor's movement type and puts it back under script control, on the
idle script (a lone SC_END), and sets ACTOR_FACES_MOTION.
References fdActorLookup() and fdActorStartIdleStub().
Referenced by scAlpineCrossingLiftBoulder(), scAltinPeakFirstBeastHopsAway(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceTalkToWarriorWithIndigestion(), scColosseumEntranceAnnounceFinals(), scColosseumEntranceFinalsStart(), scColosseumEntranceShowClearedTrial(), scColosseumEntranceShowFailedTrial(), scColosseumEntranceTalkToAzart(), scCottageRoomsAGaretComesHome(), scImilMeetMiaAtOldCouplesHouse(), scImilTalkToOldMan(), scKalayHammetReturnsToPalace(), scKalayWatchTourGroupDeparture(), scKolimaForestEntranceWitnessForestCurse(), scKolimaWitnessForestCurse(), scLunpaFortressGuardThrowsPartyOut(), scLunpaFortressPatrolPairThrowsPartyOut(), scLunpaFortressTalkToStartledOldMan(), scLunpaFortressUnusedFirstPatrolThrowsPartyOut(), scLunpaGuardsBlockGate(), scMcCoyPalaceAudienceWithMcCoy(), scSanctumReadMindAboutGoldenStatue(), scSolSanctumElementalStarRoomEnterStarRoom(), scSolSanctumEruptionPlayWiseOneRescue(), scSolSanctumEruptionThrowEruptionRing(), scSuhallaDesertDouseStorm(), scTolbiShipDeckDepartWithParty(), scTolbiShipDeckMonsterLandsOnDeck(), scTolbiShipDeckMonstersAttackCrew(), scTolbiShipMastPlayFirstAttack(), scTolbiShipMastPlaySecondAttack(), scTolbiShipMastPlayThirdAttack(), scTolbiShipMastStartBirdsFlyingOff(), scValeKradensCottageTalkToRockslideSurvivor(), scValePlazaDepartForQuest(), scValePlazaFightTravelers(), scValePlazaPsynergyStoneIsGone(), scValePrologueGaretFollowsIsaac(), scValePrologueShowBoulderSweepingDownriver(), scValePrologueStrongmanTriesToGoForHelp(), scVenusLighthouseAerieCombineSaturosAndMenardi(), scVenusLighthouseAeriePlayShebasFall() and scVenusLighthouseAerieUpdateBeaconRise().
Definition at line 43 of file script_commands_actor_commands.c.
fdActorWatchAndSetScript
void fdActorWatchAndSetScript(Uint32 actorId, Uint32 watchedActorId)
Makes an actor follow another (the watched actor script): writes its watchedActor.
References ActorFaceWatchedScript, fdActorGetById(), fdActorLookup(), fdActorSetMovementType() and Sint32.
Referenced by scAltmillerCaveRestoreBabiAndInviteParty(), scBabiPalaceMeetBabiAfterColosso(), scColosseumNavampaMatchPlayPostBattleReunion(), scColossoOfferCheeringSpot(), scInit() and scValePlazaDepartForQuest().
Definition at line 56 of file script_commands_actor_commands.c.
fdActorWaitForScriptEndById
void fdActorWaitForScriptEndById(Uint32 actorId)
Waits, at most 300 ticks, for an actor's script to reach its end (SC_END).
References fdActorLookup() and fdActorWaitForScriptEndStub().
Referenced by fdActorRunRepeatedMotion(), fdClimbDown(), scAlpineCrossingFeizhiArrives(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiPalaceRestInPalaceBeds(), scColossoReachArena(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBHurryToThePlaza(), scImilMeetMiaAtOldCouplesHouse(), scKalayWatchTourGroupDeparture(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestTreeRestoreTret(), scKolimaWitnessForestCurse(), scLemurianShipSetSail(), scLogRoomsAApproachSuspects(), scLogRoomsAFreeVillagerAndFightThieves(), scLogRoomsAResetSuspectRoutes(), scLogRoomsAReturnStolenGoods(), scLogRoomsASuspectedLeaderDodges(), scLogRoomsASuspectedThiefDodges(), scLunpaFortressTalkToStartledOldMan(), scMcCoyPalaceMcCoyRewardsParty(), scMercuryLighthousePushJetRoomPipes(), scSanctumActOutSolSanctum(), scShipRoomsWatchWarriorsStormOff(), scTolbiShipDeckMonstersBoard(), scTolbiShipDeckRowersDisembark(), scValeAskAboutSneakingToAleph(), scValeEruptionReturnFromMtAleph(), scValePlazaDepartForQuest(), scValePlazaSentToAidElders(), scValePrologueDoraGoesForHelp(), scValePrologueShowBoulderSweepingDownriver(), scValePrologueWatchBoulderFall(), scValeWarnAgainstSneakingUpMtAleph(), scVenusLighthouseAeriePlayShebasFall(), scVenusLighthouseMoveGatePillar(), scVenusLighthouseThrowBackFromLightning(), scWorldMapShowHammetsCaravan(), scXianStrikeTrainingTreeWithForce() and scXianTalkToKungFuStudent().
Definition at line 69 of file script_commands_actor_commands.c.
fdActorSetMovementTypeAndWaitById
void fdActorSetMovementTypeAndWaitById(Uint32 actorId, Sint32 movement)
Starts a movement type or supplied actor script, as
fdActorSetMovementTypeById does, then waits up to 300 ticks for its script to
end.
References fdActorLookup(), fdActorSetMovementType(), fdActorWaitForScriptEndStub() and Sint32.
Referenced by fdActorRunScriptAndWait().
Definition at line 80 of file script_commands_actor_commands.c.
fdActorSetDestinationById
void fdActorSetDestinationById(Uint32 actorId, Sint32 x, Sint32 z)
Sends an actor toward (x, z), in pixels, keeping its current animation.
References fdActorLookup(), fdActorSetMoveTargetStub(), fdActorStartIdleStub() and Sint32.
Referenced by fdActorSetDestination().
Definition at line 93 of file script_commands_actor_commands.c.
fdActorMoveToAndWaitById
void fdActorMoveToAndWaitById(Uint32 actorId, Sint32 x, Sint32 z)
As fdActorSetDestinationById, then waits (at most 600 ticks) for the actor to
arrive.
References fdActorLookup(), fdActorSetMoveTargetStub(), fdActorStartIdleStub(), fdActorWaitForMoveStub() and Sint32.
Referenced by fdActorMoveToAndWait(), fdClimbDown(), fdClimbUp(), fdTryJumpForward(), scKolimaForestHopTo() and scMercuryLighthouseHopAcrossPool().
Definition at line 107 of file script_commands_actor_commands.c.
fdActorWalkToById
void fdActorWalkToById(Uint32 actorId, Sint32 x, Sint32 z)
Walks an actor toward (x, z), in pixels.
References fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorStartIdleStub() and Sint32.
Referenced by fdActorWalkTo(), scColossoAskDoneLookingAround() and scColossoOfferCheeringSpot().
Definition at line 121 of file script_commands_actor_commands.c.
fdActorWalkToAndWaitById
void fdActorWalkToAndWaitById(Uint32 actorId, Sint32 x, Sint32 z)
Walks the actor to (x, z), in pixels, waits for it to arrive and stands it still.
References fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorStartIdleStub(), fdActorWaitForMoveStub() and Sint32.
Referenced by fdActorWalkToAndWait(), scColossoAskDoneLookingAround() and scColossoOfferCheeringSpot().
Definition at line 136 of file script_commands_actor_commands.c.
fdActorCenterOnColumn
void fdActorCenterOnColumn(Uint32 actorId, Sint32 priority, Sint32 zOffset)
Walks the actor sideways to the middle of its 16-pixel column, sets its
sprite priority to priority (fdActorSetSpritePriority), then sends it zOffset
pixels along z.
References fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorSetSpritePriority(), fdActorStartIdleStub(), fdActorWaitForMoveStub() and Sint32.
Referenced by fdActorCenterAndWalk().
Definition at line 154 of file script_commands_actor_commands.c.
fdActorSetDestinationOffsetById
void fdActorSetDestinationOffsetById(Uint32 actorId, Sint32 xOffset, Sint32 zOffset)
Sends an actor (xOffset, zOffset) pixels from where it stands, keeping its current animation.
References fdActorLookup(), fdActorSetMoveTargetStub(), fdActorStartIdleStub() and Sint32.
Referenced by fdActorLaunchFromLeader(), fdActorSetDestinationOffset(), scBabiLighthouseHopClearOfPillar(), scFieldActorSetDestinationOffset(), scMercuryLighthouseDropLeaderToColumn(), scMercuryLighthouseWalkIntoWaterfall(), scMogallForestFirstAreaPushLog(), scMogallForestSecondAreaPushLog(), scMogallForestThirdAreaPushLog() and scPushedActorRoll().
Definition at line 188 of file script_commands_actor_commands.c.
fdActorWalkByById
void fdActorWalkByById(Uint32 actorId, Sint32 xOffset, Sint32 zOffset)
Walks the actor (xOffset, zOffset) pixels from where it stands. Scripts reach
it (fdActorWalkBy); fdActorWalkByAndWaitById calls it too.
References fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorStartIdleStub() and Sint32.
Referenced by fdActorWalkBy() and fdActorWalkByAndWaitById().
Definition at line 207 of file script_commands_actor_commands.c.
fdActorWalkByAndWaitById
void fdActorWalkByAndWaitById(Uint32 actorId, Sint32 xOffset, Sint32 zOffset)
Walks the actor (xOffset, zOffset) pixels, waits for it to arrive and stands it still.
References fdActorLookup(), fdActorSelectAnimationStub(), fdActorWaitForMoveStub(), fdActorWalkByById() and Sint32.
Referenced by fdActorWalkByAndWait().
Definition at line 225 of file script_commands_actor_commands.c.
fdActorLaunchFromLeader
void fdActorLaunchFromLeader(Uint32 actorId, Sint32 xOffset, Sint32 zOffset, Sint32 facing)
Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0.6 and acceleration 0.3; once there, the launch script turns it to face facing.
References ActorLaunchScript, fdActorGetById(), fdActorLookup(), fdActorSelectAnimationStub(), fdActorSetDestinationOffsetById(), fdActorSetHorizontalPosWithTerrain(), fdActorSetSpeedParams(), fdActorStartScriptStub(), MainRoutineStateWork and Sint32.
Referenced by scBabiLighthouseExplainTruthDoor(), scFieldActorLaunchFromLeader(), scLaliveroIodemGivesBlackOrb() and scLemurianShipSetSail().
Definition at line 240 of file script_commands_actor_commands.c.
fdActorWaitForMoveById
void fdActorWaitForMoveById(Uint32 actorId)
Waits (at most 600 ticks) for the actor to arrive and stands it still.
References fdActorLookup(), fdActorSelectAnimationStub() and fdActorWaitForMoveStub().
Referenced by fdClimbDown(), fdClimbUp(), scAlpineCrossingLiftBoulder(), scAltinPeakPushSpritzRoomPillar(), scAltinPeakRideCart(), scAltinPeakRunBoulderChase(), scAltinPeakStartHydrosBattle(), scAltmillerCaveMeetInvisibleBabi(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseCloseTruthDoor(), scBabiLighthouseExplainTruthDoor(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiLighthouseHopClearOfPillar(), scBabiLighthouseOpenTruthDoor(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceRestInPalaceBeds(), scBattleArenaEnterBattle(), scColosseumAzartMatchPushPipeworksPipe(), scColosseumNavampaMatchPlayPostBattleReunion(), scColosseumNavampaMatchStepOffScales(), scColosseumNavampaMatchStepOnScales(), scColosseumSatrageMatchTalkToWallAttendant(), scCottageRoomsAGaretComesHome(), scCrossboneIsleKeysFifthStatuePushesLeaderBack(), scCrossboneIsleKeysFirstStatuePushesLeaderBack(), scCrossboneIsleKeysFourthStatuePushesLeaderBack(), scCrossboneIsleKeysSecondStatuePushesLeaderBack(), scCrossboneIsleKeysThirdStatuePushesLeaderBack(), scCrossboneIsleKeysTrackStatueColumn(), scCrossboneIsleSteppingStonesFrostRaisesPillar(), scFuchinTempleEnterWaterfallGrotto(), scFuchinTempleFehSeesChi(), scFuchinTempleFeizhiLeavesForHsu(), scFuchinTempleMonkLetsPartyIntoGrotto(), scFuchinTempleNyunpaTeachesKi(), scFuchinTempleRunHamasRevealLesson(), scGomaCaveEntranceIvanJoins(), scGomaCaveEntrancePushWestPillar(), scGomaCavePillarPushStumpOver(), scGondowanCaveIodemAsksWhyTurningBack(), scGondowanCaveIodemComesAlong(), scGondowanCaveLeapStump(), scHopLeaderBy(), scImilMiaSaysFarewellToApprentices(), scInit(), scKalayTolbiDocksGaretSeesTheKaragol(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestFloodgatePushBankLogEast(), scKolimaForestFloodgatePushBankLogWest(), scKolimaWitnessForestCurse() and 92 more.
Definition at line 265 of file script_commands_actor_commands.c.
fdActorSetHorizontalPosWithTerrain
void fdActorSetHorizontalPosWithTerrain(Uint32 actorId, FIXED x, FIXED z)
Puts the actor at (x, z), 16.16 pixels, at rest.
References fdActorLookup(), fdActorStartIdleStub(), fdMapGridGetTerrainHeightStub() and Sint32.
Referenced by fdActorLaunchFromLeader().
Definition at line 277 of file script_commands_actor_commands.c.
fdActorSetPosWithTerrain
void fdActorSetPosWithTerrain(Uint32 actorId, FIXED x, FIXED y, FIXED z)
Puts the actor at (x, y, z), 16.16 pixels, at rest; an actor that follows the
ground (ACTOR_FOLLOWS_TERRAIN) is raised by the ground height there, read as
fdActorSetHorizontalPosWithTerrain reads it.
References fdActorLookup(), fdActorStartIdleStub(), fdMapGridGetTerrainHeightStub() and Sint32.
Definition at line 313 of file script_commands_actor_commands.c.
fdActorSetAnimationById
void fdActorSetAnimationById(Uint32 actorId, Sint32 animation)
Switches an actor to an animation (an ACTOR_ANIMATION: ANIM_STAND, ANIM_WALK,
ANIM_NOD, ANIM_SHAKE_HEAD and so on).
References fdActorLookup(), fdActorSelectAnimationStub() and Sint32.
Referenced by fdActorSetAnimationAndWait() and fdScriptAskYesNoWithActorAnimation().
Definition at line 344 of file script_commands_actor_commands.c.
fdActorSetAnimationSpeedById
void fdActorSetAnimationSpeedById(Uint32 actorId, Sint32 steps)
Sets the animation timer steps of each of an actor's sprites
(fdSpriteSetAnimationSpeed).
References fdActorLookup(), fdActorSetAnimationSpeedStub() and Sint32.
Referenced by scColosseumEntranceInitContestants(), scLamakanDesertFallIntoPit(), scShipRoomsRunScriptCommand(), scShipRoomsSetPassengerRowing() and scVenusLighthouseFallThroughFloor().
Definition at line 354 of file script_commands_actor_commands.c.
fdActorWaitForAnimationChange
void fdActorWaitForAnimationChange(Uint32 actorId)
Waits, at most 90 ticks, for an actor's animation to change. Only an actor
drawn as a sprite (ACTOR_SPRITE_ONE) is waited for.
References fdActorLookup(), Sint32 and sySynch().
Referenced by dbIncreaseItemAndLevelRunMotionTest(), fdActorSetAnimationAndWait(), scCrossboneIsleSteppingStonesFreezeThirdPuddle(), scLogRoomsAPlayAnimationAndWait(), scSanctumAskToAcceptQuest(), scShipRoomsRunScriptCommand(), scTunnelRuinsHopDownStep() and scVenusLighthouseAerieOverhearSaturosAndMenardi().
Definition at line 364 of file script_commands_actor_commands.c.
fdActorSetAnimationAndWait
void fdActorSetAnimationAndWait(Uint32 actorId, Sint32 animation)
Plays an animation and waits for it to end. Scripts reach it
(fdActorSetAnimationAndWait).
References fdActorSetAnimationById(), fdActorWaitForAnimationChange() and Sint32.
Referenced by scAlpineCrossingFeizhiArrives(), scAlpineCrossingHamaReachesHsu(), scAlpineCrossingLiftBoulder(), scAlpineCrossingTalkToFeizhi(), scAltinPeakCelebrateHydrosVictory(), scAltinScareOffBeast(), scAltinTalkToThirstyOldWoman(), scAltmillerCaveBabiCallsPartyBack(), scAltmillerCaveMeetInvisibleBabi(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseExplainTruthDoor(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiPalaceHearSoldiersReport(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceOfferCloakBall(), scBabiPalaceOfferRest(), scBabiPalacePassOnBabisWord(), scBabiPalaceReadShebasMind(), scBabiPalaceRestInPalaceBeds(), scBabiPalaceShowBeds(), scBabiPalaceWakeAfterFinals(), scBabiPalaceWakeFromFinalsDream(), scBilibinCaveDouseIceRoomFire(), scBilibinCaveMeltFrostBack(), scBilibinCaveUpdateThirdPuddleFromTorches(), scBilibinJillGivesHardNut(), scColosseumAzartMatchExplainFinalsRules(), scColosseumEntranceAnnounceFinals(), scColosseumEntranceCrowdRecognizesIsaac(), scColosseumEntranceExplainPartySupport(), scColosseumEntranceFinalsStart(), scColosseumEntranceFollowEscortOut(), scColosseumEntranceShowFailedTrial(), scColosseumEntranceTalkToBuford(), scColosseumEntranceTalkToNavampa(), scColosseumEntranceTalkToSatrage(), scColosseumNavampaMatchIntroduceThirdFinals(), scColosseumNavampaMatchPlayPostBattleReunion(), scColosseumSatrageMatchIntroduceSecondFinals(), scColossoFadeInWarrior(), scColossoOfferCheeringSpot(), scColossoReachArena(), scCottageRoomsAFamilyNods(), scCottageRoomsAGaretComesHome(), scCottageRoomsAPlayRepeatedAnimationAndWait(), scCottageRoomsBAskIsaacHisBusiness(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBHurryToThePlaza(), scCottageRoomsBVisitSickDora(), scFuchinTempleFehSeesChi() and 170 more.
Definition at line 391 of file script_commands_actor_commands.c.
fdActorNoOperation
void fdActorNoOperation(void)
An empty function, reached only through an unnamed stub in the stub call table of this object's module.
Definition at line 399 of file script_commands_actor_commands.c.
fdActorJump
void fdActorJump(Uint32 actorId, Sint32 speed, Sint32 ticks)
Throws the actor upward at speed pixels per tick with a jump sound (a higher one above 5), then waits ticks ticks.
References fdActorLookup(), fdScriptWait(), Sint32 and sySoundPlayStub().
Referenced by fdDjinnRunBattleStartHop(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), scAlpineCrossingLiftBoulder(), scAltinPeakReadFallingRockSign(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseExplainTruthDoor(), scBabiLighthouseHopClearOfPillar(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceWakeAfterFinals(), scBabiPalaceWakeFromFinalsDream(), scBilibinUpdateVillageStatueMetatiles(), scCottageRoomsAGaretComesHome(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBShowMythrilBag(), scCottageRoomsBVisitSickDora(), scGomaCaveEntranceIvanJoins(), scGomaCavePillarFightForge(), scGomaCavePillarWatchForgeJoin(), scHopLeaderBy(), scImilTalkToOldMan(), scKalayHammetReturnsToPalace(), scKalayTolbiDocksGaretSeesTheKaragol(), scKalayTolbiDocksPassengersBlameTourGuide(), scKalayWatchTourGroupDeparture(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestTreeRejectHermesWater(), scKolimaLowerBridge(), scKolimaWitnessForestCurse(), scLaliveroIodemGivesBlackOrb(), scLogRoomsAIvanJoinsRodSearch(), scLunpaFortressFindHammet(), scLunpaFortressTalkToStartledOldMan(), scMcCoyPalaceAudienceWithMcCoy(), scMercuryLighthouseMiaOpensEntranceWithPly(), scMercuryLighthousePlyOpensWaterfallPassage(), scSanctumActOutSolSanctum(), scShipRoomsCastOff(), scShipRoomsDiscussLaunchingWithoutAnchor(), scShipRoomsReturnLuckyAnchor(), scShipRoomsWatchWarriorsStormOff(), scSolSanctumElementalStarRoomBagMercuryStar(), scSolSanctumElementalStarRoomBagVenusStar(), scSolSanctumElementalStarRoomDemandElementalStars(), scSolSanctumElementalStarRoomEnterStarRoom(), scSolSanctumElementalStarRoomFelixRemovesMask(), scSolSanctumElementalStarRoomRevealSaturosAndMenardi(), scSolSanctumElementalStarRoomTakeMarsStar(), scSolSanctumEntranceIntroduceSanctum() and 57 more.
Definition at line 405 of file script_commands_actor_commands.c.
fdActorStartRepeatedMotion
void fdActorStartRepeatedMotion(Uint32 actorId, Sint32 count)
Makes an actor squash and spring back count times (1 to REPEATED_MOTION_MAX),
through RepeatedSquashScript.
References fdActorLookup(), fdActorStartScriptStub(), RepeatedSquashScript and Sint32.
Referenced by fdActorRunRepeatedMotion(), scAlpineCrossingFeizhiArrives(), scAlpineCrossingHamaReachesHsu(), scAlpineCrossingLiftBoulder(), scAltinPeakReadFallingRockSign(), scAltinPeakStartHydrosBattle(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiPalaceHearSoldiersReport(), scBabiPalaceMeetBabiAfterColosso(), scColosseumAzartMatchExplainFinalsRules(), scColosseumEntranceCrowdRecognizesIsaac(), scColosseumEntranceExplainPartySupport(), scColosseumEntranceFinalsStart(), scColosseumEntranceTalkToTrialAttendant(), scColosseumNavampaMatchPlayPostBattleReunion(), scCottageRoomsAGaretComesHome(), scCottageRoomsAPlayRepeatedAnimationAndWait(), scCottageRoomsBAskIsaacHisBusiness(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBHurryToThePlaza(), scCottageRoomsBVisitSickDora(), scCottageRoomsCTalkToBusyChef(), scFuchinTempleFehSeesChi(), scFuchinTempleFeizhiLeavesForHsu(), scFuchinTempleNyunpaOffersTest(), scFuchinTempleNyunpaTeachesKi(), scFuchinTempleRunHamasRevealLesson(), scGomaCaveEntranceIvanJoins(), scGomaCavePillarWatchForgeJoin(), scHammetPalaceHammetsHomecoming(), scHammetPalaceIvanReportsToLayana(), scImilMiaSaysFarewellToApprentices(), scImilTalkToOldMan(), scKalayHammetReturnsToPalace(), scKalayIvanMeetsPalaceGuards(), scKalayTolbiDocksPassengersBlameTourGuide(), scKalayWatchTourGroupDeparture(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestTreeRestoreTret(), scKolimaWitnessForestCurse(), scLamakanDesertFallIntoPit(), scLamakanDesertMeetManticore(), scLamaTempleRunHamasFarewell(), scLogRoomsADefeatThieves(), scLogRoomsADiscussMindReading(), scLogRoomsAFreeVillagerAndFightThieves(), scLogRoomsAMeetIvan(), scLogRoomsAReadCorneredSuspectsMinds(), scLogRoomsAReturnStolenGoods() and 95 more.
Definition at line 433 of file script_commands_actor_commands.c.
fdActorRunRepeatedMotion
void fdActorRunRepeatedMotion(Uint32 actorId, Sint32 count)
As fdActorStartRepeatedMotion, then waits for it to end.
References fdActorStartRepeatedMotion(), fdActorWaitForScriptEndById() and Sint32.
Referenced by fdDjinnRunBattleStartHop(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), scAlpineCrossingFeizhiArrives(), scAlpineCrossingHamaReachesHsu(), scAlpineCrossingLiftBoulder(), scAltinPeakCelebrateHydrosVictory(), scAltinPeakFirstBeastHopsAway(), scAltinPeakShowFirstBeastRoute(), scAltinScareOffBeast(), scAltmillerCaveBabiCallsPartyBack(), scAltmillerCaveMeetInvisibleBabi(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseExplainTruthDoor(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiPalaceHearSoldiersReport(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceOfferCloakBall(), scBabiPalacePassOnBabisWord(), scBabiPalaceTalkToWarriorWithIndigestion(), scBabiPalaceWakeAfterFinals(), scBabiPalaceWakeFromFinalsDream(), scBilibinJillGivesHardNut(), scBilibinPullJillFromRiver(), scColosseumAzartMatchExplainFinalsRules(), scColosseumEntranceAnnounceFinals(), scColosseumEntranceCrowdRecognizesIsaac(), scColosseumEntranceDiscussLuckyGuessWinnings(), scColosseumEntranceExplainPartySupport(), scColosseumEntranceFinalsStart(), scColosseumEntrancePraiseBothMatchesWon(), scColosseumEntrancePraiseFirstMatchWon(), scColosseumEntranceShowClearedTrial(), scColosseumEntranceShowFailedTrial(), scColosseumEntranceTalkToAzart(), scColosseumEntranceTalkToDekka(), scColosseumEntranceTalkToGalahad(), scColosseumEntranceTalkToNavampa(), scColosseumNavampaMatchIntroduceThirdFinals(), scColosseumNavampaMatchPlayPostBattleReunion(), scColosseumSatrageMatchIntroduceSecondFinals(), scCottageRoomsAGaretComesHome(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBHurryToThePlaza(), scCottageRoomsBTalkToDora(), scCottageRoomsBTalkToInnkeeper(), scCottageRoomsBVisitSickDora(), scCrossboneIsleKeysBaneFirstEscape(), scCrossboneIsleKeysBaneLastEscape() and 214 more.
Definition at line 453 of file script_commands_actor_commands.c.
fdEffectUpdateDustPuff
void fdEffectUpdateDustPuff(ACTOR *particle)
Moves a dust puff of fdEffectSpawnDustPuff: it drifts with its x and z
velocity (kept in speed and acceleration), which drag slows each tick, and
rises 1/64 pixel a tick.
References Sint32.
Referenced by fdEffectSpawnDustPuff().
Definition at line 467 of file script_commands_actor_commands.c.
fdEffectSpawnDustPuff
void fdEffectSpawnDustPuff(ACTOR *src, Sint32 color)
Kicks up a dust puff (SPRITE_DUST_PUFF) where source stands: it flies off
toward the back at 0.5 to 1.4 pixels a tick and sideways at up to 1.4, with
one of two animations, in the colour mode color.
References DustPuffLongScript, DustPuffShortScript, fdActorCreateStub(), fdActorSelectAnimationStub(), fdActorSetSpriteColor(), fdActorStartScriptStub(), fdEffectUpdateDustPuff(), Sint32 and syRandom().
Referenced by fdActorJumpDownLedge().
Definition at line 493 of file script_commands_actor_commands.c.
fdActorJumpDownLedge
void fdActorJumpDownLedge(Sint32 actorId, Uint32 pose, Sint32 dustColor)
Makes an actor jump down off a ledge in front of it (the field runs it for
the leader when the player presses down at a ledge): it shows pose for 10
ticks, hops 12 pixels south, turns toward FACING_SOUTH_SOUTHWEST (1/16 turn
past FACING_SOUTH) while sinking 28 pixels with a dust puff every other tick
in the colour mode dustColor (none when it is -1), then jumps on to 16 pixels
south of where it started and lands.
References fdActorFaceDirectionById(), fdActorGetById(), fdActorSelectAnimationStub(), fdActorSetMoveTargetStub(), fdActorWaitForMoveStub(), fdEffectSpawnDustPuff(), fdPlayQueuedMusic(), Sint32, sySoundPlayStub() and sySynch().
Referenced by fdRunPushMetatile() and scFieldActorJumpDownLedge().
Definition at line 548 of file script_commands_actor_commands.c.
fdActorFaceActorById
void fdActorFaceActorById(Sint32 firstId, Sint32 secondId, Sint32 ticks)
Turns the first actor at once to face the second, then waits the given number of ticks.
References fdActorLookup(), fdScriptWait(), Sint32 and syAtan().
Referenced by fdActorFaceActor() and scColossoFadeInWarrior().
Definition at line 608 of file script_commands_actor_commands.c.
fdActorTurnToFaceEachOther
void fdActorTurnToFaceEachOther(Sint32 firstId, Sint32 secondId, Sint32 ticks)
Turns two actors toward each other, then waits the given number of ticks.
References fdActorLookup(), fdActorTurnPairToFaceEachOther(), fdScriptWait() and Sint32.
Referenced by fdActorFaceEachOther(), fdTalkToActor(), scColosseumEntranceAskIfReadyForFinals(), scColosseumEntranceDiscussLuckyGuessWinnings(), scColosseumEntranceTalkToAzart(), scColosseumEntranceTalkToBuford(), scColosseumEntranceTalkToDekka(), scColosseumEntranceTalkToNavampa(), scColosseumEntranceTalkToSatrage(), scColosseumEntranceTalkToTrialAttendant(), scColossoOfferCheeringSpot(), scCottageRoomsBAskIsaacHisBusiness(), scCottageRoomsBHurryToThePlaza(), scFuchinTempleFehSeesChi(), scFuchinTempleRunHamasRevealLesson(), scFuchinTempleStudentsSeeTreeFall(), scGomaCaveEntranceIvanJoins(), scGondowanCaveIodemComesAlong(), scInit(), scKalayAskAboutGoingToCave(), scLogRoomsBFaceAndSpeak(), scLogRoomsBOfferBones(), scLogRoomsBWelcomeIsaacBack(), scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieConfrontSaturos(), scMercuryLighthousePlyOpensWaterfallPassage(), scMogallForestApePointsTheWay(), scMogallForestFirstAreaApeAttacks(), scMogallForestThirdAreaApeAttacks(), scStoneRoomsLeaderSilencesThieves(), scValeEruptionReturnFromMtAleph(), scVaultFaceEachOtherAndWait(), scVaultIvanStaysBehind(), scVaultRevisitAskAboutJail(), scVaultRevisitGreetWarriorGuy(), scVaultRevisitHopeVolcanoStaysCalm(), scVaultRevisitReadMindOnJailKey(), scVaultRevisitTalkOfLunpaThieves(), scVaultRevisitTalkToDog(), scVaultRevisitWishEldersWereBrave() and scWestLunpaCaveHoldReunion().
Definition at line 624 of file script_commands_actor_commands.c.
fdActorTurnPairToFaceEachOther
void fdActorTurnPairToFaceEachOther(ACTOR *first, ACTOR *second)
Turns two actors to face each other, at most 1/16 turn a tick each, until
both do (at most 60 ticks). Only fdActorTurnToFaceEachOther calls it.
References Sint32, syAtan() and sySynch().
Referenced by fdActorTurnToFaceEachOther().
Definition at line 638 of file script_commands_actor_commands.c.
fdActorReleaseById
void fdActorReleaseById(Sint32 actorId)
Releases the actor and empties its slot, writing NULL to its place in the
field state's actor table.
References fdActorLookup(), fdActorReleaseStub(), memcpy() and Sint32.
Referenced by scAltinApplyWaterLevel(), scAltinBeastHopAway(), scColosseumNavampaMatchPlayPostBattleReunion(), scColossoRestoreMatchResult(), scFuchinTempleFeizhiLeavesForHsu(), scInit(), scKalayWatchTourGroupDeparture(), scShipRoomsNoticeShipRocking(), scShipRoomsReachIsland(), scShipRoomsRunScriptCommand(), scShipRoomsStartSecondAttack(), scShipRoomsStartThirdAttack(), scSolSanctumEruptionRaiseElementalLights(), scStuccoRoomsAApplyRoomState(), scTolbiShipDeckOfferToScoutIsland(), scTolbiShipDeckSetUpAtAnchor(), scValePrologueWatchBoulderFall(), scVenusLighthouseAerieRestorePartyOnBrokenAerie(), scVenusLighthouseAerieShowSaturosAndMenardiFall(), scVenusLighthouseAerieStageShebasFall() and scWorldMapUseBlackOrb().
Definition at line 691 of file script_commands_actor_commands.c.
fdActorReleaseNoOperation
void fdActorReleaseNoOperation(void)
Definition at line 716 of file script_commands_actor_commands.c.
fdActorConfigureSpriteColor
void fdActorConfigureSpriteColor(Sint32 actorId, Sint32 color)
Gives every sprite part of an actor the colour mode color
(fdActorSetSpriteColor), or with SPRITE_COLOR_BLINK makes it blink.
References fdActorLookup(), fdActorSetSpriteColor(), fdActorUpdateBlink() and Sint32.
Referenced by fdActorSetSpriteColorById() and scMercuryLighthouseWalkIntoWaterfall().
Definition at line 722 of file script_commands_actor_commands.c.
fdActorUpdateBlink
void fdActorUpdateBlink(ACTOR *actor)
Per-tick update function of a blinking actor: sets its sprite parts' colour
mode from ActorBlinkSpriteColors (SPRITE_COLOR_WHITE for two ticks out of
eight, otherwise SPRITE_COLOR_NORMAL).
References ActorBlinkSpriteColors, Sint32 and TickCount.
Referenced by fdActorConfigureSpriteColor().
Definition at line 744 of file script_commands_actor_commands.c.
fdActorSetSpriteColor
void fdActorSetSpriteColor(ACTOR *actor, Sint32 color)
Sets the colour mode of every animated part of an actor's sprite. Scripts set
SPRITE_COLOR_NORMAL or SPRITE_COLOR_HIDDEN, and alternate the two to make an
actor flash.
References Sint32.
Referenced by fdActorConfigureSpriteColor(), fdEffectSpawnDustPuff(), scAltinDriftSpew(), scAltinInitSpew(), scAltinPeakDriftSpit(), scAltinPeakInitSpit(), scCrossboneIsleSteppingStonesSetSpriteColorFromTimer(), scFuchinFallsCaveCreateHiddenActor(), scFuchinFallsCaveHideDust(), scFuchinTempleGlowRedAndBlue(), scGomaCavePillarFinishFragment(), scGomaCavePillarSpawnFragment(), scImilFuchinFallsSpawnDust(), scImilInitSmoke(), scImilSwayAndSpark(), scInit(), scKalaySpawnTunnelParticle(), scKolimaFlickerCurseDust(), scKolimaForestEntranceTwinkleGroundSparkle(), scKolimaTwinkleGroundSparkle(), scMercuryLighthouseAerieFlickerBeacon(), scMogallForestSetColorFromTimer(), scPlaceHiddenActorFX(), scPlaceTranslucentBlackActorFX(), scShipRoomsHide(), scSolSanctumEruptionStepShards(), scVenusLighthouseAerieSpawnSideOrbitParticles(), scVenusLighthouseAerieSpawnUpperOrbitParticles(), scVenusLighthouseAerieUpdateBeaconRise(), scVenusLighthouseApplyMarkedColor(), scVenusLighthouseConfigurePassageEffect(), scVenusLighthouseFlashStruckLeader(), scVenusLighthouseRestoreMarkedColors() and scWorldMapSpawnIslandWake().
Definition at line 777 of file script_commands_actor_commands.c.
fdActorWatchAndStartScript
void fdActorWatchAndStartScript(Uint32 actorId, Sint32 targetId, const void *script)
Makes an actor follow the actor in targetId's ACTOR_WATCH_ACTOR_MASK bits and
starts script on it. Unless targetId has ACTOR_WATCH_KEEP_MOTION it keeps
FOLLOW_DISTANCE, takes the target's top speed with twice its acceleration, to
keep up with it, and no collision flags, so it cannot block the target.
References fdActorLookup(), fdActorStartScriptStub() and Sint32.
Referenced by scCottageRoomsBTalkToDora() and scFieldActorWatchAndStartScript().
Definition at line 813 of file script_commands_actor_commands.c.
fdActorStepAngle
Sint32 fdActorStepAngle(ACTOR *actor)
SC_CALL function that turns an actor toward the angle kept in its timer: the
whole way when within 1/16 turn, otherwise 1/32 turn.
References Sint32.
Referenced by ActorLaunchScript and ActorStepAngleScript.
Definition at line 836 of file script_commands_actor_commands.c.
fdActorClearDestinationAndStand
void fdActorClearDestinationAndStand(Uint32 actorId)
Clears an actor's destination, puts it under script control and stands it still.
References fdActorLookup(), fdActorSelectAnimationStub() and fdActorStartIdleStub().
Definition at line 859 of file script_commands_actor_commands.c.
fdActorFaceDirectionById
void fdActorFaceDirectionById(Sint32 actorId, Sint32 angle, Sint32 ticks)
Turns an actor toward angle (TRIG_TURN a full turn; fdActorStepAngle), then
the script waits the given number of ticks.
References ActorStepAngleScript, fdActorLookup(), fdActorStartScriptStub(), fdScriptWait() and Sint32.
Referenced by fdActorFaceDirection(), fdActorJumpDownLedge(), fdClimbDown(), fdDjinnRunBattleStartHop(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect() and fdPsynergyRetreat().
Definition at line 875 of file script_commands_actor_commands.c.
fdActorSetSpritePriority
void fdActorSetSpritePriority(Sint32 actorId, Sint32 priority)
Fixes the priority of the actor's sprite, which then no longer follows its
depth: clears ACTOR_PRIORITY_AUTOMATIC.
References fdActorLookup() and Sint32.
Referenced by fdActorCenterOnColumn(), scAlpineCrossingFeizhiArrives(), scAlpineCrossingFreezePuddle(), scAlpineCrossingPrepareFrost(), scAltinApplyWaterLevel(), scAltinEnterDoor(), scAltinPeakRestoreHydrosStatueRoom(), scAltinPeakRunBoulderChase(), scAltinPeakUpdateFrostPillarPriority(), scBabiLighthouseMatchLeaderPriority(), scBabiLighthouseRedrawPillarMetatiles(), scBilibinCaveDouseIceRoomFire(), scBilibinCaveRestoreIceRoom(), scBilibinOpenDoorAndLeave(), scBilibinPullJillFromRiver(), scBilibinSetUpBarricade(), scColossoFadeInWarrior(), scCottageRoomsAGaretComesHome(), scCottageRoomsBDoraWakesIsaac(), scCrossboneIsleKeysInitBane(), scCrossboneIsleKeysUpdatePillarPriorities(), scCrossboneIsleMovePillar(), scCrossboneIslePlaceNorthSouthLog(), scCrossboneIslePlaceWestEastLog(), scCrossboneIsleRestorePillar(), scCrossboneIsleSteppingStonesFlipWaterSwitch(), scCrossboneIsleSteppingStonesUpdateLeaderPriority(), scFuchinFallsCavePlaceLogAtMetatile(), scImilFuchinFallsPrepareRoom(), scImilOpenDoorAndExit(), scImilPlaceMovedSnowman(), scInit(), scKalayTolbiDocksOpenDoorAndLeave(), scKalayTolbiDocksSettleCrates(), scKalayWatchTourGroupDeparture(), scKolimaForestEntranceWitnessForestCurse(), scKolimaForestTreeRejectHermesWater(), scKolimaWitnessForestCurse(), scLaliveroIodemGivesBlackOrb(), scLogRoomsADiscussMindReading(), scLogRoomsAReturnStolenGoods(), scLunpaFortressDonpaJudgesDodonpa(), scLunpaFortressInitUpperFloor(), scLunpaGuardsThrowIsaacOut(), scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieCallLift(), scMercuryLighthouseAerieConfrontSaturos(), scMercuryLighthouseAerieRideLiftDown(), scMercuryLighthouseDropLeaderToColumn(), scMercuryLighthouseJumpDownPastCrystal() and 52 more.
Definition at line 889 of file script_commands_actor_commands.c.
fdActorCopyGraphics
void fdActorCopyGraphics(Uint32 targetId, Uint32 srcId)
Makes the target actor's sprite show the source actor's graphics (its VRAM
block and tile). Neither actor is checked for NULL.
References fdActorGetById().
Referenced by scTolbiShipDeckRestOars() and scTolbiShipDeckSwingOar().
Definition at line 907 of file script_commands_actor_commands.c.
fdActorReservedNoOperation
void fdActorReservedNoOperation(void)
Definition at line 925 of file script_commands_actor_commands.c.
fdScriptSetMessageId
void fdScriptSetMessageId(Sint32 msg)
Sets the number of the script's next message.
References Sint32.
Referenced by dbIncreaseItemAndLevelEllipsisAndSpeak(), dbIncreaseItemAndLevelWinceAndSpeak(), dbMenuTestRunMessageTest(), fdRunPsynergyScript(), fdRunRaisedCue(), fdRunStepCueOrExit(), fdTalkToActor(), fdUseItem(), scAlpineCrossingFeizhiArrives(), scAlpineCrossingHamaReachesHsu(), scAlpineCrossingLiftBoulder(), scAlpineCrossingTalkToFeizhi(), scAltinAskAboutFirstVisit(), scAltinAskAboutHydros(), scAltinAskAboutRuins(), scAltinPeakCelebrateHydrosVictory(), scAltinPeakReadFallingRockSign(), scAltinTalkToArmorMerchant(), scAltinTalkToItemMerchant(), scAltinTalkToThirstyOldWoman(), scAltmillerCaveBabiCallsPartyBack(), scAltmillerCaveMeetInvisibleBabi(), scAltmillerCaveRepeatRockOrder(), scAltmillerCaveRestoreBabiAndInviteParty(), scAltmillerCaveTurnRock(), scBabiLighthouseExplainTruthDoor(), scBabiLighthouseFaranAsksPartyToOpenDoor(), scBabiLighthouseInspectTruthDoorSwitch(), scBabiPalaceAskAboutColosso(), scBabiPalaceAskAboutRemainingWarriors(), scBabiPalaceHearSoldiersReport(), scBabiPalaceMeetBabiAfterColosso(), scBabiPalaceOfferCloakBall(), scBabiPalaceOfferRest(), scBabiPalacePassOnBabisWord(), scBabiPalaceReadShebasMind(), scBabiPalaceRestInPalaceBeds(), scBabiPalaceShowBeds(), scBabiPalaceShowQuestionAnswer(), scBabiPalaceTalkToWarriorWithIndigestion(), scBabiPalaceThankForSavingBabi(), scBabiPalaceWakeAfterFinals(), scBabiPalaceWakeFromFinalsDream(), scBattleArenaAskToParticipate(), scBattleArenaChooseBattleMode(), scBattleArenaChooseDebugParamSet(), scBattleArenaEnterBattle(), scBattleArenaExplainPartyOrder(), scBattleArenaReportLinkDisconnected(), scBattleArenaReportMonsterRecord() and 615 more.
Definition at line 930 of file script_commands_actor_commands.c.
fdActorGetSpriteById
Sint32 fdActorGetSpriteById(Sint32 actorId)
Returns the sprite (the first animation's id) of the actor in the low 12 bits of actorId, or -1 if there is no such animated actor.
Referenced by fdActorClosePortrait(), fdMessageSetVoiceFromActor(), fdMessageShowAtActor(), fdScriptShowMessageAndWait() and fdScriptShowTwoMessagesAndWait().
Definition at line 937 of file script_commands_actor_commands.c.
fdActorFindBySprite
Sint32 fdActorFindBySprite(Sint32 sprite)
Returns the first of the scene's actors (ACTOR_FIRST_PLACED to ACTOR_LAST_ID)
showing sprite, or -1.
Definition at line 963 of file script_commands_actor_commands.c.