Skip to Content
The Alchemy Project

include/field/actor_script.h

Actor scripts: one Sint32 command word, then its operands, as ActorScriptCommandTable runs them. More…

Included by battle_unit_tables.c, actor_placement.c, actor_scripts.c, facing.c, field_actors.c, field_effect_data.c, field_effect_scripts.c, field_effect_tables.c, field_engine_cues.c, field_psynergy_summon_tablet.c, field_psynergy_tables.c, map_grid_data.c, script_commands_scripts.c, speaker_voices.c, airs_rock.c, airs_rock_inside.c, alhafra.c, alhafra_rooms.c, alhafran_cave.c, anemos_inner_sanctum.c, anemos_inner_sanctum_dullahan.c, ankohl_ruins.c, apojii_islands.c, apojii_islands_cave.c, aqua_rock.c, aqua_rock_inside.c, caverns.c, champa.c, champa_cliff_caves.c, contigo.c, daila.c, daila_rooms.c, dehkan_plateau.c, eastern_alhafra.c, eastern_alhafra_ship.c, gabomba_catacombs.c, gabomba_statue.c, gabomba_statue_chamber.c, gaia_rock.c, gaia_rock_inside.c, garoh.c, gondowan_cliffs.c, gondowan_cliffs_hideout.c, idejima.c, islet_cave.c, islets.c, izumo.c, izumo_rooms.c, izumo_ruins.c, jupiter_lighthouse_aerie.c and 56 more.

Macros

NameDescription
#defineSC_LABEL (n) (Sint32)(0x80000000 | (n) << 16)Mark label n, a jump's destination.
#defineSC_TO (n) (Sint32)(0xc0000000 | (n) << 16)Name label n as a jump's destination; fdActorScriptFindLabel matches it with SC_LABEL(n) without bit 30.
#defineSC_TOP 0Name the script's start as a jump's destination.
#defineSC_FOREVER 65535Give SC_LOOP a count that never runs out.
#defineSC_WAIT (n) SCRIPT_COMMAND_WAIT, (n)Wait n ticks, this one the first.
#defineSC_SYNC SCRIPT_COMMAND_SYNCWait until the actor reaches its target, or a solid actor has blocked it for 60 ticks.
#defineSC_POSITION (x, y, z)Stand still at (x, y, z).
#defineSC_POSITION_ORIGIN SCRIPT_COMMAND_POSITION_ORIGINStand at x and z 0, keeping the height.
#defineSC_MOVE (x, y, z) SCRIPT_COMMAND_MOVE, toFIXED(x), toFIXED(y), toFIX …Move toward (x, y, z).
#defineSC_MOVE_BY (x, y, z)Move toward the actor's place plus (x, y, z).
#defineSC_FACE_WATCHED SCRIPT_COMMAND_FACE_WATCHEDFace the watched actor.
#defineSC_MOVE_TO_WATCHED SCRIPT_COMMAND_MOVE_TO_WATCHEDMove toward the watched actor.
#defineSC_MOVE_LOCAL (a, b) SCRIPT_COMMAND_MOVE_LOCAL, (a), (b)Move toward the actor's place plus an offset that is never filled in; the operands are skipped unread.
#defineSC_WANDER (base, range, limit)Wander to random points base to base + range pixels away, within limit pixels of home; SC_WANDER_HOME heads home when outside it.
#defineSC_WANDER_HOME (base, range, limit)
#defineSC_APPROACH_WATCHED SCRIPT_COMMAND_APPROACH_WATCHEDFollow the watched actor to within 16 pixels.
#defineSC_CAMERA SCRIPT_COMMAND_CAMERAFollow the leader with the camera.
#defineSC_LOOP (n, to) SCRIPT_COMMAND_LOOP, (n), (to)Jump to label to n - 1 times, so what lies between runs n times; loops do not nest.
#defineSC_JUMP (to) SCRIPT_COMMAND_JUMP, (to)Jump to label to.
#defineSC_IF (to) SCRIPT_COMMAND_IF, (to)Jump to label to if the last test was true.
#defineSC_IFNOT (to) SCRIPT_COMMAND_IFNOT, (to)Jump to label to if the last test was false.
#defineSC_END SCRIPT_COMMAND_ENDEnd the script, handing the actor back to the idle script.
#defineSC_FLAG_CHECK (f) SCRIPT_COMMAND_FLAG_CHECK, (f)Test game flag f for SC_IF; ON, OFF and REV then set, clear or flip it.
#defineSC_FLAG_ON (f) SCRIPT_COMMAND_FLAG_ON, (f)
#defineSC_FLAG_OFF (f) SCRIPT_COMMAND_FLAG_OFF, (f)
#defineSC_FLAG_REV (f) SCRIPT_COMMAND_FLAG_REV, (f)
#defineSC_SET (w, v) SCRIPT_COMMAND_SET, (w), (v)Set the actor's value w (an ACTOR_SCRIPT_VALUE) to v.
#defineSC_ADD (w, v) SCRIPT_COMMAND_ADD, (w), (v)Add v to the actor's value w.
#defineSC_CMP (w, v) SCRIPT_COMMAND_CMP, (w), (v)Test whether the actor's value w equals v, for SC_IF.
#defineSC_SPEED (speed) SC_SET(SW_SPEED, toFIXED(speed))Set the speed limit, in pixels a tick: SC_SPEED(0.8).
#defineSC_ACCELERATION (acceleration)Set the acceleration, in pixels a tick per tick.
#defineSC_SQUASH_BOUNCEOne bounce: the actor squashes a quarter wider and an eighth shorter, then stretches back in three steps, 10 ticks in all.
#defineSC_PLAYER SCRIPT_COMMAND_PLAYERThe leader's controls: each moves the leader for one tick, and the leader's script loops on one (ActorPlayerScript).
#defineSC_WORLD SCRIPT_COMMAND_WORLDWalk on the World Map by the direction pad.
#defineSC_KEYS SCRIPT_COMMAND_KEYSClimb a wall 8 pixels at a time by the direction pad.
#defineSC_ROPE SCRIPT_COMMAND_ROPECross a rope.
#defineSC_TIGHTROPE SCRIPT_COMMAND_TIGHTROPECross a tightrope.
#defineSC_SAND SCRIPT_COMMAND_SANDMove as sand (the Sand Psynergy).
#defineSC_SAIL SCRIPT_COMMAND_SAILSail the ship on a map.
#defineSC_WORLD_SAIL SCRIPT_COMMAND_WORLD_SAILSail the ship on the World Map.
#defineSC_WORLD_FLY SCRIPT_COMMAND_WORLD_FLYFly the ship on the World Map.
#defineSC_WORLD_SAND SCRIPT_COMMAND_WORLD_SANDMove as sand on the World Map.
#defineSC_HOVER SCRIPT_COMMAND_HOVERHover over what lies below (the Hover Psynergy).
#defineSC_WALK SCRIPT_COMMAND_WALKWalk at one pace, a pixel a tick whatever the keys.
#defineSC_CHECK_KEYS SCRIPT_COMMAND_CHECK_KEYSAnswer the menu, examine and shortcut keys the player has set (fdCheckConfiguredKeys), then go on.
#defineSC_RELEASE SCRIPT_COMMAND_RELEASERelease the actor and its sprites.
#defineSC_ANIMATION (v) SCRIPT_COMMAND_ANIMATION, (v)Switch the sprites to animation v.
#defineSC_NOP (v) SCRIPT_COMMAND_NOP, (v)Skip operand v.
#defineSC_SE (n) SCRIPT_COMMAND_SE, (n)Play sound n.
#defineSC_SE_IN_VIEW (n) SCRIPT_COMMAND_SE_IN_VIEW, (n)Play sound n if the actor is in the camera's view.
#defineSC_GOTO (script) SCRIPT_COMMAND_GOTO, (Sint32)(script)Continue in another script.
#defineSC_HIDE_SPRITES SCRIPT_COMMAND_HIDE_SPRITESHide the sprites (ACTOR_SPRITE_NONE).
#defineSC_SHOW_SPRITE SCRIPT_COMMAND_SHOW_SPRITEShow one sprite (ACTOR_SPRITE_ONE).
#defineSC_CALL (fn) SCRIPT_COMMAND_CALL, (Sint32)(fn)Call fn with the actor each tick until it returns zero.
#defineSC_CAMERA_IN_BOUNDS SCRIPT_COMMAND_CAMERA_IN_BOUNDSFollow the watched actor with the camera, keeping the view in the room's bounds.
#defineSC_MOVE_XZ (x, z) SCRIPT_COMMAND_MOVE_XZ, toFIXED(x), toFIXED(z)Move toward (x, z) at the same height.

