Big ugly deuglyfication of DFTileTypes and its use in the tools.

develop
Petr Mrázek 2011-04-17 13:06:19 +02:00
parent e255a2cba6
commit 67ea981dc3
15 changed files with 810 additions and 780 deletions

@ -3,11 +3,643 @@
#include "dfhack/DFTileTypes.h"
#include "dfhack/DFExport.h"
namespace DFHack {
namespace DFHack
{
const TileRow tileTypeTable[TILE_TYPE_ARRAY_LENGTH] =
{
// 0
{"void",EMPTY, AIR, VAR_1},
{"ramp top",RAMP_TOP, AIR, VAR_1},
{"pool",FLOOR, SOIL, VAR_1, TILE_POOL},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
// 10
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{"driftwood stack",FLOOR, DRIFTWOOD, VAR_1},
// 20
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"tree",TREE_OK, SOIL, VAR_1},
{"ice stair up/down",STAIR_UPDOWN, ICE, VAR_1},
{"ice stair down",STAIR_DOWN, ICE, VAR_1},
{"ice stair up",STAIR_UP, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 30
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"empty space",EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"shrub",SHRUB_OK, SOIL, VAR_1},
{"chasm",FLOOR, AIR, VAR_1, TILE_ENDLESS },
{"obsidian stair up/down",STAIR_UPDOWN, OBSIDIAN, VAR_1},
{"obsidian stair down",STAIR_DOWN, OBSIDIAN, VAR_1},
{"obsidian stair up",STAIR_UP, OBSIDIAN, VAR_1},
{"soil stair up/down",STAIR_UPDOWN, SOIL, VAR_1},
// 40
{"soil stair down",STAIR_DOWN, SOIL, VAR_1},
{"soil stair up",STAIR_UP, SOIL, VAR_1},
{"eerie pit",FLOOR, HFS, VAR_1, TILE_ENDLESS},
{"smooth stone floor",FLOOR, STONE, VAR_1 , TILE_SMOOTH },
{"smooth obsidian floor",FLOOR, OBSIDIAN, VAR_1 , TILE_SMOOTH },
{"smooth featstone? floor",FLOOR, FEATSTONE, VAR_1 , TILE_SMOOTH },
{"smooth vein floor",FLOOR, VEIN, VAR_1 , TILE_SMOOTH },
{"smooth ice floor",FLOOR, ICE, VAR_1 , TILE_SMOOTH },
{0 ,EMPTY, AIR, VAR_1},
{"grass stair up/down",STAIR_UPDOWN, GRASS, VAR_1},
// 50
{"grass stair down",STAIR_DOWN, GRASS, VAR_1},
{"grass stair up",STAIR_UP, GRASS, VAR_1},
{"grass2 stair up/down",STAIR_UPDOWN, GRASS2, VAR_1},
{"grass2 stair down",STAIR_DOWN, GRASS2, VAR_1},
{"grass2 stair up",STAIR_UP, GRASS2, VAR_1},
{"stone stair up/down",STAIR_UPDOWN, STONE, VAR_1},
{"stone stair down",STAIR_DOWN, STONE, VAR_1},
{"stone stair up",STAIR_UP, STONE, VAR_1},
{"vein stair up/down",STAIR_UPDOWN, VEIN, VAR_1},
{"vein stair down",STAIR_DOWN, VEIN, VAR_1},
// 60
{"vein stair up",STAIR_UP, VEIN, VAR_1},
{"featstone? stair up/down",STAIR_UPDOWN, FEATSTONE, VAR_1},
{"featstone? stair down",STAIR_DOWN, FEATSTONE, VAR_1},
{"featstone? stair up",STAIR_UP, FEATSTONE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone fortification",FORTIFICATION, STONE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"campfire",FLOOR, CAMPFIRE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 70
{"fire",FLOOR, FIRE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone pillar",PILLAR, STONE, VAR_1},
//80
{"obsidian pillar",PILLAR, OBSIDIAN, VAR_1},
{"featstone? pillar",PILLAR, FEATSTONE, VAR_1},
{"vein pillar",PILLAR, VEIN, VAR_1},
{"ice pillar",PILLAR, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"waterfall landing",FLOOR, SOIL, VAR_1, TILE_WATERFALL }, // verify material
// 90
{"river source",FLOOR, SOIL, VAR_1, TILE_RIVER_SOURCE }, // verify material
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 100
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 110
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 120
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 130
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 140
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 150
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 160
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 170
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"cracked stone wall" ,WALL, STONE, VAR_1, TILE_CRACKED },
{"damaged stone wall" ,WALL, STONE, VAR_1, TILE_DAMAGED },
{"worn stone wall" ,WALL, STONE, VAR_1, TILE_WORN },
{0 ,EMPTY, AIR, VAR_1},
// 180
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 190
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 200
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 210
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone wall" ,WALL, STONE, VAR_1},
// 220
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 230
{0 ,EMPTY, AIR, VAR_1},
{"sapling" ,SAPLING_OK, SOIL, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"dry grass ramp" ,RAMP, GRASS_DRY, VAR_1},
{"dead grass ramp" ,RAMP, GRASS_DEAD, VAR_1},
{"grass ramp" ,RAMP, GRASS, VAR_1},
{"grass ramp" ,RAMP, GRASS2, VAR_1},
{"stone ramp" ,RAMP, STONE, VAR_1},
{"obsidian ramp" ,RAMP, OBSIDIAN, VAR_1},
{"featstone? ramp" ,RAMP, FEATSTONE, VAR_1},
// 240
{"vein ramp" ,RAMP, VEIN, VAR_1},
{"soil ramp" ,RAMP, SOIL, VAR_1},
{"ashes" ,FLOOR, ASHES, VAR_1},
{"ashes" ,FLOOR, ASHES, VAR_2},
{"ashes" ,FLOOR, ASHES, VAR_3},
{"ice ramp" ,RAMP, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 250
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"ice floor" ,FLOOR, ICE, VAR_2},
{"ice floor" ,FLOOR, ICE, VAR_3},
// 260
{"ice floor" ,FLOOR, ICE, VAR_4},
{"furrowed soil" ,FLOOR, SOIL, VAR_1},
{"ice floor" ,FLOOR, ICE, VAR_1},
{"semi-molten rock" ,WALL, MAGMA, VAR_1},// unminable magma wall
{"magma" ,FLOOR, MAGMA, VAR_1},
{"soil wall" ,WALL, SOIL, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"glowing floor" ,FLOOR, CYAN_GLOW, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"smooth obsidian wall RD2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--SS--E-" },
// 270
{"smooth obsidian wall R2D",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth obsidian wall R2U",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth obsidian wall RU2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth obsidian wall L2U",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth obsidian wall LU2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth obsidian wall L2D",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth obsidian wall LD2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth obsidian wall LRUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH ,"N-S-W-E-" },
{"smooth obsidian wall RUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth obsidian wall LRD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
// 280
{"smooth obsidian wall LRU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth obsidian wall LUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S-W---" },
{"smooth obsidian wall RD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth obsidian wall RU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth obsidian wall LU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth obsidian wall LD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth obsidian wall UD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth obsidian wall LR",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"smooth featstone wall RD2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--SS--E-" },
{"smooth featstone wall R2D",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S---EE" },
// 290
{"smooth featstone wall R2U",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth featstone wall RU2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth featstone wall L2U",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth featstone wall LU2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth featstone wall L2D",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth featstone wall LD2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth featstone wall LRUD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH ,"N-S-W-E-" },
{"smooth featstone wall RUD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth featstone wall LRD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth featstone wall LRU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
//300
{"smooth featstone wall LUD",WALL,FEATSTONE,VAR_1, TILE_SMOOTH , "N-S-W---" },
{"smooth featstone wall RD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth featstone wall RU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth featstone wall LU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth featstone wall LD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth featstone wall UD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth featstone wall LR",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"smooth stone wall RD2",WALL,STONE,VAR_1 , TILE_SMOOTH , "--SS--E-" },
{"smooth stone wall R2D",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth stone wall R2U",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-----EE" },
//310
{"smooth stone wall RU2",WALL,STONE,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth stone wall L2U",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth stone wall LU2",WALL,STONE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth stone wall L2D",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth stone wall LD2",WALL,STONE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth stone wall LRUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-W-E-" },
{"smooth stone wall RUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth stone wall LRD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth stone wall LRU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth stone wall LUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-W---" },
//320
{"smooth stone wall RD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth stone wall RU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth stone wall LU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth stone wall LD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth stone wall UD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth stone wall LR",WALL,STONE,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"obsidian fortification",FORTIFICATION,OBSIDIAN,VAR_1},
{"featstone? fortification",FORTIFICATION,FEATSTONE,VAR_1},
{"cracked obsidian wall",WALL,OBSIDIAN,VAR_1, TILE_CRACKED },
{"damaged obsidian wall",WALL,OBSIDIAN,VAR_1, TILE_DAMAGED },
// 330
{"worn obsidian wall",WALL,OBSIDIAN,VAR_1},
{"obsidian wall",WALL,OBSIDIAN,VAR_1},
/*MAPTILE_FEATSTONE_WALL_WORN1,
MAPTILE_FEATSTONE_WALL_WORN2,
MAPTILE_FEATSTONE_WALL_WORN3,
MAPTILE_FEATSTONE_WALL,*/
{"cracked featstone wall",WALL,FEATSTONE,VAR_1, TILE_CRACKED },
{"damaged featstone wall",WALL,FEATSTONE,VAR_1, TILE_DAMAGED },
{"worn featstone wall",WALL,FEATSTONE,VAR_1, TILE_WORN },
{"featstone wall",WALL,FEATSTONE,VAR_1},
{"stone floor",FLOOR,STONE,VAR_1},
{"stone floor",FLOOR,STONE,VAR_2},
{"stone floor",FLOOR,STONE,VAR_3},
{"stone floor",FLOOR,STONE,VAR_4},
// 340
{"obsidian floor",FLOOR,OBSIDIAN,VAR_1},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_2},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_3},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_4},
{"featstone floor 1",FLOOR,FEATSTONE,VAR_1},
{"featstone floor 2",FLOOR,FEATSTONE,VAR_2},
{"featstone floor 3",FLOOR,FEATSTONE,VAR_3},
{"featstone floor 4",FLOOR,FEATSTONE,VAR_4},
{"grass 1",FLOOR,GRASS,VAR_1},
{"grass 2",FLOOR,GRASS,VAR_2},
// 350
{"grass 3",FLOOR,GRASS,VAR_3},
{"grass 4",FLOOR,GRASS,VAR_4},
{"soil floor",FLOOR,SOIL,VAR_1},
{"soil floor",FLOOR,SOIL,VAR_2},
{"soil floor",FLOOR,SOIL,VAR_3},
{"soil floor",FLOOR,SOIL,VAR_4},
{"wet soil floor",FLOOR,SOIL,VAR_1},
{"wet soil floor",FLOOR,SOIL,VAR_2},
{"wet soil floor",FLOOR,SOIL,VAR_3},
{"wet soil floor",FLOOR,SOIL,VAR_4},
// 360
{"ice fortification",FORTIFICATION,ICE,VAR_1},
{"cracked ice wall",WALL,ICE,VAR_1, TILE_CRACKED},
{"damaged ice wall",WALL,ICE,VAR_1, TILE_DAMAGED},
{"worn ice wall",WALL,ICE,VAR_1, TILE_WORN },
{"ice wall",WALL,ICE,VAR_1},
{"river N",FLOOR,SOIL,VAR_1, TILE_RIVER , "N" },
{"river S",FLOOR,SOIL,VAR_1, TILE_RIVER , "S" },
{"river E",FLOOR,SOIL,VAR_1, TILE_RIVER , "E" },
{"river W",FLOOR,SOIL,VAR_1, TILE_RIVER , "W" },
{"river NW",FLOOR,SOIL,VAR_1, TILE_RIVER, "NW"},
//370
{"river NE",FLOOR,SOIL,VAR_1, TILE_RIVER , "NE" },
{"river SW",FLOOR,SOIL,VAR_1, TILE_RIVER , "SW" },
{"river SE",FLOOR,SOIL,VAR_1, TILE_RIVER , "SE" },
{"stream bed N",FLOOR,SOIL,VAR_1, TILE_STREAM , "N" },
{"stream bed S",FLOOR,SOIL,VAR_1, TILE_STREAM , "S" },
{"stream bed E",FLOOR,SOIL,VAR_1, TILE_STREAM , "E" },
{"stream bed W",FLOOR,SOIL,VAR_1, TILE_STREAM , "W" },
{"stream bed NW",FLOOR,SOIL,VAR_1, TILE_STREAM, "NW" },
{"stream bed NE",FLOOR,SOIL,VAR_1, TILE_STREAM, "NE" },
{"stream bed SW",FLOOR,SOIL,VAR_1, TILE_STREAM, "SW" },
// 380
{"stream bed SE",FLOOR,SOIL,VAR_1, TILE_STREAM, "SE" },
{"stream top",FLOOR,SOIL,VAR_1, TILE_STREAM_TOP },
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"dry grass 1",FLOOR,GRASS_DRY,VAR_1},
{"dry grass 2",FLOOR,GRASS_DRY,VAR_2},
{"dry grass 3",FLOOR,GRASS_DRY,VAR_3},
// 390
{"dry grass 4",FLOOR,GRASS_DRY,VAR_4},
{"dead tree",TREE_DEAD,SOIL,VAR_1},
{"dead sapling",SAPLING_DEAD,SOIL,VAR_1},
{"dead shrub",SHRUB_DEAD,SOIL,VAR_1},
{"dead grass 1",FLOOR,GRASS_DEAD,VAR_1},
{"dead grass 2",FLOOR,GRASS_DEAD,VAR_2},
{"dead grass 3",FLOOR,GRASS_DEAD,VAR_3},
{"dead grass 4",FLOOR,GRASS_DEAD,VAR_4},
{"grass B1",FLOOR,GRASS2,VAR_1},
{"grass B2",FLOOR,GRASS2,VAR_2},
// 400
{"grass B3",FLOOR,GRASS2,VAR_3},
{"grass B4",FLOOR,GRASS2,VAR_4},
{"boulder",BOULDER,STONE,VAR_1},
{"obsidian boulder",BOULDER,OBSIDIAN,VAR_1},
{"featstone? boulder",BOULDER,FEATSTONE,VAR_1},
{"pebbles 1",PEBBLES,STONE,VAR_1},
{"pebbles 2",PEBBLES,STONE,VAR_2},
{"pebbles 3",PEBBLES,STONE,VAR_3},
{"pebbles 4",PEBBLES,STONE,VAR_4},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_1},
// 410
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_2},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_3},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_4},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_1},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_2},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_3},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_4},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--SS--E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S---EE"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-----EE" },
// 420
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "NN----E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---WW--"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "NN--W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--SSW---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S---E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-W---"},
// 430
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S---E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-----E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-----"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "----W-E-"},
{"vein fortification",FORTIFICATION,VEIN,VAR_1},
{"cracked vein wall",WALL,VEIN,VAR_1, TILE_CRACKED },
{"damaged vein wall",WALL,VEIN,VAR_1, TILE_DAMAGED },
{"worn vein wall",WALL,VEIN,VAR_1 , TILE_WORN },
// 440
{"vein wall",WALL,VEIN,VAR_1},
{"vein floor",FLOOR,VEIN,VAR_1},
{"vein floor",FLOOR,VEIN,VAR_2},
{"vein floor",FLOOR,VEIN,VAR_3},
{"vein floor",FLOOR,VEIN,VAR_4},
{"vein boulder",BOULDER,VEIN,VAR_1},
{"vein pebbles",PEBBLES,VEIN,VAR_1},
{"vein pebbles",PEBBLES,VEIN,VAR_2},
{"vein pebbles",PEBBLES,VEIN,VAR_3},
{"vein pebbles",PEBBLES,VEIN,VAR_4},
// 450
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--SS--E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "NN----E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-W-E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
// 460
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-W---"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S---E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "----W-E-"},
{0 ,EMPTY, AIR, VAR_1},
// 470
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 480
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 490
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"constructed floor",FLOOR,CONSTRUCTED, VAR_1},
{"constructed fortification",FORTIFICATION,CONSTRUCTED, VAR_1},
{"constructed pillar",PILLAR,CONSTRUCTED, VAR_1},
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--SS--E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S---EE" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-----EE" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "NN----E-" },
// 500
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---WW--" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "NN--W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-WW--" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--SSW---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S---E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S---E-" },
// 510
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-----E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-----" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "----W-E-" },
{"constructed stair up/down",STAIR_UPDOWN,CONSTRUCTED, VAR_1},
{"constructed stair down",STAIR_DOWN,CONSTRUCTED, VAR_1},
{"constructed stair up",STAIR_UP,CONSTRUCTED, VAR_1},
{"constructed ramp",RAMP,CONSTRUCTED, VAR_1},
{0 ,EMPTY, AIR, VAR_1} // end
};
//set tile class string lookup table (e.g. for printing to user)
#define X(name,comment) #name,
const char * TileClassString[tileclass_count+1] = {
TILECLASS_MACRO
const char * TileShapeString[tileshape_count+1] = {
TILESHAPE_MACRO
0
};
#undef X
@ -28,4 +660,42 @@ namespace DFHack {
};
#undef X
int32_t findSimilarTileType( const int32_t sourceTileType, const TileShape tshape )
{
int32_t tt, maybe=0, match=0;
int value=0, matchv=0;
const TileRow *source = &tileTypeTable[sourceTileType];
#ifdef assert
assert( sourceTileType >=0 && sourceTileType < TILE_TYPE_ARRAY_LENGTH );
#endif
for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt)
{
if( tshape == tileTypeTable[tt].shape )
{
//shortcut null entries
if(!tileTypeTable[tt].name) continue;
//Special flag match is absolutely mandatory!
if( source->special != tileTypeTable[tt].special ) continue;
maybe=tt; value=0;
//Material is high-value match
if( tileTypeTable[tt].material == source->material ) value|=8;
//Direction is medium value match
if( tileTypeTable[tt].direction.whole == source->direction.whole ) value|=4;
//Variant is low-value match
if( tileTypeTable[tt].variant == source->variant ) value|=1;
//Check value against last match
if( value>matchv ){
match=tt;
matchv=value;
}
}
}
if( match ) return match;
return sourceTileType;
}
}

