Skip to Content
The Alchemy Project

struct MAP_HEADER

A layout's header: the camera's bounds, the layers' priorities, tile bases and setup, and the offsets from the header's start of its packed tiles, shapes, tilemap, tileset animation, blend script and treasure spots (packed for syDecompressTaggedLZ, except markers which are read in place).

Declared in field_map_grid.c.

Fields

NameDescription
Uint8cameraBounds [4]camera bounds in 8-pixel tiles: left, top, right, bottom
Uint8priority [3]each layer's BG priority, 1 to 3; 0 leaves the layer off
Uint8charBase [3]each layer's BG char block
Uint16reserved0 in every layout of both games; nothing reads
MAP_LAYERlayers [3]it
Sint32metatileTilesmetatile tiles, staged and unpacked into MetatileTiles
Sint32shapesthe shapes, into RamMapGridShapes
Sint32metatilesthe metatiles, into RamMapGridMetatileBuffer
Sint32animationthe tileset animation script, or 0 for none
Sint32blendthe blend script, or 0 for none
Sint32markersthe chests and Psynergy stones (fdPlaceTreasureSpots)

Description

A layout's header: the camera's bounds, the layers' priorities, tile bases and setup, and the offsets from the header's start of its packed tiles, shapes, tilemap, tileset animation, blend script and treasure spots (packed for syDecompressTaggedLZ, except markers which are read in place).

struct MAP_HEADER

Referenced by fdMapGridLoadMap().

Definition at line 213 of file field_map_grid.c.

Fields in detail

cameraBounds

Uint8 cameraBounds[4]

camera bounds in 8-pixel tiles: left, top, right, bottom

priority

Uint8 priority[3]

each layer's BG priority, 1 to 3; 0 leaves the layer off

charBase

Uint8 charBase[3]

each layer's BG char block

reserved

Uint16 reserved

0 in every layout of both games; nothing reads

layers

MAP_LAYER layers[3]

it

metatileTiles

Sint32 metatileTiles

metatile tiles, staged and unpacked into MetatileTiles

shapes

Sint32 shapes

the shapes, into RamMapGridShapes

metatiles

Sint32 metatiles

the metatiles, into RamMapGridMetatileBuffer

animation

Sint32 animation

the tileset animation script, or 0 for none

blend

Sint32 blend

the blend script, or 0 for none

markers

Sint32 markers

the chests and Psynergy stones (fdPlaceTreasureSpots)