Skip to Content
The Alchemy Project

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

NameDescription
enumanonymous enum { CURVE_VALUE_SHIFT, CURVE_HALF_STEPS, CURVE_FULL_STEPS }

Variables

NameDescription
extern const Uint8TerrainRoundedSquareMask [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 Uint8TerrainSampleIndexTable [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 }

EnumeratorValueDescription
CURVE_VALUE_SHIFT19turns a height sample (8-pixel units) into 16.16 fixed-point pixels
CURVE_HALF_STEPS8pixels to the middle of a 16-pixel metatile
CURVE_FULL_STEPS16pixels across a metatile

Definition at line 15 of file curve.h.