Alchemy
Loading...
Searching...
No Matches

camera.c File Reference

The event camera. More...

Go to the source code of this file.

Functions

void Camera_FollowActor (s32 actor, s32 keepPosition)
 The event command "camera follow actor": the camera (the event's view centre) follows actor.
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.
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.
void Object_PlaceCurrentWithinCameraBounds (s32 actor, s32 glide)
 The event command "camera move to actor": Camera_MoveWithinMapBounds to the actor's x and z.
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.
struct FieldActor * Camera_GetEventObject (void)
 The event command "get view centre": returns the camera object.
UNUSED void Camera_FollowObject (struct ObjectRuntime *target, s32 keepCurrentPosition)
 Makes the camera follow target; unless keepCurrentPosition is set it jumps there at once.

Detailed Description

The event camera.

Part of psynergy_effects.c, compiled only through it.

Definition in file camera.c.

Function Documentation

◆ 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.

Definition at line 10 of file camera.c.

Referenced by Camera_FollowActor(), FieldEvent_End(), and ObjectEffect_RunPendingFlagEvent().

◆ 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.

Definition at line 36 of file camera.c.

Referenced by Camera_SetSpeedParameters().

◆ 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.

Definition at line 47 of file camera.c.

Referenced by Camera_MoveWithinMapBounds(), FieldFx_RunRetreat(), Object_PlaceCurrentWithinCameraBounds(), and ObjectEffect_RunPendingFlagEvent().

◆ 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.

Definition at line 113 of file camera.c.

Referenced by Event_MovePillarSwitchBlock(), and Object_PlaceCurrentWithinCameraBounds().

◆ 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.

Definition at line 125 of file camera.c.

Referenced by Camera_WaitForArrival(), Event_MeetSurvivingTravelers(), Event_SentToAidElders(), and ValeHome_FightTravelers().

◆ Camera_GetEventObject()

◆ 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.

Definition at line 141 of file camera.c.

Referenced by Camera_FollowObject().