Skip to Content
The Alchemy Project

src/field/map_grid_data.c

Map ground: the height curve of each metatile kind and the world map's battle environments.

Macros

NameDescription
#defineENV (name) BATTLE_ENVIRONMENT_##name

Variables

NameDescription
const TERRAIN_HEIGHT_FNMapGridTerrainHeightFunctions [TERRAIN_KIND_COUNT]Ground height functions, by TERRAIN_KIND, called with (the remaining samples, x within the metatile, y within the metatile).
const Uint8WorldMapBattleEnvironments [48]World map battle environments (BATTLE_ENVIRONMENT), indexed by the collision value plus 16 when the block word's top bit is set, or plus 32 (whatever that bit) for WORLD_MAP_ENCOUNTER_REGION_SNOWFIELD.
const Sint8WorldMapDirectionOffsets [8][2]The eight compass directions as (x, y) offsets of radius 40.
const Uint32WorldMapUnitScale [2]Two 1.0s (16.16).

Description

Map ground: the height curve of each metatile kind and the world map's battle environments.

Macros in detail

ENV

#define ENV(name) BATTLE_ENVIRONMENT_##name

Referenced by WorldMapBattleEnvironments.

Definition at line 30 of file map_grid_data.c.

Variables in detail

MapGridTerrainHeightFunctions

const TERRAIN_HEIGHT_FN MapGridTerrainHeightFunctions[TERRAIN_KIND_COUNT]

Ground height functions, by TERRAIN_KIND, called with (the remaining samples, x within the metatile, y within the metatile).

References fdTerrainGetBendDifferenceDiagonalHeight(), fdTerrainGetBendSumDiagonalHeight(), fdTerrainGetBendXHeight(), fdTerrainGetBendYHeight(), fdTerrainGetFlatBHeight(), fdTerrainGetFlatCHeight(), fdTerrainGetFlatHeight(), fdTerrainGetRoundedSquareHeight(), fdTerrainGetSampleTableHeight(), fdTerrainGetSampleTableMirroredHeight(), fdTerrainGetSlopeXHeight(), fdTerrainGetSlopeYHeight(), fdTerrainGetStepDifferenceDiagonalHeight(), fdTerrainGetStepSumDiagonalHeight(), fdTerrainGetStepXHeight() and fdTerrainGetStepYHeight().

Referenced by fdMapGridCheckCollision() and fdMapGridGetTerrainHeight().

Definition at line 9 of file map_grid_data.c.

WorldMapBattleEnvironments

const Uint8 WorldMapBattleEnvironments[48]

World map battle environments (BATTLE_ENVIRONMENT), indexed by the collision value plus 16 when the block word's top bit is set, or plus 32 (whatever that bit) for WORLD_MAP_ENCOUNTER_REGION_SNOWFIELD.

Referenced by fdWorldMapGetBattleEnvironment().

Definition at line 36 of file map_grid_data.c.

WorldMapDirectionOffsets

const Sint8 WorldMapDirectionOffsets[8][2]

The eight compass directions as (x, y) offsets of radius 40. No code in The Broken Seal names it.

Definition at line 58 of file map_grid_data.c.

WorldMapUnitScale

const Uint32 WorldMapUnitScale[2]

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

Definition at line 71 of file map_grid_data.c.