![]() |
Buildings |
58 building definitions, 32 bytes each, from $6576 to $6CB5. The building table (BUILDING_TABLE) gives one for each cell type and each way round the town is seen: type times two, plus one turned round; 70 entries, since open ground has none, reach these 58. A definition is two faces of eight columns, each column a pair of tile numbers, the tile on the ground and the tile above it (TILE_TABLE; the tiles are in the listing from TILE0).
DRAW_WALLS draws one from the cell's corner: the first face eight columns rightwards and down the screen, along the cell's low-V edge, and the second, mirrored, rightwards and up along its high-U edge -- the two edges nearer the viewer. DRAW_WALL_COLUMN draws a column, the lower tile with its foot at the column's place and the upper one 64 lines above (PUT_TILE); tiles are written over what is under them, clear pixels and all, so a wall hides what is behind it. The walls behind the knight are drawn this way. For a cell in front of him, or his own, DRAW_OUTLINE draws only the line along the foot of all four walls instead, the far two from the other view's definition, with a gap wherever a tile has an archway (TILE_EDGES).
Each picture below is the definition drawn by the game's own DRAW_WALLS in the simulator, in white (the game colours it by the cell type: see the cell types, where each type's two views are side by side), and the tiles of each column, the upper above the lower. Where one definition serves several types or both views, every one was drawn and they are the same.