Enumerations

NameDescription
enumACTOR_SCRIPT_COMMAND { SCRIPT_COMMAND_WAIT, SCRIPT_COMMAND_SYNC, SCRIPT_COMMAND_POS … }The script commands, numbered by their place in ActorScriptCommandTable; the SC_ macros below write each with its operands.
enumACTOR_SCRIPT_VALUE { SW_SCRIPT, SW_CURSOR, SW_FACING_DUPLICATE, SW_FACING, SW_X, … }The values of an actor SC_SET, SC_ADD and SC_CMP reach, each a field of ACTOR, numbered by their place in ActorScriptOperandHandlerTable.

Description

Actor scripts: one Sint32 command word, then its operands, as ActorScriptCommandTable runs them. Each macro expands to the words of one command. The script stores positions and speeds in 16.16 fixed point; its macros take plain pixels and decimal speeds and convert them.

Macros in detail

SC_LABEL

#define SC_LABEL(n) (Sint32)(0x80000000 | (n) << 16)

Mark label n, a jump's destination.

Referenced by ActorSandPuffScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumSparkScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockSlowFishScript, CrumbsScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, DebrisScript, GabombaStatueChamberChestDescendsScript, GabombaStatueChargeBurstScript, GabombaStatueChargeShrinkScript, GaiaRockWindScript, IceChipsScript, IdejimaStretchScript, IsletsBirdCirclesScript, IzumoFifthDanceScript, IzumoFirstDanceScript, IzumoFourthDanceScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, IzumoSecondDanceScript, IzumoSixthDanceScript, IzumoThirdDanceScript, JupiterLighthouseBeaconOrbBreathesScript, JupiterLighthouseBeaconParticleScript, JupiterLighthouseBeaconSparkScript, KibomboShebaMeetsPiersScript, KibomboWarriorsDanceScript, LemuriaLonelyChildWalk, LemuriaSpoiledChildWalk, LohoVillagerPaces, LohoVillagerReturns, MadraCatacombsFlameFlaresUp, MadraCatacombsGreatFlameFlaresUp, MadraRoomsShinLifted, MarsLighthouseAerieBeaconFireScript, MarsLighthouseAerieBeaconSparkScript, MarsLighthouseAerieWatchGoldenSunRiseScript, MarsLighthouseDragonFaceWestFlameThrowerRoute, MarsLighthouseHallFlamePuffSwellScript, MarsLighthouseTowersButtonFlameThrowerRoute, MarsLighthouseTowersJupiterEastFlameThrowerRoute and 21 more.

Definition at line 69 of file actor_script.h.

SC_TO

#define SC_TO(n) (Sint32)(0xc0000000 | (n) << 16)

Name label n as a jump's destination; fdActorScriptFindLabel matches it with SC_LABEL(n) without bit 30.

Referenced by ActorSandPuffScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumSparkScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockSlowFishScript, CrumbsScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, DebrisScript, GabombaStatueChamberChestDescendsScript, GabombaStatueChargeBurstScript, GabombaStatueChargeShrinkScript, GaiaRockWindScript, IceChipsScript, IdejimaStretchScript, IsletsBirdCirclesScript, IzumoFifthDanceScript, IzumoFirstDanceScript, IzumoFourthDanceScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, IzumoSecondDanceScript, IzumoSixthDanceScript, IzumoThirdDanceScript, JupiterLighthouseBeaconOrbBreathesScript, JupiterLighthouseBeaconParticleScript, JupiterLighthouseBeaconSparkScript, KibomboShebaMeetsPiersScript, LemuriaLonelyChildWalk, LemuriaSpoiledChildWalk, LohoVillagerPaces, LohoVillagerReturns, MadraCatacombsFlameFlaresUp, MadraCatacombsGreatFlameFlaresUp, MadraRoomsShinLifted, MarsLighthouseAerieBeaconFireScript, MarsLighthouseAerieBeaconSparkScript, MarsLighthouseAerieWatchGoldenSunRiseScript, MarsLighthouseDragonFaceWestFlameThrowerRoute, MarsLighthouseHallFlamePuffSwellScript, MarsLighthouseTowersButtonFlameThrowerRoute, MarsLighthouseTowersJupiterEastFlameThrowerRoute, MarsLighthouseTowersJupiterFarFlameThrowerRoute and 19 more.

Definition at line 72 of file actor_script.h.

SC_TOP

#define SC_TOP 0

Name the script's start as a jump's destination.

Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorHoverScript, ActorKeyCheckScript, ActorKeysScript, ActorPlayerScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandScript, ActorTightropeScript, ActorWalkingScript, ActorWorldMapScript, AirsRockRubbleScript, AlhafraLookAroundScript, AnemosInnerSanctumDullahanLightGrowsScript, AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumShortScript, AquaRockInsideSplashScript, ContigoDoubtingBoyScript, ContigoEnterSanctumDoorScript, ContigoGirlOnTheShipScript, ContigoJoinLeaderScript, ContigoPuzzledWorkerScript, ContigoShiverScript, FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript, FieldEffectSourceHoldScript, GabombaStatueChamberChestRisesScript, GabombaStatueChamberSpinScript, GaiaRockInsideAltarDropsScript, GaiaRockInsideAltarShakesScript, GaiaRockInsideSerpentGlowScript, GaiaRockInsideSerpentSmokeScript, GaiaRockWindScript, GarohWerewolfLookAroundScript, IsletsEastTundariaWalkScript, IsletsPacingSonScript, IsletsPengusChasesPengulinaScript, IsletsSpinScript, ItemDisplayPulseScript, ItemDisplaySparkleScript, JupiterLighthouseAgatioFightsScript and 73 more.

Definition at line 74 of file actor_script.h.

SC_FOREVER

#define SC_FOREVER 65535

