include/field/curve.h
The step counts, value shift, and per-pixel tables of the terrain height curves (terrain_tables.c).
Included by field_internal.h and terrain_tables.c.
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { CURVE_VALUE_SHIFT, CURVE_HALF_STEPS, CURVE_FULL_STEPS } |
Variables
| Name | Description | |
|---|---|---|
extern 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. |
extern const Uint8 | TerrainSampleIndexTable [256] | The sample fdTerrainGetSampleTableHeight reads at each position: 0, 1 or 2, split along two diagonals. |
Description
The step counts, value shift, and per-pixel tables of the terrain height
curves (terrain_tables.c).
Enumerations in detail
anonymous enum
enum { CURVE_VALUE_SHIFT, CURVE_HALF_STEPS, CURVE_FULL_STEPS }
| Enumerator | Value | Description |
|---|---|---|
CURVE_VALUE_SHIFT | 19 | turns a height sample (8-pixel units) into 16.16 fixed-point pixels |
CURVE_HALF_STEPS | 8 | pixels to the middle of a 16-pixel metatile |
CURVE_FULL_STEPS | 16 | pixels across a metatile |
Definition at line 15 of file curve.h.