Alchemy

camera.c

The event camera.

games/tbs/src/object/psynergy_effects/camera.c on GitHub

The event camera. Part of psynergy_effects.c, compiled only through it.

Functions

Camera_FollowActor

void Camera_FollowActor(s32 actor, s32 keepPosition)

The event command "camera follow actor": the camera (the event's view centre) follows actor. Unless keepPosition is set it jumps there at once and, off the world map, the map is redrawn around it.

Used by FieldEvent_End.

Line 10

Camera_SetSpeedParameters

void Camera_SetSpeedParameters(s32 speedLimit, s32 acceleration)

The event command "camera set speed": the camera's top speed and acceleration, 16.16 pixels per frame.

Line 36

Camera_MoveWithinMapBounds

void Camera_MoveWithinMapBounds(s32 requestedX, s32 requestedY, s32 requestedZ, s32 glide)

The event command "camera move to": sends the camera to the requested axes, 16.16 pixels (-1 keeps that axis), kept far enough inside the map that the screen never shows past its edge. With glide 0 the camera jumps there at once; otherwise it travels at its own speed.

Used by FieldFx_RunRetreat, Object_PlaceCurrentWithinCameraBounds.

Line 47

Object_PlaceCurrentWithinCameraBounds

void Object_PlaceCurrentWithinCameraBounds(s32 actor, s32 glide)

The event command "camera move to actor": Camera_MoveWithinMapBounds to the actor's x and z.

Used by Event_MovePillarSwitchBlock.

Line 113

Camera_WaitForArrival

void Camera_WaitForArrival(void)

The event command "camera wait for move": waits (at most 600 frames) for the camera to arrive, then 2 frames more.

Used by Event_MeetSurvivingTravelers, Event_SentToAidElders, ValeHome_FightTravelers.

Line 125

Camera_GetEventObject

struct FieldActor *Camera_GetEventObject(void)

The event command "get view centre": returns the camera object.

Used by Event_CarryFloatingBlock, Event_DepartForQuest, Event_GaretComesHome, Event_MeetSurvivingTravelers, Event_SetBlockOnBalance, Imil_MiaSaysFarewellToApprentices, Kalay_HammetReturnsToPalace, TolbiShipInteriors_RunSceneCommand, TolbiShipMast_SetupHiddenLeaderLookout, ValeStorm_ShowBoulderSweepingDownriver, Village_TalkToThirstyVillager.

Line 133

Camera_FollowObject

UNUSED void Camera_FollowObject(struct ObjectRuntime *target, s32 keepCurrentPosition)

Makes the camera follow target; unless keepCurrentPosition is set it jumps there at once.

Line 141

On this page