@ -53,7 +53,7 @@ int DFHack_isOpenTerrain(int in)
int DFHack_getVegetationType(int in)
{
return DFHack::getVegetationType(in);
return DFHack::tileShape(in);
}
int DFHack_getTileType(int index, TileRow* tPtr)

@ -35,7 +35,7 @@ namespace DFHack
// tile class -- determines the general shape of the tile
// enum and lookup table for string names created using X macros
#define TILECLASS_MACRO \
#define TILESHAPE_MACRO \
X(EMPTY, "") \
X(WALL, "") \
X(PILLAR, "") \
@ -54,18 +54,18 @@ namespace DFHack
X(SHRUB_OK, "") \
X(BOULDER, "") \
X(PEBBLES, "")
//end TILECLASS_MACRO
//end TILESHAPE_MACRO
//define tile class enum
#define X(name,comment) name,
enum TileClass {
tileclass_invalid=-1,
TILECLASS_MACRO
tileclass_count,
enum TileShape {
tileshape_invalid=-1,
TILESHAPE_MACRO
tileshape_count,
};
#undef X
DFHACK_EXPORT extern const char *TileClassString[];
DFHACK_EXPORT extern const char *TileShapeString[];
#define TILEMATERIAL_MACRO \
X(AIR, "empty" ) \
@ -243,7 +243,7 @@ namespace DFHack
struct TileRow
{
const char * name;
TileClass shape;
TileShape shape;
TileMaterial material;
TileVariant variant;
TileSpecial special;
@ -252,636 +252,8 @@ namespace DFHack
#define TILE_TYPE_ARRAY_LENGTH 520
const TileRow tileTypeTable[TILE_TYPE_ARRAY_LENGTH] =
{
// 0
{"void",EMPTY, AIR, VAR_1},
{"ramp top",RAMP_TOP, AIR, VAR_1},
{"pool",FLOOR, SOIL, VAR_1, TILE_POOL},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
// 10
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{0, EMPTY, AIR, VAR_1},
{"driftwood stack",FLOOR, DRIFTWOOD, VAR_1},
// 20
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"tree",TREE_OK, SOIL, VAR_1},
{"ice stair up/down",STAIR_UPDOWN, ICE, VAR_1},
{"ice stair down",STAIR_DOWN, ICE, VAR_1},
{"ice stair up",STAIR_UP, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 30
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"empty space",EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"shrub",SHRUB_OK, SOIL, VAR_1},
{"chasm",FLOOR, AIR, VAR_1, TILE_ENDLESS },
{"obsidian stair up/down",STAIR_UPDOWN, OBSIDIAN, VAR_1},
{"obsidian stair down",STAIR_DOWN, OBSIDIAN, VAR_1},
{"obsidian stair up",STAIR_UP, OBSIDIAN, VAR_1},
{"soil stair up/down",STAIR_UPDOWN, SOIL, VAR_1},
// 40
{"soil stair down",STAIR_DOWN, SOIL, VAR_1},
{"soil stair up",STAIR_UP, SOIL, VAR_1},
{"eerie pit",FLOOR, HFS, VAR_1, TILE_ENDLESS},
{"smooth stone floor",FLOOR, STONE, VAR_1 , TILE_SMOOTH },
{"smooth obsidian floor",FLOOR, OBSIDIAN, VAR_1 , TILE_SMOOTH },
{"smooth featstone? floor",FLOOR, FEATSTONE, VAR_1 , TILE_SMOOTH },
{"smooth vein floor",FLOOR, VEIN, VAR_1 , TILE_SMOOTH },
{"smooth ice floor",FLOOR, ICE, VAR_1 , TILE_SMOOTH },
{0 ,EMPTY, AIR, VAR_1},
{"grass stair up/down",STAIR_UPDOWN, GRASS, VAR_1},
// 50
{"grass stair down",STAIR_DOWN, GRASS, VAR_1},
{"grass stair up",STAIR_UP, GRASS, VAR_1},
{"grass2 stair up/down",STAIR_UPDOWN, GRASS2, VAR_1},
{"grass2 stair down",STAIR_DOWN, GRASS2, VAR_1},
{"grass2 stair up",STAIR_UP, GRASS2, VAR_1},
{"stone stair up/down",STAIR_UPDOWN, STONE, VAR_1},
{"stone stair down",STAIR_DOWN, STONE, VAR_1},
{"stone stair up",STAIR_UP, STONE, VAR_1},
{"vein stair up/down",STAIR_UPDOWN, VEIN, VAR_1},
{"vein stair down",STAIR_DOWN, VEIN, VAR_1},
// 60
{"vein stair up",STAIR_UP, VEIN, VAR_1},
{"featstone? stair up/down",STAIR_UPDOWN, FEATSTONE, VAR_1},
{"featstone? stair down",STAIR_DOWN, FEATSTONE, VAR_1},
{"featstone? stair up",STAIR_UP, FEATSTONE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone fortification",FORTIFICATION, STONE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"campfire",FLOOR, CAMPFIRE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 70
{"fire",FLOOR, FIRE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone pillar",PILLAR, STONE, VAR_1},
//80
{"obsidian pillar",PILLAR, OBSIDIAN, VAR_1},
{"featstone? pillar",PILLAR, FEATSTONE, VAR_1},
{"vein pillar",PILLAR, VEIN, VAR_1},
{"ice pillar",PILLAR, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"waterfall landing",FLOOR, SOIL, VAR_1, TILE_WATERFALL }, // verify material
// 90
{"river source",FLOOR, SOIL, VAR_1, TILE_RIVER_SOURCE }, // verify material
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 100
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 110
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 120
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 130
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 140
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 150
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 160
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 170
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"cracked stone wall" ,WALL, STONE, VAR_1, TILE_CRACKED },
{"damaged stone wall" ,WALL, STONE, VAR_1, TILE_DAMAGED },
{"worn stone wall" ,WALL, STONE, VAR_1, TILE_WORN },
{0 ,EMPTY, AIR, VAR_1},
// 180
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 190
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 200
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 210
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"stone wall" ,WALL, STONE, VAR_1},
// 220
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 230
{0 ,EMPTY, AIR, VAR_1},
{"sapling" ,SAPLING_OK, SOIL, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"dry grass ramp" ,RAMP, GRASS_DRY, VAR_1},
{"dead grass ramp" ,RAMP, GRASS_DEAD, VAR_1},
{"grass ramp" ,RAMP, GRASS, VAR_1},
{"grass ramp" ,RAMP, GRASS2, VAR_1},
{"stone ramp" ,RAMP, STONE, VAR_1},
{"obsidian ramp" ,RAMP, OBSIDIAN, VAR_1},
{"featstone? ramp" ,RAMP, FEATSTONE, VAR_1},
// 240
{"vein ramp" ,RAMP, VEIN, VAR_1},
{"soil ramp" ,RAMP, SOIL, VAR_1},
{"ashes" ,FLOOR, ASHES, VAR_1},
{"ashes" ,FLOOR, ASHES, VAR_2},
{"ashes" ,FLOOR, ASHES, VAR_3},
{"ice ramp" ,RAMP, ICE, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 250
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"ice floor" ,FLOOR, ICE, VAR_2},
{"ice floor" ,FLOOR, ICE, VAR_3},
// 260
{"ice floor" ,FLOOR, ICE, VAR_4},
{"furrowed soil" ,FLOOR, SOIL, VAR_1},
{"ice floor" ,FLOOR, ICE, VAR_1},
{"semi-molten rock" ,WALL, MAGMA, VAR_1},// unminable magma wall
{"magma" ,FLOOR, MAGMA, VAR_1},
{"soil wall" ,WALL, SOIL, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"glowing floor" ,FLOOR, CYAN_GLOW, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"smooth obsidian wall RD2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--SS--E-" },
// 270
{"smooth obsidian wall R2D",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth obsidian wall R2U",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth obsidian wall RU2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth obsidian wall L2U",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth obsidian wall LU2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth obsidian wall L2D",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth obsidian wall LD2",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth obsidian wall LRUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH ,"N-S-W-E-" },
{"smooth obsidian wall RUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth obsidian wall LRD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
// 280
{"smooth obsidian wall LRU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth obsidian wall LUD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S-W---" },
{"smooth obsidian wall RD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth obsidian wall RU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth obsidian wall LU",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth obsidian wall LD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth obsidian wall UD",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth obsidian wall LR",WALL,OBSIDIAN,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"smooth featstone wall RD2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--SS--E-" },
{"smooth featstone wall R2D",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S---EE" },
// 290
{"smooth featstone wall R2U",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth featstone wall RU2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth featstone wall L2U",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth featstone wall LU2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth featstone wall L2D",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth featstone wall LD2",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth featstone wall LRUD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH ,"N-S-W-E-" },
{"smooth featstone wall RUD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth featstone wall LRD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth featstone wall LRU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
//300
{"smooth featstone wall LUD",WALL,FEATSTONE,VAR_1, TILE_SMOOTH , "N-S-W---" },
{"smooth featstone wall RD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth featstone wall RU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth featstone wall LU",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth featstone wall LD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth featstone wall UD",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth featstone wall LR",WALL,FEATSTONE,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"smooth stone wall RD2",WALL,STONE,VAR_1 , TILE_SMOOTH , "--SS--E-" },
{"smooth stone wall R2D",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth stone wall R2U",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-----EE" },
//310
{"smooth stone wall RU2",WALL,STONE,VAR_1 , TILE_SMOOTH , "NN----E-" },
{"smooth stone wall L2U",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth stone wall LU2",WALL,STONE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth stone wall L2D",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth stone wall LD2",WALL,STONE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth stone wall LRUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-W-E-" },
{"smooth stone wall RUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
{"smooth stone wall LRD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth stone wall LRU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth stone wall LUD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-W---" },
//320
{"smooth stone wall RD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S---E-" },
{"smooth stone wall RU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth stone wall LU",WALL,STONE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth stone wall LD",WALL,STONE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth stone wall UD",WALL,STONE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth stone wall LR",WALL,STONE,VAR_1 , TILE_SMOOTH , "----W-E-" },
{"obsidian fortification",FORTIFICATION,OBSIDIAN,VAR_1},
{"featstone? fortification",FORTIFICATION,FEATSTONE,VAR_1},
{"cracked obsidian wall",WALL,OBSIDIAN,VAR_1, TILE_CRACKED },
{"damaged obsidian wall",WALL,OBSIDIAN,VAR_1, TILE_DAMAGED },
// 330
{"worn obsidian wall",WALL,OBSIDIAN,VAR_1},
{"obsidian wall",WALL,OBSIDIAN,VAR_1},
/*MAPTILE_FEATSTONE_WALL_WORN1,
MAPTILE_FEATSTONE_WALL_WORN2,
MAPTILE_FEATSTONE_WALL_WORN3,
MAPTILE_FEATSTONE_WALL,*/
{"cracked featstone wall",WALL,FEATSTONE,VAR_1, TILE_CRACKED },
{"damaged featstone wall",WALL,FEATSTONE,VAR_1, TILE_DAMAGED },
{"worn featstone wall",WALL,FEATSTONE,VAR_1, TILE_WORN },
{"featstone wall",WALL,FEATSTONE,VAR_1},
{"stone floor",FLOOR,STONE,VAR_1},
{"stone floor",FLOOR,STONE,VAR_2},
{"stone floor",FLOOR,STONE,VAR_3},
{"stone floor",FLOOR,STONE,VAR_4},
// 340
{"obsidian floor",FLOOR,OBSIDIAN,VAR_1},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_2},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_3},
{"obsidian floor",FLOOR,OBSIDIAN,VAR_4},
{"featstone floor 1",FLOOR,FEATSTONE,VAR_1},
{"featstone floor 2",FLOOR,FEATSTONE,VAR_2},
{"featstone floor 3",FLOOR,FEATSTONE,VAR_3},
{"featstone floor 4",FLOOR,FEATSTONE,VAR_4},
{"grass 1",FLOOR,GRASS,VAR_1},
{"grass 2",FLOOR,GRASS,VAR_2},
// 350
{"grass 3",FLOOR,GRASS,VAR_3},
{"grass 4",FLOOR,GRASS,VAR_4},
{"soil floor",FLOOR,SOIL,VAR_1},
{"soil floor",FLOOR,SOIL,VAR_2},
{"soil floor",FLOOR,SOIL,VAR_3},
{"soil floor",FLOOR,SOIL,VAR_4},
{"wet soil floor",FLOOR,SOIL,VAR_1},
{"wet soil floor",FLOOR,SOIL,VAR_2},
{"wet soil floor",FLOOR,SOIL,VAR_3},
{"wet soil floor",FLOOR,SOIL,VAR_4},
// 360
{"ice fortification",FORTIFICATION,ICE,VAR_1},
{"cracked ice wall",WALL,ICE,VAR_1, TILE_CRACKED},
{"damaged ice wall",WALL,ICE,VAR_1, TILE_DAMAGED},
{"worn ice wall",WALL,ICE,VAR_1, TILE_WORN },
{"ice wall",WALL,ICE,VAR_1},
{"river N",FLOOR,SOIL,VAR_1, TILE_RIVER , "N" },
{"river S",FLOOR,SOIL,VAR_1, TILE_RIVER , "S" },
{"river E",FLOOR,SOIL,VAR_1, TILE_RIVER , "E" },
{"river W",FLOOR,SOIL,VAR_1, TILE_RIVER , "W" },
{"river NW",FLOOR,SOIL,VAR_1, TILE_RIVER, "NW"},
//370
{"river NE",FLOOR,SOIL,VAR_1, TILE_RIVER , "NE" },
{"river SW",FLOOR,SOIL,VAR_1, TILE_RIVER , "SW" },
{"river SE",FLOOR,SOIL,VAR_1, TILE_RIVER , "SE" },
{"stream bed N",FLOOR,SOIL,VAR_1, TILE_STREAM , "N" },
{"stream bed S",FLOOR,SOIL,VAR_1, TILE_STREAM , "S" },
{"stream bed E",FLOOR,SOIL,VAR_1, TILE_STREAM , "E" },
{"stream bed W",FLOOR,SOIL,VAR_1, TILE_STREAM , "W" },
{"stream bed NW",FLOOR,SOIL,VAR_1, TILE_STREAM, "NW" },
{"stream bed NE",FLOOR,SOIL,VAR_1, TILE_STREAM, "NE" },
{"stream bed SW",FLOOR,SOIL,VAR_1, TILE_STREAM, "SW" },
// 380
{"stream bed SE",FLOOR,SOIL,VAR_1, TILE_STREAM, "SE" },
{"stream top",FLOOR,SOIL,VAR_1, TILE_STREAM_TOP },
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"dry grass 1",FLOOR,GRASS_DRY,VAR_1},
{"dry grass 2",FLOOR,GRASS_DRY,VAR_2},
{"dry grass 3",FLOOR,GRASS_DRY,VAR_3},
// 390
{"dry grass 4",FLOOR,GRASS_DRY,VAR_4},
{"dead tree",TREE_DEAD,SOIL,VAR_1},
{"dead sapling",SAPLING_DEAD,SOIL,VAR_1},
{"dead shrub",SHRUB_DEAD,SOIL,VAR_1},
{"dead grass 1",FLOOR,GRASS_DEAD,VAR_1},
{"dead grass 2",FLOOR,GRASS_DEAD,VAR_2},
{"dead grass 3",FLOOR,GRASS_DEAD,VAR_3},
{"dead grass 4",FLOOR,GRASS_DEAD,VAR_4},
{"grass B1",FLOOR,GRASS2,VAR_1},
{"grass B2",FLOOR,GRASS2,VAR_2},
// 400
{"grass B3",FLOOR,GRASS2,VAR_3},
{"grass B4",FLOOR,GRASS2,VAR_4},
{"boulder",BOULDER,STONE,VAR_1},
{"obsidian boulder",BOULDER,OBSIDIAN,VAR_1},
{"featstone? boulder",BOULDER,FEATSTONE,VAR_1},
{"pebbles 1",PEBBLES,STONE,VAR_1},
{"pebbles 2",PEBBLES,STONE,VAR_2},
{"pebbles 3",PEBBLES,STONE,VAR_3},
{"pebbles 4",PEBBLES,STONE,VAR_4},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_1},
// 410
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_2},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_3},
{"obsidian shards",PEBBLES,OBSIDIAN,VAR_4},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_1},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_2},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_3},
{"featstone? pebbles",PEBBLES,FEATSTONE,VAR_4},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--SS--E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S---EE"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-----EE" },
// 420
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "NN----E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---WW--"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "NN--W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--SSW---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S---E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---W-E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-W---"},
// 430
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S---E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-----E-"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N---W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "--S-W---"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "N-S-----"},
{"smooth vein wall",WALL,VEIN,VAR_1 , TILE_SMOOTH , "----W-E-"},
{"vein fortification",FORTIFICATION,VEIN,VAR_1},
{"cracked vein wall",WALL,VEIN,VAR_1, TILE_CRACKED },
{"damaged vein wall",WALL,VEIN,VAR_1, TILE_DAMAGED },
{"worn vein wall",WALL,VEIN,VAR_1 , TILE_WORN },
extern DFHACK_EXPORT const TileRow tileTypeTable[];
// 440
{"vein wall",WALL,VEIN,VAR_1},
{"vein floor",FLOOR,VEIN,VAR_1},
{"vein floor",FLOOR,VEIN,VAR_2},
{"vein floor",FLOOR,VEIN,VAR_3},
{"vein floor",FLOOR,VEIN,VAR_4},
{"vein boulder",BOULDER,VEIN,VAR_1},
{"vein pebbles",PEBBLES,VEIN,VAR_1},
{"vein pebbles",PEBBLES,VEIN,VAR_2},
{"vein pebbles",PEBBLES,VEIN,VAR_3},
{"vein pebbles",PEBBLES,VEIN,VAR_4},
// 450
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--SS--E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S---EE" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-----EE" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "NN----E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---WW--" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "NN--W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-WW--" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--SSW---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-W-E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S---E-" },
// 460
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-W-E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---W-E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-W---"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S---E-"},
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-----E-" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N---W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "--S-W---" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "N-S-----" },
{"smooth ice wall",WALL,ICE,VAR_1 , TILE_SMOOTH , "----W-E-"},
{0 ,EMPTY, AIR, VAR_1},
// 470
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 480
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
// 490
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{0 ,EMPTY, AIR, VAR_1},
{"constructed floor",FLOOR,CONSTRUCTED, VAR_1},
{"constructed fortification",FORTIFICATION,CONSTRUCTED, VAR_1},
{"constructed pillar",PILLAR,CONSTRUCTED, VAR_1},
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--SS--E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S---EE" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-----EE" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "NN----E-" },
// 500
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---WW--" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "NN--W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-WW--" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--SSW---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S---E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---W-E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S---E-" },
// 510
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-----E-" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N---W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "--S-W---" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "N-S-----" },
{"constructed wall",WALL,CONSTRUCTED, VAR_1 ,TILE_NORMAL, "----W-E-" },
{"constructed stair up/down",STAIR_UPDOWN,CONSTRUCTED, VAR_1},
{"constructed stair down",STAIR_DOWN,CONSTRUCTED, VAR_1},
{"constructed stair up",STAIR_UP,CONSTRUCTED, VAR_1},
{"constructed ramp",RAMP,CONSTRUCTED, VAR_1},
{0 ,EMPTY, AIR, VAR_1} // end
};
// tile is missing a floor
inline
bool LowPassable(uint16_t tiletype)
@ -926,65 +298,97 @@ namespace DFHack
inline
bool FlowPassable(uint16_t tiletype)
{
TileClass tc = tileTypeTable[tiletype].shape;
TileShape tc = tileTypeTable[tiletype].shape;
return tc != WALL && tc != PILLAR && tc != TREE_DEAD && tc != TREE_OK;
};
inline
bool isWallTerrain(int in)
bool isWallTerrain(int tiletype)
{
return tileTypeTable[tiletype].shape >= WALL && tileTypeTable[tiletype].shape <= FORTIFICATION ;
}
inline
bool isFloorTerrain(int tiletype)
{
return tileTypeTable[tiletype].shape >= FLOOR && tileTypeTable[tiletype].shape <= PEBBLES;
}
inline
bool isRampTerrain(int tiletype)
{
return tileTypeTable[tiletype].shape == RAMP;
}
inline
bool isStairTerrain(int tiletype)
{
return tileTypeTable[tiletype].shape >= STAIR_UP && tileTypeTable[tiletype].shape <= STAIR_UPDOWN;
}
inline
bool isOpenTerrain(int tiletype)
{
return tileTypeTable[tiletype].shape == EMPTY;
}
inline
const char * tileName(int tiletype)
{
return tileTypeTable[in].shape >= WALL && tileTypeTable[in].shape <= FORTIFICATION ;
return tileTypeTable[tiletype].name;
}
inline
bool isFloorTerrain(int in)
TileShape tileShape(int tiletype)
{
return tileTypeTable[in].shape >= FLOOR && tileTypeTable[in].shape <= PEBBLES;
return tileTypeTable[tiletype].shape;
}
inline
bool isRampTerrain(int in)
TileSpecial tileSpecial(int tiletype)
{
return tileTypeTable[in].shape == RAMP;
return tileTypeTable[tiletype].special;
}
inline
bool isStairTerrain(int in)
TileVariant tileVariant(int tiletype)
{
return tileTypeTable[in].shape >= STAIR_UP && tileTypeTable[in].shape <= STAIR_UPDOWN;
return tileTypeTable[tiletype].variant;
}
inline
bool isOpenTerrain(int in)
TileMaterial tileMaterial(int tiletype)
{
return tileTypeTable[in].shape == EMPTY;
return tileTypeTable[tiletype].material;
}
inline
int getVegetationType(int in)
TileDirection tileDirection(int tiletype)
{
return tileTypeTable[in].shape;
return tileTypeTable[tiletype].direction;
}
//zilpin: for convenience, when you'll be using the tile information a lot.
/// Safely access the tyle type array.
inline const
TileRow * getTileTypeP(int in)
TileRow * getTileRow(int tiletype)
{
if( in<0 || in>=TILE_TYPE_ARRAY_LENGTH ) return 0;
return ( const TileRow * ) &tileTypeTable[in];
if( tiletype<0 || tiletype>=TILE_TYPE_ARRAY_LENGTH ) return 0;
return ( const TileRow * ) &tileTypeTable[tiletype];
}
//zilpin: Find the first tile entry which matches the given search criteria.
//All parameters are optional.
//To omit, use the 'invalid' enum for that type (e.g. tileclass_invalid, tilematerial_invalid, etc)
//For tile directions, pass NULL to omit.
//Returns matching index in tileTypeTable, or -1 if none found.
/**
* zilpin: Find the first tile entry which matches the given search criteria.
* All parameters are optional.
* To omit, use the 'invalid' enum for that type (e.g. tileclass_invalid, tilematerial_invalid, etc)
* For tile directions, pass NULL to omit.
* @return matching index in tileTypeTable, or -1 if none found.
*/
inline
int32_t findTileType( const TileClass tclass, const TileMaterial tmat, const TileVariant tvar, const TileSpecial tspecial, const TileDirection tdir )
int32_t findTileType( const TileShape tshape, const TileMaterial tmat, const TileVariant tvar, const TileSpecial tspecial, const TileDirection tdir )
{
int32_t tt;
for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){
if( tclass>-1 ) if( tclass != tileTypeTable[tt].shape ) continue;
if( tshape>-1 ) if( tshape != tileTypeTable[tt].shape ) continue;
if( tmat>-1 ) if( tmat != tileTypeTable[tt].material ) continue;
if( tvar>-1 ) if( tvar != tileTypeTable[tt].variant ) continue;
if( tspecial>-1 ) if( tspecial != tileTypeTable[tt].special ) continue;
@ -994,60 +398,15 @@ namespace DFHack
}
return -1;
}
/*
//Convenience version of the above, to pass strings as the direction
inline
int32_t findTileType( const TileClass tclass, const TileMaterial tmat, const TileVariant tvar, const TileSpecial tspecial, const char *tdirStr )
{
if(tdirStr){
TileDirection tdir(tdirStr);
return findTileType(tclass,tmat,tvar,tspecial, tdir );
}else{
return findTileType(tclass,tmat,tvar,tspecial, 0 );
}
}
*/
//zilpin: Find a tile type similar to the one given, but with a different class.
//Useful for tile-editing operations.
//If no match found, returns the sourceType
//Definitely needs improvement for wall directions, etc.
inline
int32_t findSimilarTileType( const int32_t sourceTileType, const TileClass tclass ){
int32_t tt, maybe=0, match=0;
int value=0, matchv=0;
const TileRow *source = &tileTypeTable[sourceTileType];
#ifdef assert
assert( sourceTileType >=0 && sourceTileType < TILE_TYPE_ARRAY_LENGTH );
#endif
for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){
if( tclass == tileTypeTable[tt].shape ){
//shortcut null entries
if(!tileTypeTable[tt].name) continue;
//Special flag match is absolutely mandatory!
if( source->special != tileTypeTable[tt].special ) continue;
maybe=tt; value=0;
//Material is high-value match
if( tileTypeTable[tt].material == source->material ) value|=8;
//Direction is medium value match
if( tileTypeTable[tt].direction.whole == source->direction.whole ) value|=4;
//Variant is low-value match
if( tileTypeTable[tt].variant == source->variant ) value|=1;
//Check value against last match
if( value>matchv ){
match=tt;
matchv=value;
}
}
}
if( match ) return match;
return sourceTileType;
}
/**
* zilpin: Find a tile type similar to the one given, but with a different class.
* Useful for tile-editing operations.
* If no match found, returns the sourceType
*
* @todo Definitely needs improvement for wall directions, etc.
*/
DFHACK_EXPORT int32_t findSimilarTileType( const int32_t sourceTileType, const TileShape tshape );
}

