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 slants.
Variables
| Name | Description | |
|---|---|---|
Uint8 | TerrainRoundedSquareMask [256] | A rounded square, a byte per pixel of a 16-pixel metatile, row by row: 1 where the square stands (fdTerrainGetRoundedSquareHeight takes the second height there) and 0 in its four cut corners. |
Uint8 | TerrainSampleIndexTable [256] | Which of a metatile's three heights each pixel takes for TERRAIN_SAMPLE_TABLE (and, mirrored or turned, its three kin), row by row: 1 on a wedge that spans the left edge and narrows to the middle of the right, 0 above it and 2 below. |
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 slants.
Variables in detail
TerrainRoundedSquareMask
Uint8 TerrainRoundedSquareMask[256]
A rounded square, a byte per pixel of a 16-pixel metatile, row by row: 1
where the square stands (fdTerrainGetRoundedSquareHeight takes the second
height there) and 0 in its four cut corners.
Referenced by fdTerrainGetRoundedSquareHeight().
Definition at line 11 of file terrain_tables.c.
TerrainSampleIndexTable
Uint8 TerrainSampleIndexTable[256]
Which of a metatile's three heights each pixel takes for TERRAIN_SAMPLE_TABLE (and, mirrored or
turned, its three kin), row by row: 1 on a wedge that spans the left edge and narrows to the
middle of the right, 0 above it and 2 below.
Referenced by fdTerrainGetSampleTableHeight(), fdTerrainGetSampleTableMirroredHeight(), fdTerrainGetSampleTableTransposedHeight() and fdTerrainGetSampleTableTransposedMirroredHeight().
Definition at line 33 of file terrain_tables.c.