mapframe.h
games/tbs/include/mapframe.h on GitHub
Structures
MapScanline
struct MapScanline
One screen line's ground-plane terms on the world map: its width scale and distance, from which its affine parameters are built.
| Field | Declared as | |
|---|---|---|
scale, depth | s32 scale, depth | |
offsetX, offsetY | s32 offsetX, offsetY | |
pa, pc | s16 pa, pc |
Used by WorldMap_BuildScanlineTable.
MapAffineLine
struct MapAffineLine
One screen line's affine parameters for a background, as the HBlank DMA copies them into the BG2 or BG3 registers.
| Field | Declared as | |
|---|---|---|
pa, pb, pc, pd | s16 pa, pb, pc, pd | |
x, y | s32 x, y |
MapAffinePair
struct MapAffinePair
One screen line's affine parameters for BG2 and BG3.
| Field | Declared as | |
|---|---|---|
bg2, bg3 | struct MapAffineLine bg2, bg3 |
Used by TileMap_DrawRowsFromRam.
MapFrameWork
struct MapFrameWork
The world map's frame work in heap slot 7: the scanline terms and two pages of per-line affine parameters, one built while the other is shown.
| Field | Declared as | |
|---|---|---|
scanlines | struct MapScanline scanlines[160] | |
pages | struct MapAffinePair pages[2][160] | |
unk3480 | u8 unk3480[4] |