Skip to Content
The Alchemy Project

src/field/field_actor_camera.c

The actor cameras, which place every actor's sprite each tick. More…

Included by field.c.

Structures

NameDescription
structACTOR_CAMERA_TILEA map metatile's word, as the camera reads it.
structACTOR_CAMERA_POINTA point the fixed camera looks from or at.
structACTOR_CAMERA_FIXEDThe start of the 3D camera's state (heap slot HEAP_SLOT_CAMERA, BattleCameraWork, a BATTLE_CAMERA), as the fixed camera reads it: the eye and target it looks from and at, or the points that stand in for them.

Functions

NameDescription
voidfdActorSystemPlaceSprites (void)Each tick, with the scrolling camera: places every actor's sprite on the screen.
Sint32fdActorCameraReturnTrue (void)Unused: returns 1.
voidfdActorSystemProjectSprites (void)Each tick, with the fixed camera: places every actor's sprite, from the 64th actor down, facing them by the angle from the eye to the target.

Description

The actor cameras, which place every actor's sprite each tick. Part of field.c.

Functions in detail

fdActorSystemPlaceSprites

void fdActorSystemPlaceSprites(void)

Each tick, with the scrolling camera: places every actor's sprite on the screen.

References fdMapGridScrollStateView(), fdRenderApplyProjectedPlacement(), fdRenderDecodePicture, RenderDecodePictureCodeSize, Sint32, syHeapSlotRelease(), syMulFX() and syVRAMCacheReleaseVRAM().

Referenced by fdActorSystemInit(), fdActorSystemResumeProjectionAndHideLayers() and fdActorSystemSuspendProjectionAndShowSprites().

Definition at line 39 of file field_actor_camera.c.

fdActorCameraReturnTrue

Sint32 fdActorCameraReturnTrue(void)

Unused: returns 1.

References Sint32.

Definition at line 180 of file field_actor_camera.c.

fdActorSystemProjectSprites

void fdActorSystemProjectSprites(void)

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

References CameraFixedViewMatrix, fdRenderDecodePicture, fdRenderPlaceProjectedSprite(), gmFlagGetStub(), RenderDecodePictureCodeSize, Sint32, syAtan(), syHeapSlotRelease(), syInitMatrix(), syLookAt(), syLookAtLoad() and syMultiMatrix().

Referenced by fdActorSystemInit(), fdActorSystemResumeProjectionAndHideLayers() and fdActorSystemSuspendProjectionAndShowSprites().

Definition at line 187 of file field_actor_camera.c.