24 if (keepPosition == 0) {
25 SET_POSITION(camera, subject->x, subject->y, subject->z);
62 positionX = requestedX;
63 positionY = requestedY;
65 positionZ = requestedZ;
68 camera = runtimeBlock->
camera;
72 minimumX = map->
minX + 0x780000;
74 minimumZ = map->
minY + cameraY + 0x600000;
75 maximumX = map->
maxX + 0xFF880000;
76 maximumZ = map->
maxY + cameraY + 0xFFC00000;
79 if (positionX == -1) {
80 positionX = camera->
x;
82 if (positionY == -1) {
83 positionY = camera->
y;
85 if (positionZ == -1) {
86 positionZ = camera->
z;
88 if (positionX < minimumX) {
91 if (positionZ < minimumZ) {
94 if (positionX > maximumX) {
97 if (positionZ > maximumZ) {
100 if (shouldGlide == 0) {
118 if (subject !=
NULL) {
142 s32 keepCurrentPosition) {
148 if (target !=
NULL) {
151 if (keepCurrentPosition == 0) {
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
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 th...
void Camera_WaitForArrival(void)
The event command "camera wait for move": waits (at most 600 frames) for the camera to arrive,...
void Camera_SetSpeedParameters(s32 speedLimit, s32 acceleration)
The event command "camera set speed": the camera's top speed and acceleration, 16....
struct FieldActor * Camera_GetEventObject(void)
The event command "get view centre": returns the camera object.
void Camera_FollowActor(s32 actor, s32 keepPosition)
The event command "camera follow actor": the camera (the event's view centre) follows actor.
UNUSED void Camera_FollowObject(struct ObjectRuntime *target, s32 keepCurrentPosition)
Makes the camera follow target; unless keepCurrentPosition is set it jumps there at once.
void Object_PlaceCurrentWithinCameraBounds(s32 actor, s32 glide)
The event command "camera move to actor": Camera_MoveWithinMapBounds to the actor's x and z.
void ObjectDispatch_StartCameraFar(struct DispatchObject *obj, s32 arg)
void Object_SetMoveTargetFar(struct ObjectRuntime *object, s32 x, s32 y, s32 z)
void FieldObject_WaitForMoveFar(void *fieldObject)
void Map_CenterOnFollowedPointFar(void)
void ObjectDispatch_StartIdleFar(struct DispatchObject *obj)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
#define SET_POSITION(p, px, py, pz)
Sets the position or the velocity of a particle, a piece of debris or an object in one statement.
void FieldEvent_WaitFrames(s32 frames)
The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSki...
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
A field object as the object dispatcher's far calls take it.
A field actor: a person or thing on the field with a position, motion toward a target,...
Full event work allocated by Field_RunScene (heap slot 27).
struct ObjectRuntime * camera
the object the map view follows
s16 mode
MODE_WORLD_MAP (3) on the world map.
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
s32 z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
s32 x
16.16 fixed-point pixels
s32 speedLimit
16.16 fixed-point pixels per frame
s32 y
16.16 fixed-point pixels
struct ObjectRuntime * linkedObject
The object its action script follows or faces.
#define MODE_WORLD_MAP
the world map