src/field/terrain_tables.c
The ground's shape inside a metatile for two of its height kinds (enum TERRAIN_KIND): where a raised or sunken square rounds off at its corners, and which of three heights each pixel takes, split along two diagonals.
Variables
| Name | Description | |
|---|---|---|
const Uint8 | TerrainRoundedSquareMask [256] | Which sample a TERRAIN_ROUNDED_SQUARE metatile takes at each pixel, by (row << 4) + column: the second (1) inside a square whose corners are rounded off, the first (0) in the corners. |
const Uint8 | TerrainSampleIndexTable [256] | Which of a TERRAIN_SAMPLE_TABLE metatile's three samples each pixel takes, by (row << 4) + column: 0, 1 or 2, split along two diagonals (fdTerrainGetSampleTableHeight). |
Description
The ground's shape inside a metatile for two of its height kinds (enum
TERRAIN_KIND): where a raised or sunken square rounds off at its corners, and
which of three heights each pixel takes, split along two diagonals.
Variables in detail
TerrainRoundedSquareMask
const Uint8 TerrainRoundedSquareMask[256]
Which sample a TERRAIN_ROUNDED_SQUARE metatile takes at each pixel, by (row
<< 4) + column: the second (1) inside a square whose corners are rounded off,
the first (0) in the corners.
Referenced by fdTerrainGetRoundedSquareHeight().
Definition at line 11 of file terrain_tables.c.
TerrainSampleIndexTable
const Uint8 TerrainSampleIndexTable[256]
Which of a TERRAIN_SAMPLE_TABLE metatile's three samples each pixel takes, by
(row << 4) + column: 0, 1 or 2, split along two diagonals (fdTerrainGetSampleTableHeight).
Referenced by fdTerrainGetSampleTableHeight() and fdTerrainGetSampleTableMirroredHeight().
Definition at line 32 of file terrain_tables.c.