Expand description
A tileset’s terrain tiles (game ADR-0052): the pictures a grid map’s sprite skin paints its ground with. For each look a map may ask for (outdoors, indoors), a tile for every terrain and the layers painted over those tiles. A layer’s picture is chosen from the tiles around it, so a terrain grid alone says what the map looks like: a map file only ever names terrain.
Two kinds of layer:
- Corners: pictures drawn between tiles, each centred on the point where four tiles meet, one for each mix of those four being in the layer or not. A shore, a road’s edge and a forest’s outline are these: they end where their tiles end.
- Tiles: one picture on each tile of the layer (a tower, a bridge), which may depend on which of its four neighbours are certain terrains (a bridge turns to cross the water).
These are the tiles as a skin paints them; how a game writes them in a file, and which terrains it has, are the game’s.
Structs§
- Corner
Layer - Pictures drawn between tiles: each is one tile big and centred on a point where four tiles meet.
- Look
- A terrain look: how one kind of place (outdoors, indoors) is drawn.
- Terrain
Tiles - A tileset’s terrain tiles. Build it with
TerrainTiles::new(ADR-0039). - Tile
Layer - A picture on each tile of some terrains.
Enums§
Constants§
- MIXES
- How many mixes four yes-or-no places have: a layer has a picture for each (or none).
- MIX_IN
- The character of a place that is in, in a mix as written (
"##.."). - MIX_OUT
- The character of a place that is out.
Functions§
- mix
- The number of a mix of four places, the first the highest bit: for a corners layer the tiles at the top-left, top-right, bottom-left and bottom-right of a corner point; for a tile’s sides its neighbours up, right, down and left.
- mix_
name - Mix
mas written: four ofMIX_INandMIX_OUT. - parse_
mix - The mix written as four of
MIX_INandMIX_OUT, orNoneiftextisn’t that.