@ -20,8 +20,7 @@ void SquashVeins (DFHack::Maps *m, DFHack::DFCoord bcoord, DFHack::mapblock40d &
for (uint32_t k = 0; k< 16;k++)
{
int16_t tt = mb.tiletypes[k][j];
DFHack::TileMaterial mat = DFHack::tileTypeTable[tt].material;
if(mat == DFHack::VEIN)
if(DFHack::tileMaterial(tt) == DFHack::VEIN)
{
for(int i = (int) veins.size() - 1; i >= 0;i--)
{

@ -258,7 +258,7 @@ int main (int numargs, const char ** args)
{
int xidx = xx+(16*(x-tx1)-(cx1%16));
int16_t tt = block.tiletypes[xx][yy];
DFHack::TileClass ts = DFHack::tileTypeTable[tt].shape;
DFHack::TileShape ts = DFHack::tileShape(tt);
if(DFHack::isOpenTerrain(tt) || DFHack::isFloorTerrain(tt))
{
dig[zidx][yidx][xidx] = "d";

@ -165,7 +165,7 @@ int dig(DFHack::Maps* Maps,
{
if (/*designations[lx][ly].bits.hidden == 0 && */
designations[lx][ly].bits.dig == 0 &&
vec_count(targets, DFHack::tileTypeTable[tiles[lx][ly]].shape) > 0)
vec_count(targets, DFHack::tileShape(tiles[lx][ly])) > 0)
{
DigTarget dt(
x, y, z,

@ -26,7 +26,8 @@ using namespace std;
#define BLOCK_SIZE 16
void dig(DFHack::Maps* layers, DFHack::Gui* Gui, ::std::vector< ::std::string >& dig_map, bool verbose = false) {
void dig(DFHack::Maps* layers, DFHack::Gui* Gui, ::std::vector< ::std::string >& dig_map, bool verbose = false)
{
int32_t x_cent;
int32_t y_cent;
int32_t z_cent;
@ -63,7 +64,8 @@ void dig(DFHack::Maps* layers, DFHack::Gui* Gui, ::std::vector< ::std::string >&
int32_t x = 0;
::std::string::iterator chr_it;
for (chr_it = str_it->begin(); chr_it != str_it ->end(); ++chr_it) {
for (chr_it = str_it->begin(); chr_it != str_it ->end(); ++chr_it)
{
int32_t x_grid = (x_from + x) / BLOCK_SIZE;
int32_t y_grid = (y_from + y) / BLOCK_SIZE;
int32_t z_grid = z_from + z;
@ -71,41 +73,44 @@ void dig(DFHack::Maps* layers, DFHack::Gui* Gui, ::std::vector< ::std::string >&
int32_t y_locl = (y_from + y) - y_grid * BLOCK_SIZE;
int32_t z_locl = 0;
if (x_grid >= 0 && y_grid >= 0 && x_grid < x_max && y_grid < y_max) {
if (x_grid >= 0 && y_grid >= 0 && x_grid < x_max && y_grid < y_max)
{
// TODO this could probably be made much better, theres a big chance the trees are on the same grid
layers->ReadDesignations(x_grid, y_grid, z_grid, &designations);
layers->ReadTileTypes(x_grid, y_grid, z_grid, &tiles);
// ::std::cout << ::std::hex << "designations: " << designations[x_locl][y_locl].bits.dig << ::std::dec << ::std::endl;
if (designations[x_locl][y_locl].bits.dig == DFHack::designation_no && DFHack::tileTypeTable[tiles[x_locl][y_locl]].shape == DFHack::WALL) {
DFHack::e_designation type = DFHack::designation_no;
switch ((char) *chr_it) {
DFHack::naked_designation & des = designations[x_locl][y_locl].bits;
if ( DFHack::tileShape(tiles[x_locl][y_locl]) == DFHack::WALL)
{
switch ((char) *chr_it)
{
case 'd':
designations[x_locl][y_locl].bits.dig = DFHack::designation_default;
des.dig = DFHack::designation_default;
break;
case 'u':
designations[x_locl][y_locl].bits.dig = DFHack::designation_u_stair;
des.dig = DFHack::designation_u_stair;
break;
case 'j':
designations[x_locl][y_locl].bits.dig = DFHack::designation_d_stair;
des.dig = DFHack::designation_d_stair;
break;
case 'i':
designations[x_locl][y_locl].bits.dig = DFHack::designation_ud_stair;
des.dig = DFHack::designation_ud_stair;
break;
case 'h':
designations[x_locl][y_locl].bits.dig = DFHack::designation_channel;
des.dig = DFHack::designation_channel;
break;
case 'r':
designations[x_locl][y_locl].bits.dig = DFHack::designation_ramp;
des.dig = DFHack::designation_ramp;
break;
case 'x':
designations[x_locl][y_locl].bits.dig = DFHack::designation_no;
des.dig = DFHack::designation_no;
break;
}
if (verbose) {
// ::std::cout << "designating " << (char) *chr_it << " at " << x_from + x << " " << y_from + y << " " << z_from + z << ::std::endl;
if (verbose)
{
::std::cout << "designating " << (char) *chr_it << " at " << x_from + x << " " << y_from + y << " " << z_from + z << ::std::endl;
}
layers->WriteDesignations(x_grid, y_grid, z_grid, &designations);

@ -716,10 +716,10 @@ int main (void)
{
if ( (pattern[x][y]>1) || (roof && pattern[x][y]) )
{
tp = getTileTypeP(block.tiletypes[x][y]);
tp = getTileRow(block.tiletypes[x][y]);
d = &block.designation[x][y];
//Only modify this level if it's 'empty'
if ( EMPTY != tp->shape && RAMP_TOP != tp->shape && STAIR_DOWN != tp->shape && DFHack::TILE_STREAM_TOP != tp->shape)
if ( EMPTY != tp->shape && RAMP_TOP != tp->shape && STAIR_DOWN != tp->shape && DFHack::TILE_STREAM_TOP != tp->special)
{
continue;
}
@ -782,7 +782,7 @@ int main (void)
for (int32_t y=0;y<16;++y)
{
t=0;
tp = getTileTypeP(block.tiletypes[x][y]);
tp = getTileRow(block.tiletypes[x][y]);
d = &block.designation[x][y];
tpat=pattern[x][y];
@ -926,7 +926,7 @@ int main (void)
for (int32_t y=0;!done && y<16;++y)
{
t=0;
tp = getTileTypeP(block.tiletypes[x][y]);
tp = getTileRow(block.tiletypes[x][y]);
d = &block.designation[x][y];
tpat=pattern[x][y];
@ -1177,7 +1177,7 @@ int main (void)
{
t=floor;
v=floorvar;
tp = getTileTypeP(block.tiletypes[x][y]);
tp = getTileRow(block.tiletypes[x][y]);
d = &block.designation[x][y];
if ( exposehell )

@ -31,10 +31,10 @@ int main (int argc, char **argv)
//Classes
fprintf(f,"\nTile Type Classes:\n");
for(i=0;i<tileclass_count;++i)
for(i=0;i<tileshape_count;++i)
{
Size[1]=max<size_t>(Size[1],strlen(TileClassString[i]));
fprintf(f,"%4i ; %s\n", i, TileClassString[i] ,0 );
Size[1]=max<size_t>(Size[1],strlen(TileShapeString[i]));
fprintf(f,"%4i ; %s\n", i, TileShapeString[i] ,0 );
}
//Materials
@ -77,7 +77,7 @@ int main (int argc, char **argv)
{
fprintf(f," %*i ; %-*s ; %-*s ; %*c ; %-*s ; %-*s ; %s\n",
Size[0], i,
Size[1], ( tileTypeTable[i].name ? TileClassString[ tileTypeTable[i].shape ] : "" ),
Size[1], ( tileTypeTable[i].name ? TileShapeString[ tileTypeTable[i].shape ] : "" ),
Size[2], ( tileTypeTable[i].name ? TileMaterialString[ tileTypeTable[i].material ] : "" ),
Size[3], ( tileTypeTable[i].variant ? '0'+tileTypeTable[i].variant : ' ' ),
Size[4], ( tileTypeTable[i].special ? TileSpecialString[ tileTypeTable[i].special ] : "" ),

@ -91,7 +91,7 @@ int main (void)
//Only the remove ramp designation (ignore channel designation, etc)
oldT = tiles[tx][ty];
if ( DFHack::designation_default == designations[tx][ty].bits.dig
&& DFHack::RAMP==DFHack::tileTypeTable[oldT].shape)
&& DFHack::RAMP==DFHack::tileShape(oldT))
{
//Current tile is a ramp.
//Set current tile, as accurately as can be expected
@ -104,7 +104,7 @@ int main (void)
designations[tx][ty].bits.dig = DFHack::designation_no;
//Check the tile above this one, in case a downward slope needs to be removed.
if ( DFHack::RAMP_TOP == DFHack::tileTypeTable[tilesAbove[tx][ty]].shape )
if ( DFHack::RAMP_TOP == DFHack::tileShape(tilesAbove[tx][ty]) )
{
tilesAbove[tx][ty] = 32;
}
@ -112,7 +112,7 @@ int main (void)
++count;
}
// ramp fixer
else if(DFHack::RAMP!=DFHack::tileTypeTable[oldT].shape && DFHack::RAMP_TOP == DFHack::tileTypeTable[tilesAbove[tx][ty]].shape)
else if(DFHack::RAMP!=DFHack::tileShape(oldT) && DFHack::RAMP_TOP == DFHack::tileShape(tilesAbove[tx][ty]))
{
tilesAbove[tx][ty] = 32;
countbad++;

@ -87,8 +87,7 @@ int main (void)
{
if(!designations[tx][ty].bits.feature_local) continue;
oldT = tiles[tx][ty];
DFHack::TileClass ttype = DFHack::tileTypeTable[oldT].shape;
if ( ttype != DFHack::WALL )
if ( DFHack::tileShape(oldT) != DFHack::WALL )
{
//Current tile is not a wall.
//Set current tile, as accurately as can be expected

@ -108,14 +108,17 @@ int main (int numargs, const char ** args)
// tiletype
std::cout <<"tiletype: " << tiletype;
if(tileTypeTable[tiletype].name)
std::cout << " = " << tileTypeTable[tiletype].name << std::endl;
printf("%-10s: %4d %s\n","Class",tileTypeTable[tiletype].shape,TileClassString[ tileTypeTable[tiletype].shape ]);
printf("%-10s: %4d %s\n","Material",tileTypeTable[tiletype].material,TileMaterialString[ tileTypeTable[tiletype].material ]);
printf("%-10s: %4d %s\n","Special",tileTypeTable[tiletype].special,TileSpecialString[ tileTypeTable[tiletype].special ]);
printf("%-10s: %4d\n","Variant",tileTypeTable[tiletype].variant);
printf("%-10s: %s\n","Direction",tileTypeTable[tiletype].direction.getStr());
if(tileName(tiletype))
std::cout << " = " << tileName(tiletype) << std::endl;
DFHack::TileShape shape = tileShape(tiletype);
DFHack::TileMaterial material = tileMaterial(tiletype);
DFHack::TileSpecial special = tileSpecial(tiletype);
printf("%-10s: %4d %s\n","Class" ,shape, TileShapeString[ shape ]);
printf("%-10s: %4d %s\n","Material" ,material,TileMaterialString[ material ]);
printf("%-10s: %4d %s\n","Special" ,special, TileSpecialString[ special ]);
printf("%-10s: %4d\n" ,"Variant" ,tileVariant(tiletype));
printf("%-10s: %s\n" ,"Direction",tileDirection(tiletype).getStr());
std::cout << std::endl;
std::cout <<"temperature1: " << mc.temperature1At(cursor) << " U" << std::endl;

@ -172,7 +172,7 @@ int main (int argc, const char* argv[])
{
for (uint32_t yy = 0; yy< 16;yy++)
{
DFHack::TileMaterial mat = DFHack::tileTypeTable[tt[xx][yy]].material;
DFHack::TileMaterial mat = DFHack::tileMaterial(tt[xx][yy]);
if(mat != DFHack::SOIL && mat != DFHack::STONE)
continue;
uint8_t test = Block.designation[xx][yy].bits.biome;
@ -200,7 +200,7 @@ int main (int argc, const char* argv[])
//iterate through the bits
for (uint32_t k = 0; k< 16;k++)
{
DFHack::TileMaterial mat = DFHack::tileTypeTable[tt[k][j]].material;
DFHack::TileMaterial mat = DFHack::tileMaterial(tt[k][j]);
if(mat != DFHack::VEIN)
continue;
// and the bit array with a one-bit mask, check if the bit is set
@ -220,7 +220,8 @@ int main (int argc, const char* argv[])
{
for(uint32_t xi = 0 ; xi< 16 ; xi++) for(uint32_t yi = 0 ; yi< 16 ; yi++)
{
if(Block.designation[xi][yi].bits.feature_global)
DFHack::TileMaterial mat = DFHack::tileMaterial(tt[xi][yi]);
if(Block.designation[xi][yi].bits.feature_global && mat == DFHack::FEATSTONE)
{
if(global_features[idx].main_material == 0) // stone
{
@ -247,7 +248,8 @@ int main (int argc, const char* argv[])
{
for(uint32_t xi = 0 ; xi< 16 ; xi++) for(uint32_t yi = 0 ; yi< 16 ; yi++)
{
if(Block.designation[xi][yi].bits.feature_local && DFHack::isWallTerrain(Block.tiletypes[xi][yi]))
DFHack::TileMaterial mat = DFHack::tileMaterial(tt[xi][yi]);
if(Block.designation[xi][yi].bits.feature_local && mat == DFHack::FEATSTONE)
{
if(vectr[idx]->main_material == 0) // stone
{

@ -117,7 +117,7 @@ int main (int argc, char* argv[])
{
continue;
}
const TileRow * r = getTileTypeP(tt);
const TileRow * r = getTileRow(tt);
if(!r)
{
cerr << "unknown tiletype! " << dec << tt << endl;

@ -93,7 +93,7 @@ void putwch(int x, int y, int znak, int color)
void puttile(int x, int y, int tiletype, int color)
{
unsigned int znak;
switch(tileTypeTable[tiletype].shape)
switch(tileShape(tiletype))
{
case EMPTY:
znak = ' ';
@ -199,7 +199,7 @@ void clrscr()
*/
int pickColor(int tiletype)
{
switch(tileTypeTable[tiletype].material)
switch(tileMaterial(tiletype))
{
case AIR:
return COLOR_BLACK;
@ -792,8 +792,9 @@ int main(int argc, char *argv[])
{
for(int x = 0; x < 16; x++) for(int y = 0; y < 16; y++)
{
TileClass tc = tileTypeTable[Block->tiletypes[x][y]].shape;
TileMaterial tm = tileTypeTable[Block->tiletypes[x][y]].material;
int16_t tiletype = Block->tiletypes[x][y];
TileShape tc = tileShape(tiletype);
TileMaterial tm = tileMaterial(tiletype);
if( tc == WALL && tm == VEIN || tc == TREE_OK || tc == TREE_DEAD)
{
Block->designation[x][y].bits.dig = designation_default;
@ -901,14 +902,6 @@ int main(int argc, char *argv[])
//iterate through the bits
for (uint32_t k = 0; k< 16;k++)
{
/*
if(tileTypeTable[blocks[1][1].tiletypes[k][j]].m != VEIN)
continue;
*/
/*
if(blocks[1][1].designation[k][j].bits.hidden)
continue;
*/
// and the bit array with a one-bit mask, check if the bit is set
bool set = !!(((1 << k) & veinVector[realvein].assignment[j]) >> k);
if(set)