Give SC_LOOP a count that never runs out.

Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorHoverScript, ActorKeyCheckScript, ActorKeysScript, ActorPlayerScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandScript, ActorTightropeScript, ActorWalkingScript, ActorWorldMapScript, AlhafraLookAroundScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockSlowFishScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, ContigoJoinLeaderScript, ContigoPuzzledWorkerScript, ContigoShiverScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, fdActorScriptRepeatOrJump(), FieldEffectSourceHoldScript, GaiaRockInsideAltarDropsScript, GaiaRockInsideAltarShakesScript, GarohWerewolfLookAroundScript, IsletsBirdCirclesScript, IsletsEastTundariaWalkScript, IsletsPacingSonScript, IsletsPengusChasesPengulinaScript, ItemDisplayPulseScript, IzumoFifthDanceScript, IzumoFirstDanceScript, IzumoFourthDanceScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, IzumoSecondDanceScript, IzumoSixthDanceScript, IzumoThirdDanceScript, JupiterLighthouseAgatioFightsScript and 69 more.

Definition at line 76 of file actor_script.h.

SC_WAIT

#define SC_WAIT(n) SCRIPT_COMMAND_WAIT, (n)

Wait n ticks, this one the first.

Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorFootprintScript, ActorHoverScript, ActorKeyCheckScript, ActorKeysScript, ActorLaunchScript, ActorPlayerScript, ActorRippleScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandPuffScript, ActorSandScript, ActorSplashScript, ActorTightropeScript, ActorWaitScript, ActorWalkingScript, ActorWorldMapScript, AirsRockInsidePooledWhirlwindFadesScript, AirsRockInsideWhirlwindFadesScript, AirsRockInsideWhirlwindRisesScript, AirsRockRubbleScript, AirsRockWhirlwindFadesScript, AirsRockWhirlwindRisesScript, AlhafraElderStepsBackScript, AlhafraLookAroundScript, AlhafranCaveGuardStepsAsideScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDullahanLightGrowsScript, AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumFadingSparkScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumShortScript, AnemosInnerSanctumSparkScript, AnemosInnerSanctumSwitchGlowScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockInsideSplashScript, AquaRockSlowFishScript, ChampaCliffCavesChaseToEastScript, ChampaCliffCavesChaseToNorthScript, ChampaCliffCavesChaseToSouthScript and 287 more.

Definition at line 79 of file actor_script.h.

SC_SYNC

#define SC_SYNC SCRIPT_COMMAND_SYNC

Wait until the actor reaches its target, or a solid actor has blocked it for 60 ticks.

Referenced by ActorLaunchScript, ActorOffsetScript, AirsRockInsideRisingSparkScript, AlhafraAlhafranLeadsBehindFelixScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraElderStepsBackScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveVisitorsLeaveScript, AlhafraRoomsTravelersWalkOffScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AlhafraWomanWalksOffScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockInsideTabletGlowScript, AquaRockSlowFishScript, ChampaCliffCavesChaseToEastScript, ChampaCliffCavesChaseToNorthScript, ChampaCliffCavesChaseToSouthScript, ChampaCliffCavesChaseToWestScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, ContigoJennaReunionScript, ContigoJoinLeaderScript, ContigoKradenReunionScript, ContigoLeaderVisitsScript, ContigoPiersReunionScript, ContigoRejoinLeaderScript, ContigoShebaReunionScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, EasternAlhafraFirstWorkerCheerScript, EasternAlhafraFirstWorkerRunScript, EasternAlhafraRunOffScript, EasternAlhafraSecondWorkerCheerScript, EasternAlhafraSecondWorkerRunScript, EasternAlhafraShipBriggsRunsScript, EasternAlhafraShipLeaveUpTheStairsScript and 259 more.

Definition at line 82 of file actor_script.h.

SC_POSITION

#define SC_POSITION(x, y, z)

Stand still at (x, y, z).

Referenced by AirsRockInsidePooledWhirlwindFadesScript, AirsRockRubbleScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumShortScript, DustBurstScript, DustScatterScript, FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript, GabombaStatueChamberChestDescendsScript, GabombaStatueChargeBurstScript, GabombaStatueChargeShrinkScript, GaiaRockInsideSerpentGlowScript, GaiaRockInsideSerpentSmokeScript, IdejimaKradenStepsAsideScript, JupiterLighthouseBeaconParticleScript, JupiterLighthouseBeaconSparkScript, JupiterLighthouseBeamOpenScript, LohoFirstMinerFetchesCannon, LohoFirstMinerGoesToWall, MadraRoomsCharFollows, MadraRoomsOldManComesBack, MadraRoomsWifeComesBack, OrbRisingScript, ScriptedPartScript, TreasureIsleRockSpray and WorldMapIdejimaWakeScript.

Definition at line 84 of file actor_script.h.

SC_POSITION_ORIGIN

#define SC_POSITION_ORIGIN SCRIPT_COMMAND_POSITION_ORIGIN

Stand at x and z 0, keeping the height.

Referenced by AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, ContigoJoinLeaderScript, ContigoRejoinLeaderScript, DehkanPlateauDustScript, GabombaCatacombsSplashScript, GabombaStatueChamberChestRisesScript, GabombaStatueChamberRejoinLeaderScript, GabombaStatueLookAtChannelScript, GaiaRockInsideBurstScript, GaiaRockInsidePourScript, IdejimaGoAfterAlexScript, IdejimaJoinTheLeaderScript, IsletsWadingSplashScript, JupiterLighthouseBeaconParticleScript, KandoreanTempleSplashScript, KandoreanTempleSteamScript, KibomboEmberScript, KibomboPartyFollowsScript, KibomboPartyGathersScript, KibomboPartyLeavesDeadEndScript, LemurianShipDeckReachPiersShipScript, LemurianShipDeckSparkleFades, LemurianShipDeckSplashFades, LemurianShipJellyMelts, LemurianShipLightToOrb, LohoFirstMinerGoesToWall, LohoFirstMinerWalksBack, MadraRoomsOldManWalksToBackRoom, MadraRoomsWifeWalksToBackRoom, MagmaRockEmberScript, MagmaRockFlameEmberScript, MarsLighthouseAerieBeaconSparkScript, MarsLighthouseAerieBeamRiseScript, MarsLighthouseAerieBeamShootUpScript, MarsLighthouseAerieWiseOneShrinkScript, MarsLighthouseHallFlamePuffSwellScript, MarsLighthouseHallFlamePuffThrownScript, MarsLighthouseStarRoomAgatioDragonShrinkScript, MarsLighthouseStarRoomKarstDragonShrinkScript, MarsLighthouseStarRoomLightSinkScript, ProxGaretRunsAhead, ProxJennaRunsAhead, ProxJennasFatherWalksSouth, ProxJennasMotherWalksSouth, ProxLeftFileWalksSouth, ProxRightFileWalksSouth, ProxStepBackFromPuelle, ShamanVillageReturnToLeaderAtHouseScript, ShamanVillageReturnToLeaderAtSandScript and 4 more.

Definition at line 87 of file actor_script.h.

SC_MOVE

#define SC_MOVE(x, y, z) SCRIPT_COMMAND_MOVE, toFIXED(x), toFIXED(y), toFIXED(z)

Move toward (x, y, z).

