src/field/script_commands_camera.c
The camera a script moves: following an actor, panning to a point kept inside the map, and waiting for it to arrive. More…
Included by script_commands.c.
Functions
| Name | Description | |
|---|---|---|
void | fdCameraFollowActor (Sint32 actorId, Sint32 keepPos) | Makes the camera, the script's view centre, follow actorId. |
void | fdCameraSetSpeedParams (FIXED speedLimit, FIXED acceleration) | Sets the camera's top speed and acceleration, in 16.16 pixels per tick. |
void | fdCameraMoveWithinMapBounds (FIXED requestedX, FIXED requestedY, FIXED requestedZ, Sint32 glide) | Pans the camera to a point in 16.16 pixels (CAMERA_KEEP keeps that axis), or cuts there when glide is 0, kept far enough inside the map that the screen never shows past its edge. |
void | fdCameraMoveToActorById (Sint32 actorId, Sint32 glide) | Moves the camera to an actor's x and z, as fdCameraMoveWithinMapBounds does to a point. |
void | fdCameraWaitForArrival (void) | Waits (at most 600 ticks) for the camera to arrive, then 2 ticks more. |
ACTOR * | fdCameraGetActor (void) | Returns the camera actor. |
void | fdCameraFollow (ACTOR *target, Sint32 keepCurrentPos) | Unused: makes the camera follow target; unless keepCurrentPos is set it jumps there at once. |
Description
The camera a script moves: following an actor, panning to a point kept inside
the map, and waiting for it to arrive. Part of script_commands.c.
Functions in detail
fdCameraFollowActor
void fdCameraFollowActor(Sint32 actorId, Sint32 keepPos)
Makes the camera, the script's view centre, follow actorId.
References fdActorLookup(), fdActorStartCameraStub(), fdMapGridCenterOnFollowedPointStub(), Sint32, state, syHeapSlotAllocateEWRAM() and sySynch().
Referenced by fdEntrancePlayArrival(), fdScriptEnd(), scAltinPeakRollCart(), scAltinScareOffBeast(), scAltmillerCaveRestoreBabiAndInviteParty(), scBabiLighthouseExplainTruthDoor(), scBabiPalaceMeetBabiAfterColosso(), scColosseumAzartMatchExplainFinalsRules(), scColosseumAzartMatchTalkToBridgeAttendant(), scColosseumAzartMatchTalkToLumberAttendant(), scColosseumAzartMatchTalkToPipeworksAttendant(), scColosseumAzartMatchTalkToRockAttendant(), scColosseumEntranceEscortToEastExit(), scColosseumEntranceEscortToWestExit(), scColosseumNavampaMatchPlayPostBattleReunion(), scColosseumNavampaMatchTalkToFreeClimbAttendant(), scColosseumNavampaMatchTalkToLogRollingAttendant(), scColosseumNavampaMatchTalkToMovingSidewalkAttendant(), scColosseumNavampaMatchTalkToScalesAttendant(), scColosseumNavampaMatchTalkToSteppingStoneAttendant(), scColosseumNavampaMatchTalkToWallWedgeAttendant(), scColosseumSatrageMatchTalkToBoardWalkAttendant(), scColosseumSatrageMatchTalkToLogRollingAttendant(), scColosseumSatrageMatchTalkToMiniMazeAttendant(), scColosseumSatrageMatchTalkToShiftingFloorAttendant(), scColosseumSatrageMatchTalkToWallAttendant(), scColossoControlCharacterAlone(), scColossoGatherPartyForTour(), scCottageRoomsBDoraWakesIsaac(), scCottageRoomsBHurryToThePlaza(), scCottageRoomsBShowMythrilBag(), scFuchinTempleFeizhiLeavesForHsu(), scInit(), scLogRoomsADefeatThieves(), scLogRoomsADiscussMindReading(), scLogRoomsAFightThievesAgain(), scLogRoomsALoseToThieves(), scLunpaFortressDonpaJudgesDodonpa(), scLunpaFortressFindHammet(), scLunpaFortressRevealMonster(), scLunpaGuardsThrowIsaacOut(), scMogallForestApeLeadsToKillerApe(), scMogallForestApePointsTheWay(), scMogallForestFirstAreaApeAttacks(), scMogallForestSecondAreaSouthApeShowsWay(), scMogallForestThirdAreaApeAttacks(), scMogallForestThirdAreaEastApeShowsWay(), scMogallForestThirdAreaMiddleApeShowsWay(), scMogallForestThirdAreaWestApeShowsWay(), scSolSanctumElementalStarRoomAlexTakesStars() and 20 more.
Definition at line 7 of file script_commands_camera.c.
fdCameraSetSpeedParams
void fdCameraSetSpeedParams(FIXED speedLimit, FIXED acceleration)
Sets the camera's top speed and acceleration, in 16.16 pixels per tick.
References state and syHeapSlotAllocateEWRAM().
Referenced by fdCameraSetSpeedFX() and scMogallForestApeComesOut().
Definition at line 38 of file script_commands_camera.c.
fdCameraMoveWithinMapBounds
void fdCameraMoveWithinMapBounds(FIXED requestedX, FIXED requestedY, FIXED requestedZ, Sint32 glide)
Pans the camera to a point in 16.16 pixels (CAMERA_KEEP keeps that axis), or
cuts there when glide is 0, kept far enough inside the map that the screen
never shows past its edge.
References fdActorSetMoveTargetStub(), fdActorStartIdleStub(), fdMapGridCenterOnFollowedPointStub(), Sint32, state, syHeapSlotAllocateEWRAM() and sySynch().
Referenced by fdCameraMoveToActorById(), fdCameraMoveToFX(), fdEntrancePlayArrival(), fdPsynergyRetreat(), scAltinPeakFirstBeastHopsAway(), scAltinPeakShowFirstBeastRoute(), scBilibinSetUpTreasury(), scShipRoomsMoveCameraAndWaitFX(), scSolSanctumEruptionFadeCameraTo() and scWorldMapJitterTransitionCamera().
Definition at line 49 of file script_commands_camera.c.
fdCameraMoveToActorById
void fdCameraMoveToActorById(Sint32 actorId, Sint32 glide)
Moves the camera to an actor's x and z, as fdCameraMoveWithinMapBounds does
to a point.
References fdActorLookup(), fdCameraMoveWithinMapBounds(), Sint32 and syHeapSlotAllocateEWRAM().
Referenced by scAlpineCrossingHamaReachesHsu(), scAltmillerCaveRestoreBabiAndInviteParty(), scCrossboneIsleKeysBaneFirstEscape(), scCrossboneIsleKeysBaneSecondEscape(), scFuchinTempleForceTree(), scFuchinTempleNyunpaOffersTest(), scLunpaFortressFindHammet(), scLunpaFortressRevealMonster(), scLunpaFortressTalkToAttendant(), scMercuryLighthouseEntranceLizardManBlocksMia(), scMogallForestApeComesOut(), scSanctumWarnBeforeLeaving(), scValeEruptionReturnFromMtAleph(), scVenusLighthouseMoveSocketPillar(), scWestLunpaCaveRideWagon() and scWestLunpaCaveStayBehind().
Definition at line 131 of file script_commands_camera.c.
fdCameraWaitForArrival
void fdCameraWaitForArrival(void)
Waits (at most 600 ticks) for the camera to arrive, then 2 ticks more.
References fdActorWaitForMoveStub(), fdScriptWait() and syHeapSlotAllocateEWRAM().
Referenced by fdCameraWaitForMove(), scAlpineCrossingFeizhiArrives(), scAlpineCrossingHamaReachesHsu(), scAltinScareOffBeast(), scAltinTalkToThirstyOldWoman(), scColosseumEntranceCrowdRecognizesIsaac(), scColosseumEntranceFinalsStart(), scColosseumEntranceTalkToTrialAttendant(), scCottageRoomsBHurryToThePlaza(), scFuchinTempleFehSeesChi(), scFuchinTempleForceTree(), scFuchinTempleNyunpaOffersTest(), scKolimaForestFloodgateFlipFloodgateSwitch(), scKolimaForestTreeRestoreTret(), scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieCallLift(), scMercuryLighthouseAerieConfrontSaturos(), scMercuryLighthouseAeriePartyArrives(), scMercuryLighthouseEntranceLizardManBlocksMia(), scMercuryLighthouseMiaSensesSomeoneInside(), scMercuryLighthousePushSpoutAndNorthJetPipes(), scMercuryLighthouseStartStatueSlide(), scMogallForestApeComesOut(), scMogallForestKillerApeAttacks(), scValeCaveKiteRunsOff(), scValeEruptionReturnFromMtAleph(), scVaultIvanStaysBehind() and scWestLunpaCaveStayBehind().
Definition at line 146 of file script_commands_camera.c.
fdCameraGetActor
ACTOR *fdCameraGetActor(void)
Returns the camera actor.
References syHeapSlotAllocateEWRAM().
Referenced by scAltinPeakAwardFrostJewelAndDrain(), scAltinTalkToThirstyOldWoman(), scColosseumEntranceCrowdRecognizesIsaac(), scColosseumEntranceTalkToTrialAttendant(), scCottageRoomsAGaretComesHome(), scImilMiaSaysFarewellToApprentices(), scInit(), scKalayHammetReturnsToPalace(), scLunpaFortressCheckHallPatrol(), scLunpaFortressIsGuardNearViewCenter(), scMcCoyPalaceAudienceWithMcCoy(), scMcCoyPalaceMcCoyRewardsParty(), scMcCoyPalacePresentRewardChests(), scMercuryLighthouseAerieAlexAppears(), scMercuryLighthouseAerieCallLift(), scMercuryLighthouseAerieConfrontSaturos(), scMercuryLighthouseAeriePartyArrives(), scShipRoomsRunScriptCommand(), scSolSanctumEruptionFadeCameraTo(), scSolSanctumEruptionPlayWiseOneRescue(), scTolbiShipMastWatchCourseFirstTime(), scTunnelRuinsSetStoneOnBalance(), scValeMendingTheRoof(), scValePlazaDepartForQuest(), scValePlazaMeetSurvivingTravelers(), scValePrologueShowBoulderSweepingDownriver(), scValeRoofMended(), scValeUnusedRoofMended(), scVenusLighthouseAerieCombineSaturosAndMenardi(), scVenusLighthouseAerieConfrontSaturosAndMenardi(), scVenusLighthouseAerieOverhearSaturosAndMenardi(), scVenusLighthouseAerieShowSaturosAndMenardiFall(), scVenusLighthouseAerieStageShebasFall() and scVenusLighthouseCarryFloatingPillar().
Definition at line 155 of file script_commands_camera.c.
fdCameraFollow
void fdCameraFollow(ACTOR *target, Sint32 keepCurrentPos)
Unused: makes the camera follow target; unless keepCurrentPos is set it jumps there at once.
References fdActorStartCameraStub(), Sint32 and syHeapSlotAllocateEWRAM().
Definition at line 164 of file script_commands_camera.c.