Alchemy
Loading...
Searching...
No Matches

mapdata.h File Reference

Go to the source code of this file.

Typedefs

typedef s32(*) TerrainHeightFn(const u8 *heightBytes, s32 pixelX, s32 pixelY)
 Height samples and pixel coordinates within a 16x16 terrain cell.

Variables

const TerrainHeightFn gMap_TerrainHeightFunctions [16]
 Terrain height functions, chosen by the low four bits of a cell's first collision byte and called with (the remaining samples, x within the cell, y within the cell).
const s8 gWorldMap_DirectionOffsets [8][2]
 The eight compass directions as (x, y) offsets of radius 40.
const u32 gWorldMap_UnitScale [2]
 Two 1.0s (Q16).

Typedef Documentation

◆ TerrainHeightFn

typedef s32(*) TerrainHeightFn(const u8 *heightBytes, s32 pixelX, s32 pixelY)

Height samples and pixel coordinates within a 16x16 terrain cell.

Definition at line 7 of file mapdata.h.

Variable Documentation

◆ gMap_TerrainHeightFunctions

const TerrainHeightFn gMap_TerrainHeightFunctions[16]
extern

Terrain height functions, chosen by the low four bits of a cell's first collision byte and called with (the remaining samples, x within the cell, y within the cell).

Each reads only the arguments it needs. Read by Map_GetTerrainHeight and Map_CheckObjectStep (terrain.c).

Definition at line 14 of file mapdata.c.

Referenced by Map_CheckObjectStep(), and Map_GetTerrainHeight().

◆ gWorldMap_DirectionOffsets

const s8 gWorldMap_DirectionOffsets[8][2]
extern

The eight compass directions as (x, y) offsets of radius 40.

No code in The Broken Seal names it.

Definition at line 46 of file mapdata.c.

◆ gWorldMap_UnitScale

const u32 gWorldMap_UnitScale[2]
extern

Two 1.0s (Q16).

No code in The Broken Seal names it; The Lost Age's battle effects read its copy as a unit scale.

Definition at line 53 of file mapdata.c.