Referenced by AlhafraAlhafranLeadsBehindFelixScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveVisitorsLeaveScript, AlhafraRoomsTravelersWalkOffScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AlhafraWomanWalksOffScript, ApojiiIslandsPaceScript, ChampaCliffCavesChaseToEastScript, ChampaCliffCavesChaseToNorthScript, ChampaCliffCavesChaseToSouthScript, ChampaCliffCavesChaseToWestScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, ContigoJennaReunionScript, ContigoJoinLeaderScript, ContigoKradenReunionScript, ContigoLeaderVisitsScript, ContigoPiersReunionScript, ContigoRejoinLeaderScript, ContigoShebaReunionScript, DailaRoomsPacingScript, EasternAlhafraFirstWorkerRunScript, EasternAlhafraRunOffScript, EasternAlhafraSecondWorkerRunScript, EasternAlhafraShipBriggsRunsScript, EasternAlhafraShipLeaveUpTheStairsScript, EasternAlhafraShipMateRunsScript, GabombaStatueAkafubuComesUpScript, GabombaStatueChamberPartyLeavesScript, GabombaStatueChamberRejoinLeaderScript, GabombaStatueChamberWalkOffScript, GabombaStatueJennaFocusScript, GabombaStatueJennaWatchesScript, GabombaStatueKradenFocusScript, GabombaStatueKradenPointsScript, GabombaStatueLeaderFocusScript, GabombaStatueLookAtChannelScript and 187 more.

Definition at line 89 of file actor_script.h.

SC_MOVE_BY

#define SC_MOVE_BY(x, y, z)

Move toward the actor's place plus (x, y, z).

Referenced by AirsRockInsideRisingSparkScript, AlhafraAlhafranLeadsBehindFelixScript, AlhafraElderStepsBackScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveVisitorsLeaveScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AquaRockInsideTabletGlowScript, EasternAlhafraFirstWorkerCheerScript, EasternAlhafraFirstWorkerRunScript, EasternAlhafraRunOffScript, EasternAlhafraSecondWorkerCheerScript, EasternAlhafraSecondWorkerRunScript, EasternAlhafraShipBriggsRunsScript, EasternAlhafraShipMateRunsScript, GaiaRockInsideAltarDropsScript, GaiaRockInsideAltarShakesScript, GaiaRockInsideRisingSparkScript, IsletsDogHopsFacingEastScript, IsletsDogHopsFacingWestScript, JupiterLighthouseFelixArrivesEastScript, JupiterLighthouseFelixArrivesWestScript, JupiterLighthouseShebaArrivesEastScript, LessonAdeptRiseScript, LessonAdeptSettleScript, LessonTabletRiseScript, LessonTabletSettleScript, LohoCannonRises, LohoSecondMinerStepsUp, LohoThirdMinerStepsUp, MagmaRockInsideRisingSparkScript and WorldMapIdejimaDriftScript.

Definition at line 91 of file actor_script.h.

SC_FACE_WATCHED

#define SC_FACE_WATCHED SCRIPT_COMMAND_FACE_WATCHED

Face the watched actor.

Referenced by ActorFaceWatchedScript and FieldEffectSourceHoldScript.

Definition at line 94 of file actor_script.h.

SC_MOVE_TO_WATCHED

#define SC_MOVE_TO_WATCHED SCRIPT_COMMAND_MOVE_TO_WATCHED

Move toward the watched actor.

Definition at line 96 of file actor_script.h.

SC_MOVE_LOCAL

#define SC_MOVE_LOCAL(a, b) SCRIPT_COMMAND_MOVE_LOCAL, (a), (b)

Move toward the actor's place plus an offset that is never filled in; the operands are skipped unread.

Definition at line 99 of file actor_script.h.

SC_WANDER

#define SC_WANDER(base, range, limit)

Wander to random points base to base + range pixels away, within limit pixels of home; SC_WANDER_HOME heads home when outside it.

Definition at line 102 of file actor_script.h.

SC_WANDER_HOME

#define SC_WANDER_HOME(base, range, limit)

Referenced by DailaRoomsLookAroundScript, MovementTypeWanderCloseScript, MovementTypeWanderNearScript and MovementTypeWanderScript.

Definition at line 104 of file actor_script.h.

SC_APPROACH_WATCHED

#define SC_APPROACH_WATCHED SCRIPT_COMMAND_APPROACH_WATCHED

Follow the watched actor to within 16 pixels.

Referenced by ActorApproachWatchedScript.

Definition at line 107 of file actor_script.h.

SC_CAMERA

#define SC_CAMERA SCRIPT_COMMAND_CAMERA

Follow the leader with the camera.

Referenced by ActorCameraScript.

Definition at line 109 of file actor_script.h.

SC_LOOP

#define SC_LOOP(n, to) SCRIPT_COMMAND_LOOP, (n), (to)

Jump to label to n - 1 times, so what lies between runs n times; loops do not nest.

Referenced by ActorApproachWatchedScript, ActorCameraScript, ActorFaceWatchedScript, ActorFlyScript, ActorHoverScript, ActorKeyCheckScript, ActorKeysScript, ActorPlayerScript, ActorRopeScript, ActorSailOnMapScript, ActorSailScript, ActorSandOnWorldMapScript, ActorSandPuffScript, ActorSandScript, ActorTightropeScript, ActorWalkingScript, ActorWorldMapScript, AirsRockRubbleScript, AlhafraLookAroundScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDullahanLightGrowsScript, AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumShortScript, AnemosInnerSanctumSparkScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockInsideSplashScript, AquaRockSlowFishScript, ContigoDoubtingBoyScript, ContigoEnterSanctumDoorScript, ContigoGirlOnTheShipScript, ContigoJoinLeaderScript, ContigoPuzzledWorkerScript, ContigoShiverScript, CrumbsScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, DebrisScript, FieldEffectLongScript, FieldEffectMediumScript, FieldEffectShortScript, FieldEffectSourceHoldScript, GabombaStatueChamberChestDescendsScript and 135 more.

Definition at line 112 of file actor_script.h.

SC_JUMP

#define SC_JUMP(to) SCRIPT_COMMAND_JUMP, (to)

Jump to label to.

Definition at line 114 of file actor_script.h.

SC_IF

#define SC_IF(to) SCRIPT_COMMAND_IF, (to)

Jump to label to if the last test was true.

Definition at line 116 of file actor_script.h.

SC_IFNOT

#define SC_IFNOT(to) SCRIPT_COMMAND_IFNOT, (to)

Jump to label to if the last test was false.

Referenced by MarsLighthouseTowersButtonFlameThrowerRoute.

Definition at line 118 of file actor_script.h.

SC_END

#define SC_END SCRIPT_COMMAND_END

End the script, handing the actor back to the idle script.

Referenced by ActorIdleScript, ActorLaunchScript, ActorOffsetScript, ActorScriptEndScript, ActorScriptIdleScript, ActorStepAngleScript, AirsRockInsideOrbitingSparkScript, AirsRockInsidePooledWhirlwindFadesScript, AirsRockInsideRisingSparkScript, AirsRockInsideWhirlwindFadesScript, AirsRockInsideWhirlwindRisesScript, AirsRockInsideWindStoneScript, AirsRockWindStoneScript, AlhafraAlhafranLeadsBehindFelixScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraElderStepsBackScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveVisitorsLeaveScript, AlhafraRoomsTravelersWalkOffScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AlhafraWomanWalksOffScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDullahanDragonStatueScript, AnemosInnerSanctumDullahanLightGrowsScript, AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumFadingSparkScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumNoShadowScript, AnemosInnerSanctumOrbScript, AnemosInnerSanctumShortScript, AnemosInnerSanctumSparkScript, AnemosInnerSanctumSwitchGlowScript, AnkohlRuinsFaceHalfScript and 359 more.

