Alchemy
Loading...
Searching...
No Matches

object_camera.c File Reference

The object cameras, which place every object's sprite each frame. More...

Go to the source code of this file.

Data Structures

struct  ObjectCameraTile
 A map cell's word, as the camera reads it. More...
struct  ObjectCameraObject
 A field object, as the camera reads it. More...
struct  ObjectCameraPoint
 A point the fixed camera looks from or at. More...
struct  ObjectCameraFixed

Functions

void ObjectSystem_UpdateCamera (void)
 Each frame, with the scrolling camera: places every object's sprite on the screen.
UNUSED s32 ObjectCamera_ReturnTrue (void)
void ObjectSystem_UpdateCameraFixed (void)
 Each frame, with the fixed camera: places every object's sprite, from the 64th object down, facing them by the angle from the eye to the target.

Detailed Description

The object cameras, which place every object's sprite each frame.

Part of field.c, the field object, compiled only through it.

Definition in file object_camera.c.

Function Documentation

◆ ObjectSystem_UpdateCamera()

void ObjectSystem_UpdateCamera ( void )

Each frame, with the scrolling camera: places every object's sprite on the screen.

An object on or near the screen takes its layer and priority from the cell under it; one off screen gives up its VRAM cache entry. ObjectSystem_Initialize schedules it (order 0xc80, after the objects move) for every mode but 3 and 4; ObjectSystem_SuspendProjectionAndShowSprites suspends it. Resets the system's used count, may change an object's layer and its sprite's priorities, and holds the frame decoder in heap slot HEAP_SLOT_FRAME_SCRATCH only while it runs.

Definition at line 59 of file object_camera.c.

Referenced by ObjectSystem_Initialize(), ObjectSystem_ResumeProjectionAndHideLayers(), ObjectSystem_SuspendProjectionAndShowSprites(), and ObjectSystem_UpdateCamera().

◆ ObjectCamera_ReturnTrue()

UNUSED s32 ObjectCamera_ReturnTrue ( void )

Definition at line 197 of file object_camera.c.

Referenced by ObjectCamera_ReturnTrue().

◆ ObjectSystem_UpdateCameraFixed()

void ObjectSystem_UpdateCameraFixed ( void )

Each frame, with the fixed camera: places every object's sprite, from the 64th object down, facing them by the angle from the eye to the target.

While battle commands are chosen (flag 363, set by BattlePresentation_BuildActions) it uses the fixed view matrix and 1.0 scale. ObjectSystem_Initialize schedules it (order 0xc80) for modes 3 (the world map) and 4 (battle); ObjectSystem_SuspendProjectionAndShowSprites suspends it. Resets the system's used count.

Definition at line 206 of file object_camera.c.

Referenced by ObjectSystem_Initialize(), ObjectSystem_ResumeProjectionAndHideLayers(), ObjectSystem_SuspendProjectionAndShowSprites(), and ObjectSystem_UpdateCameraFixed().