Alchemy
Loading...
Searching...
No Matches

vertices.h File Reference

Go to the source code of this file.

Functions

void Transform_UpdateVertices (struct Position *eye, struct Position *target, struct ScanVertex *line, struct BgAffine *affine)
 Builds the world map's per-scanline affine table for one frame: the ground plane seen from eye towards target.

Function Documentation

◆ Transform_UpdateVertices()

void Transform_UpdateVertices ( struct Position * eye,
struct Position * target,
struct ScanVertex * line,
struct BgAffine * affine )

Builds the world map's per-scanline affine table for one frame: the ground plane seen from eye towards target.

line points at the 160 scanlines' ground terms, whose rotation terms stay cached while the yaw (gScanlineAngle) is unchanged; affine receives each line's parameters twice, for BG2 and then BG3, as the HBlank DMA writes both. Copied to RAM (heap slot 46) by Map_InitializePerspectiveScene, which runs it once, and run from there each frame by WorldMap_UpdateView into the affine page of the frame's parity. Writes gScanlineAngle when the yaw changes.

Definition at line 88 of file vertices.c.

Referenced by Map_InitializePerspectiveScene(), and Transform_UpdateVertices().