Definition at line 120 of file actor_script.h.

SC_FLAG_CHECK

#define SC_FLAG_CHECK(f) SCRIPT_COMMAND_FLAG_CHECK, (f)

Test game flag f for SC_IF; ON, OFF and REV then set, clear or flip it.

Referenced by MarsLighthouseTowersButtonFlameThrowerRoute.

Definition at line 122 of file actor_script.h.

SC_FLAG_ON

#define SC_FLAG_ON(f) SCRIPT_COMMAND_FLAG_ON, (f)

Definition at line 123 of file actor_script.h.

SC_FLAG_OFF

#define SC_FLAG_OFF(f) SCRIPT_COMMAND_FLAG_OFF, (f)

Definition at line 124 of file actor_script.h.

SC_FLAG_REV

#define SC_FLAG_REV(f) SCRIPT_COMMAND_FLAG_REV, (f)

Definition at line 125 of file actor_script.h.

SC_SET

#define SC_SET(w, v) SCRIPT_COMMAND_SET, (w), (v)

Set the actor's value w (an ACTOR_SCRIPT_VALUE) to v.

Referenced by ActorSandPuffScript, AirsRockInsideWindStoneScript, AirsRockWindStoneScript, AlhafraAlhafranLeadsBehindFelixScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraElderStepsBackScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraLookAroundScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveGuardStepsAsideScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumSparkScript, AnkohlRuinsFaceHalfScript, AnkohlRuinsGreatFaceScript, AnkohlRuinsWeedsScript, ApojiiIslandsCaveWeedsScript, ApojiiIslandsPaceScript, ContigoEnterSanctumDoorScript, ContigoJennaReunionScript, ContigoKradenReunionScript, ContigoLeaderVisitsScript, ContigoPiersReunionScript, ContigoPuzzledWorkerScript, ContigoShebaReunionScript, ContigoShiverScript, CrumbsScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, DebrisScript, DehkanPlateauDustScript, DustBurstScript, DustScatterScript, EasternAlhafraFirstWorkerCheerScript, EasternAlhafraFirstWorkerRunScript, EasternAlhafraSecondWorkerCheerScript and 222 more.

Definition at line 127 of file actor_script.h.

SC_ADD

#define SC_ADD(w, v) SCRIPT_COMMAND_ADD, (w), (v)

Add v to the actor's value w.

Referenced by ActorSandPuffScript, AirsRockRubbleScript, AnemosInnerSanctumDjinniRisesScript, AnemosInnerSanctumDjinniSinksScript, AnemosInnerSanctumDullahanLightGrowsScript, AnemosInnerSanctumDullahanLightShrinksScript, AnemosInnerSanctumDullahanShadowScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumSparkScript, ContigoEnterSanctumDoorScript, ContigoShiverScript, DailaFallenOldManScript, EmoteBubbleScript, GabombaStatueChamberChestDescendsScript, GabombaStatueChamberChestRisesScript, GabombaStatueChamberSpinScript, GabombaStatueChargeBurstScript, GabombaStatueChargeShrinkScript, GaiaRockWindScript, GarohWallLampScript, IdejimaStretchScript, IsletCaveShrunkFireScript, IsletsSpinScript, ItemDisplaySparkleScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, JupiterLighthouseBeaconOrbBreathesScript, JupiterLighthouseBeaconParticleScript, JupiterLighthouseBeaconSparkScript, JupiterLighthouseBeamOpenScript, JupiterLighthouseBringInScript, JupiterLighthouseGaretHangsScript, JupiterLighthouseNarrowBeamScript, JupiterLighthouseRockScript, KibomboEyesPopScript, KibomboMountainsHoldRaisedScript, KibomboShebaMeetsPiersScript, LeaderWalkThroughDoorScript, LemurianShipHydraForms, LemurianShipJellyMelts, LemurianShipPuddleSpreads, MadraCatacombsFlameFlaresUp, MadraCatacombsGreatFlameFlaresUp, MadraRoomsShinLifted, MarsLighthouseAerieBeaconFireScript, MarsLighthouseAerieBeaconSparkScript, MarsLighthouseAerieBeamNarrowScript, MarsLighthouseAerieBeamRiseScript and 25 more.

Definition at line 129 of file actor_script.h.

SC_CMP

#define SC_CMP(w, v) SCRIPT_COMMAND_CMP, (w), (v)

Test whether the actor's value w equals v, for SC_IF.

Definition at line 131 of file actor_script.h.

SC_SPEED

#define SC_SPEED(speed) SC_SET(SW_SPEED, toFIXED(speed))

Set the speed limit, in pixels a tick: SC_SPEED(0.8).

Referenced by ApojiiIslandsPaceScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, FieldEffectFragmentScript, IsletsBirdCirclesScript, IsletsEastTundariaWalkScript, IzumoFifthDanceScript, IzumoFirstDanceScript, IzumoFourthDanceScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, IzumoSecondDanceScript, IzumoSixthDanceScript, IzumoThirdDanceScript, JupiterLighthouseHopEastOverPlatformsScript, JupiterLighthouseHopWestOverPlatformsScript, JupiterLighthouseWalkToPlatformsScript, KibomboMountainsDogRunScript, KibomboMountainsFirstGuardPaceScript, KibomboMountainsPaceScript, KibomboMountainsSecondGuardPaceScript, KibomboMountainsWatchScript, KibomboWarriorsDanceScript, LemuriaLonelyChildWalk, LemuriaSpoiledChildWalk, LohoShopkeeperToEastCounter, LohoShopkeeperToSouthCounter, MarsLighthouseBalmFlameThrowerRoute, MarsLighthouseDragonFaceEastFlameThrowerRoute, MarsLighthouseDragonFaceWestFlameThrowerRoute, MarsLighthouseEntranceDragonFaceAtWestEnd, MarsLighthouseEntranceDragonFaceCrawlsWest, MarsLighthouseEntranceEastFlameThrowerRoute, MarsLighthouseEntranceWestFlameThrowerRoute, MarsLighthouseTowersButtonFlameThrowerRoute, MarsLighthouseTowersJupiterEastFlameThrowerRoute, MarsLighthouseTowersJupiterFarFlameThrowerRoute, MarsLighthouseTowersJupiterLowerFlameThrowerSetUp, MarsLighthouseTowersJupiterWestFlameThrowerRoute, MarsLighthouseTowersMercuryFlameThrowerRoute, MarsLighthouseTowersVenusEastFlameThrowerRoute, MarsLighthouseTowersVenusWestFlameThrowerRoute, MikasallaChickenPaces, MikasallaRoomsDaughterInLawPaces, MikasallaRoomsWorriedWifePaces and 10 more.

Definition at line 133 of file actor_script.h.

SC_ACCELERATION

#define SC_ACCELERATION(acceleration)

Set the acceleration, in pixels a tick per tick.

Referenced by ApojiiIslandsPaceScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript, IsletsBirdCirclesScript, IsletsEastTundariaWalkScript, IzumoFifthDanceScript, IzumoFirstDanceScript, IzumoFourthDanceScript, IzumoRoomsFirstDancerScript, IzumoRoomsHeavingScript, IzumoRoomsKushinadaHeavingScript, IzumoRoomsSecondDancerScript, IzumoSecondDanceScript, IzumoSixthDanceScript, IzumoThirdDanceScript, JupiterLighthouseHopEastOverPlatformsScript, JupiterLighthouseHopWestOverPlatformsScript, JupiterLighthouseWalkToPlatformsScript, KibomboMountainsDogRunScript, KibomboMountainsFirstGuardPaceScript, KibomboMountainsPaceScript, KibomboMountainsSecondGuardPaceScript, KibomboMountainsWatchScript, KibomboWarriorsDanceScript, LemuriaLonelyChildWalk, LemuriaSpoiledChildWalk, MarsLighthouseBalmFlameThrowerRoute, MarsLighthouseDragonFaceEastFlameThrowerRoute, MarsLighthouseDragonFaceWestFlameThrowerRoute, MarsLighthouseEntranceDragonFaceAtWestEnd, MarsLighthouseEntranceDragonFaceCrawlsWest, MarsLighthouseEntranceEastFlameThrowerRoute, MarsLighthouseEntranceWestFlameThrowerRoute, MarsLighthouseTowersButtonFlameThrowerRoute, MarsLighthouseTowersJupiterEastFlameThrowerRoute, MarsLighthouseTowersJupiterFarFlameThrowerRoute, MarsLighthouseTowersJupiterLowerFlameThrowerSetUp, MarsLighthouseTowersJupiterWestFlameThrowerRoute, MarsLighthouseTowersMercuryFlameThrowerRoute, MarsLighthouseTowersVenusEastFlameThrowerRoute, MarsLighthouseTowersVenusWestFlameThrowerRoute, MikasallaChickenPaces, MikasallaRoomsDaughterInLawPaces, MikasallaRoomsWorriedWifePaces, MikasallaSheepPaces, MovementTypeWanderCloseScript, MovementTypeWanderNearScript and 7 more.

Definition at line 135 of file actor_script.h.

SC_SQUASH_BOUNCE

#define SC_SQUASH_BOUNCE

One bounce: the actor squashes a quarter wider and an eighth shorter, then stretches back in three steps, 10 ticks in all.

Referenced by MovementTypeSquashScript.

Definition at line 139 of file actor_script.h.

SC_PLAYER

#define SC_PLAYER SCRIPT_COMMAND_PLAYER

The leader's controls: each moves the leader for one tick, and the leader's script loops on one (ActorPlayerScript). Walk or run on the field by the direction pad.

Referenced by ActorPlayerScript.

Definition at line 151 of file actor_script.h.

SC_WORLD

#define SC_WORLD SCRIPT_COMMAND_WORLD

Walk on the World Map by the direction pad.

Referenced by ActorWorldMapScript.

Definition at line 153 of file actor_script.h.

SC_KEYS

#define SC_KEYS SCRIPT_COMMAND_KEYS

Climb a wall 8 pixels at a time by the direction pad.

Referenced by ActorKeysScript.

Definition at line 155 of file actor_script.h.

SC_ROPE

#define SC_ROPE SCRIPT_COMMAND_ROPE

Cross a rope.

Referenced by ActorRopeScript.

Definition at line 157 of file actor_script.h.

SC_TIGHTROPE

#define SC_TIGHTROPE SCRIPT_COMMAND_TIGHTROPE

Cross a tightrope.

Referenced by ActorTightropeScript.

Definition at line 159 of file actor_script.h.

SC_SAND

#define SC_SAND SCRIPT_COMMAND_SAND

Move as sand (the Sand Psynergy).

Referenced by ActorSandScript.

Definition at line 161 of file actor_script.h.

SC_SAIL

#define SC_SAIL SCRIPT_COMMAND_SAIL

Sail the ship on a map.

Referenced by ActorSailOnMapScript.

Definition at line 163 of file actor_script.h.

SC_WORLD_SAIL

#define SC_WORLD_SAIL SCRIPT_COMMAND_WORLD_SAIL

Sail the ship on the World Map.

Referenced by ActorSailScript.

Definition at line 165 of file actor_script.h.

SC_WORLD_FLY

#define SC_WORLD_FLY SCRIPT_COMMAND_WORLD_FLY

Fly the ship on the World Map.

Referenced by ActorFlyScript.

Definition at line 167 of file actor_script.h.

SC_WORLD_SAND

#define SC_WORLD_SAND SCRIPT_COMMAND_WORLD_SAND

Move as sand on the World Map.

Referenced by ActorSandOnWorldMapScript.

Definition at line 169 of file actor_script.h.

SC_HOVER

#define SC_HOVER SCRIPT_COMMAND_HOVER

Hover over what lies below (the Hover Psynergy).

Referenced by ActorHoverScript.

Definition at line 171 of file actor_script.h.

SC_WALK

#define SC_WALK SCRIPT_COMMAND_WALK

Walk at one pace, a pixel a tick whatever the keys.

Referenced by ActorWalkingScript.

Definition at line 173 of file actor_script.h.

SC_CHECK_KEYS

#define SC_CHECK_KEYS SCRIPT_COMMAND_CHECK_KEYS

Answer the menu, examine and shortcut keys the player has set (fdCheckConfiguredKeys), then go on.

Referenced by ActorKeyCheckScript.

Definition at line 176 of file actor_script.h.

SC_RELEASE

#define SC_RELEASE SCRIPT_COMMAND_RELEASE

Release the actor and its sprites.

Referenced by ActorFootprintScript, ActorRippleScript, ActorSandPuffScript, ActorSplashScript, ActorWaitScript, AirsRockInsideOrbitingSparkScript, AirsRockInsideRisingSparkScript, AirsRockInsideWhirlwindFadesScript, AirsRockInsideWhirlwindRisesScript, AirsRockRubbleScript, AirsRockWhirlwindFadesScript, AirsRockWhirlwindRisesScript, AnemosInnerSanctumDustScript, AnemosInnerSanctumFadingSparkScript, AnemosInnerSanctumLongScript, AnemosInnerSanctumMediumScript, AnemosInnerSanctumOrbScript, AnemosInnerSanctumShortScript, AnemosInnerSanctumSparkScript, AnemosInnerSanctumSwitchGlowScript, AquaRockInsideSpiralSparkScript, AquaRockInsideSplashScript, AquaRockInsideTabletGlowScript, ChampaQuestionMarkScript, CrumbsScript, DebrisScript, DehkanPlateauDustScript, DustBurstScript, DustScatterScript, EasternAlhafraShipLeaveUpTheStairsScript, EmoteBubbleScript, EmotePopTiltedScript, FieldEffectFragmentScript, FieldEffectLongEffectScript, FieldEffectLongScript, FieldEffectMediumEffectScript, FieldEffectMediumScript, FieldEffectReleaseScript, FieldEffectShortEffectScript, FieldEffectShortScript, ForceFistScript, GabombaCatacombsSplashScript, GabombaStatuePinionReleaseScript, GaiaRockInsideBurstScript, GaiaRockInsideCirclingSparkScript, GaiaRockInsidePourScript, GaiaRockInsideRisingSparkScript, GaiaRockInsideSerpentGlowScript, GaiaRockInsideSerpentSmokeScript, GaiaRockLeafScript and 58 more.

Definition at line 179 of file actor_script.h.

SC_ANIMATION

#define SC_ANIMATION(v) SCRIPT_COMMAND_ANIMATION, (v)

Switch the sprites to animation v.

Referenced by ActorLaunchScript, ActorOffsetScript, AirsRockInsidePooledWhirlwindFadesScript, AirsRockInsideWhirlwindFadesScript, AirsRockInsideWhirlwindRisesScript, AirsRockInsideWindStoneScript, AirsRockWhirlwindFadesScript, AirsRockWhirlwindRisesScript, AirsRockWindStoneScript, AlhafraAlhafranLeadsBehindFelixScript, AlhafraAlhafranLeadsBesideFelixScript, AlhafraElderFollowsBehindFelixScript, AlhafraElderFollowsBesideFelixScript, AlhafraElderStepsBackScript, AlhafraFirstSoldierFollowsBehindFelixScript, AlhafraFirstSoldierFollowsBesideFelixScript, AlhafraMayorFollowsBehindFelixScript, AlhafraMayorFollowsBesideFelixScript, AlhafranCaveGuardStepsAsideScript, AlhafranCaveVisitorsLeaveScript, AlhafraRoomsTravelersWalkOffScript, AlhafraSecondSoldierFollowsBehindFelixScript, AlhafraSecondSoldierFollowsBesideFelixScript, AlhafraSilentMadranFollowsBehindFelixScript, AlhafraSilentMadranFollowsBesideFelixScript, AlhafraWaitingMadranFollowsBehindFelixScript, AlhafraWaitingMadranFollowsBesideFelixScript, AlhafraWearyMadranFollowsBehindFelixScript, AlhafraWearyMadranFollowsBesideFelixScript, AlhafraWomanWalksOffScript, ApojiiIslandsPaceScript, AquaRockFishScript, AquaRockSlowFishScript, ChampaCliffCavesChaseToEastScript, ChampaCliffCavesChaseToNorthScript, ChampaCliffCavesChaseToSouthScript, ChampaCliffCavesChaseToWestScript, ContigoDoubtingBoyScript, ContigoGirlOnTheShipScript, ContigoJennaReunionScript, ContigoJoinLeaderScript, ContigoKradenReunionScript, ContigoLeaderVisitsScript, ContigoPiersReunionScript, ContigoRejoinLeaderScript, ContigoShebaReunionScript, DailaFallenOldManScript, DailaPuddleChildScript, DailaRoomsLookAroundScript, DailaRoomsPacingScript and 237 more.

Definition at line 181 of file actor_script.h.

SC_NOP

#define SC_NOP(v) SCRIPT_COMMAND_NOP, (v)

Skip operand v.

Definition at line 183 of file actor_script.h.

SC_SE

#define SC_SE(n) SCRIPT_COMMAND_SE, (n)

Play sound n.

Referenced by IsletsDogHopsFacingEastScript and IsletsDogHopsFacingWestScript.

Definition at line 185 of file actor_script.h.

SC_SE_IN_VIEW

#define SC_SE_IN_VIEW(n) SCRIPT_COMMAND_SE_IN_VIEW, (n)

Play sound n if the actor is in the camera's view.

Definition at line 187 of file actor_script.h.

SC_GOTO

#define SC_GOTO(script) SCRIPT_COMMAND_GOTO, (Sint32)(script)

Continue in another script.

Referenced by ShamanVillageCaveGladiatorFollowsOut.

Definition at line 189 of file actor_script.h.

SC_HIDE_SPRITES

#define SC_HIDE_SPRITES SCRIPT_COMMAND_HIDE_SPRITES

Hide the sprites (ACTOR_SPRITE_NONE).

Definition at line 191 of file actor_script.h.

SC_SHOW_SPRITE

#define SC_SHOW_SPRITE SCRIPT_COMMAND_SHOW_SPRITE

Show one sprite (ACTOR_SPRITE_ONE).

Definition at line 193 of file actor_script.h.

SC_CALL

#define SC_CALL(fn) SCRIPT_COMMAND_CALL, (Sint32)(fn)

Call fn with the actor each tick until it returns zero.

Referenced by ActorLaunchScript, ActorStepAngleScript, AirsRockInsideOrbitingSparkScript, AirsRockWindStoneScript, AnemosInnerSanctumDullahanDragonStatueScript, AnemosInnerSanctumNoShadowScript, AnemosInnerSanctumOrbScript, AnemosInnerSanctumSparkScript, AnkohlRuinsWeedsScript, AquaRockFishScript, AquaRockInsideSpiralSparkScript, AquaRockSlowFishScript, ContigoPuzzledWorkerScript, ForceFistScript, GabombaStatueChargeScript, GabombaStatueFlashCogScript, GabombaStatueLookNorthAndEastScript, GabombaStatueLookNorthAndWestScript, GabombaStatueTurnToothScript, GaiaRockInsideCirclingSparkScript, GaiaRockWindScript, GarohWallLampScript, GondowanCliffsResetTileSpriteScript, IsletCaveShrunkFireScript, IsletCaveTremorTargetScript, IzumoRoomsFirstDancerScript, IzumoRoomsSecondDancerScript, JupiterLighthouseAgatioFightsScript, JupiterLighthouseHopEastOverPlatformsScript, JupiterLighthouseHopWestOverPlatformsScript, JupiterLighthouseIsaacFightsScript, JupiterLighthouseIvanFightsScript, JupiterLighthouseKarstFightsScript, JupiterLighthouseShowGustScript, KandoreanTempleFlameScript, KandoreanTempleHighFlameScript, KandoreanTempleLowFlameScript, KandoreanTempleMeditateScript, KandoreanTempleSquashAndStretchScript, KandoreanTempleSteamScript, KibomboEyesShakeScript, KibomboMountainsCrateJumpScript, KibomboShebaMeetsPiersScript, KibomboWarriorsDanceScript, LemuriaEntranceShipAtRest, LessonSeekingSparkScript, MadraRoomsShinFalls, MagmaRockInsideCirclingSparkScript, MagmaRockInsideOrbitScript, MarsLighthouseBalmFireballPath and 45 more.

Definition at line 195 of file actor_script.h.

SC_CAMERA_IN_BOUNDS

#define SC_CAMERA_IN_BOUNDS SCRIPT_COMMAND_CAMERA_IN_BOUNDS

Follow the watched actor with the camera, keeping the view in the room's bounds.

Definition at line 198 of file actor_script.h.

SC_MOVE_XZ

#define SC_MOVE_XZ(x, z) SCRIPT_COMMAND_MOVE_XZ, toFIXED(x), toFIXED(z)

Move toward (x, z) at the same height.

Referenced by JupiterLighthouseAgatioFightsScript, JupiterLighthouseFelixArrivesEastScript, JupiterLighthouseFelixArrivesWestScript, JupiterLighthouseIsaacFightsScript, JupiterLighthouseIvanFightsScript, JupiterLighthouseJennaArrivesEastScript, JupiterLighthouseJennaArrivesWestScript, JupiterLighthouseJennaStepsUpScript, JupiterLighthouseKarstFightsScript, JupiterLighthouseKradenArrivesEastScript, JupiterLighthouseKradenArrivesWestScript, JupiterLighthouseLeaveForAerieScript, JupiterLighthousePiersArrivesEastScript, JupiterLighthousePiersArrivesWestScript, JupiterLighthousePiersStepsUpScript, JupiterLighthouseShebaArrivesEastScript, JupiterLighthouseShebaArrivesWestScript, JupiterLighthouseShebaStepsUpScript, JupiterLighthouseWalkToAerieScript, LohoFirstMinerFetchesCannon, LohoFirstMinerGoesToWall, LohoFirstMinerReturns, LohoThirdMinerStepsUp, MadraRoomsCharFollows, MadraRoomsLeaderStepsAside, MadraRoomsOldManComesBack, MadraRoomsOldManWalksToBackRoom, MadraRoomsWifeComesBack, MadraRoomsWifeWalksToBackRoom, ShamanVillageCaveGladiatorFollowsOut, ShamanVillageCaveGladiatorLeaves, WorldMapLohoSpokesmanLeaveScript, WorldMapNorthLohoWorkerLeaveScript and WorldMapSouthLohoWorkerLeaveScript.

Definition at line 200 of file actor_script.h.

Enumerations in detail

ACTOR_SCRIPT_COMMAND

enum ACTOR_SCRIPT_COMMAND

The script commands, numbered by their place in ActorScriptCommandTable; the SC_ macros below write each with its operands.

EnumeratorValueDescription
SCRIPT_COMMAND_WAIT0
SCRIPT_COMMAND_SYNC1
SCRIPT_COMMAND_POSITION2
SCRIPT_COMMAND_POSITION_ORIGIN3
SCRIPT_COMMAND_MOVE4
SCRIPT_COMMAND_MOVE_BY5
SCRIPT_COMMAND_FACE_WATCHED6
SCRIPT_COMMAND_MOVE_TO_WATCHED7
SCRIPT_COMMAND_MOVE_LOCAL8
SCRIPT_COMMAND_WANDER9
SCRIPT_COMMAND_WANDER_HOME10
SCRIPT_COMMAND_APPROACH_WATCHED11
SCRIPT_COMMAND_CAMERA12
SCRIPT_COMMAND_LOOP13
SCRIPT_COMMAND_JUMP14
SCRIPT_COMMAND_IF15
SCRIPT_COMMAND_IFNOT16
SCRIPT_COMMAND_END17
SCRIPT_COMMAND_FLAG_CHECK18
SCRIPT_COMMAND_FLAG_ON19
SCRIPT_COMMAND_FLAG_OFF20
SCRIPT_COMMAND_FLAG_REV21
SCRIPT_COMMAND_SET22
SCRIPT_COMMAND_ADD23
SCRIPT_COMMAND_CMP24
SCRIPT_COMMAND_PLAYER25
SCRIPT_COMMAND_WORLD26
SCRIPT_COMMAND_KEYS27
SCRIPT_COMMAND_ROPE28
SCRIPT_COMMAND_TIGHTROPE29
SCRIPT_COMMAND_SAND30
SCRIPT_COMMAND_SAIL31
SCRIPT_COMMAND_WORLD_SAIL32
SCRIPT_COMMAND_WORLD_FLY33
SCRIPT_COMMAND_WORLD_SAND34
SCRIPT_COMMAND_HOVER35
SCRIPT_COMMAND_WALK36
SCRIPT_COMMAND_CHECK_KEYS37
SCRIPT_COMMAND_RELEASE38
SCRIPT_COMMAND_ANIMATION39
SCRIPT_COMMAND_NOP40
SCRIPT_COMMAND_SE41
SCRIPT_COMMAND_SE_IN_VIEW42
SCRIPT_COMMAND_GOTO43
SCRIPT_COMMAND_HIDE_SPRITES44
SCRIPT_COMMAND_SHOW_SPRITE45
SCRIPT_COMMAND_CALL46
SCRIPT_COMMAND_CAMERA_IN_BOUNDS47
SCRIPT_COMMAND_MOVE_XZ48
SCRIPT_COMMAND_COUNT49

Definition at line 14 of file actor_script.h.

ACTOR_SCRIPT_VALUE

enum ACTOR_SCRIPT_VALUE

The values of an actor SC_SET, SC_ADD and SC_CMP reach, each a field of ACTOR, numbered by their place in ActorScriptOperandHandlerTable. Number 4 reaches the facing as well, 23 the scene word and 24 the sprite; no script uses those three.

EnumeratorValueDescription
SW_SCRIPT0ACTOR.script, the script it runs
SW_CURSOR1ACTOR.scriptCursor, in words
SW_FACING_DUPLICATE2Sets or tests the facing as SW_FACING does: the operand table gives both one handler.
SW_FACING3ACTOR.facing, in 1/65536 turns
SW_X5ACTOR.x, 16.16 fixed-point pixels
SW_Y6ACTOR.y
SW_Z7ACTOR.z
SW_RADIUS8ACTOR.radius, its collision radius in pixels
SW_SCALE_X9ACTOR.scaleX, toFIXED(1) full size
SW_SCALE_Y10ACTOR.scaleY
SW_SCALE_Y_DUPLICATE11Sets or tests the Y scale as SW_SCALE_Y does: the operand table gives both one handler.
SW_VELOCITY_X12ACTOR.velocityX, 16.16 fixed-point pixels a tick
SW_VELOCITY_Y13ACTOR.velocityY
SW_VELOCITY_Z14ACTOR.velocityZ
SW_SPEED15ACTOR.speedLimit, 16.16 fixed-point pixels a tick
SW_ACCELERATION16ACTOR.acceleration, 16.16 fixed-point pixels a tick per tick
SW_TARGET_X17ACTOR.targetX, 16.16 fixed-point pixels or ACTOR_NO_TARGET
SW_TARGET_Y18ACTOR.targetY
SW_TARGET_Z19ACTOR.targetZ
SW_BOUNCE20ACTOR.bounce, the share of its falling speed kept on landing
SW_GRAVITY21ACTOR.gravity, 16.16 fixed-point pixels a tick per tick
SW_GROUND22ACTOR.groundHeight, 16.16 fixed-point pixels
SW_SPRITE_KIND25ACTOR.spriteStorageKind: ACTOR_SPRITE_NONE hides its sprite and ACTOR_SPRITE_ONE shows it again.
SW_MOTION26ACTOR.motionFlags, ACTOR_MOTION_FLAG bits
SW_ARRIVAL27ACTOR.arrivalAxis, an ARRIVAL_AXIS
SW_RESULT28ACTOR.conditionResult, the last test, read by SC_IF
SW_SNAP29ACTOR.snapToTarget: nonzero lands it exactly on its target
SW_COLLISION30ACTOR.collisionFlags, ACTOR_COLLISION_FLAG bits
SW_STEERING31ACTOR.steeringFlags, ACTOR_STEERING_FLAG bits
SW_PAUSED32ACTOR.paused: nonzero stops its motion and script
SW_REPEAT33ACTOR.repeatCount, SC_LOOP's count
SW_WAIT34ACTOR.wait, SC_WAIT's ticks left
SW_TIMER35ACTOR.timer, the parameter the actor's script reads (a follow distance or an angle to face).
SW_USER_VALUE36ACTOR.userValue, scene scratch: a script sets it for the scene code that reads or waits on it.
SW_WATCHED_ACTOR37ACTOR.watchedActor: a fireball's path sets it to the function the fireball calls when it crashes (scActorRollAndCrumble).
SW_HOOK38ACTOR.update, the function the motion update calls with the actor each tick before its script; SC_SET(SW_HOOK, 0) stops it.
SW_SCENE_COUNTER39ACTOR.sceneCount, a tick count scene code keeps for itself (a bobbing actor's).
SW_SCENE_BYTE40ACTOR.sceneByte, a byte scene code keeps for itself (a countdown, or a block's blocking).

Definition at line 206 of file actor_script.h.