Rename single character member variables from DFTileTypes to something sensible.

develop
Petr Mrázek 2011-04-17 11:37:36 +02:00
parent 6e607d45d9
commit e255a2cba6
13 changed files with 100 additions and 68 deletions

@ -243,11 +243,11 @@ namespace DFHack
struct TileRow struct TileRow
{ {
const char * name; const char * name;
TileClass c; TileClass shape;
TileMaterial m; TileMaterial material;
TileVariant v; TileVariant variant;
TileSpecial s; TileSpecial special;
TileDirection d; TileDirection direction;
}; };
#define TILE_TYPE_ARRAY_LENGTH 520 #define TILE_TYPE_ARRAY_LENGTH 520
@ -886,7 +886,7 @@ namespace DFHack
inline inline
bool LowPassable(uint16_t tiletype) bool LowPassable(uint16_t tiletype)
{ {
switch(DFHack::tileTypeTable[tiletype].c) switch(DFHack::tileTypeTable[tiletype].shape)
{ {
case DFHack::EMPTY: case DFHack::EMPTY:
case DFHack::STAIR_DOWN: case DFHack::STAIR_DOWN:
@ -902,7 +902,7 @@ namespace DFHack
inline inline
bool HighPassable(uint16_t tiletype) bool HighPassable(uint16_t tiletype)
{ {
switch(DFHack::tileTypeTable[tiletype].c) switch(DFHack::tileTypeTable[tiletype].shape)
{ {
case DFHack::EMPTY: case DFHack::EMPTY:
case DFHack::STAIR_DOWN: case DFHack::STAIR_DOWN:
@ -926,44 +926,44 @@ namespace DFHack
inline inline
bool FlowPassable(uint16_t tiletype) bool FlowPassable(uint16_t tiletype)
{ {
TileClass tc = tileTypeTable[tiletype].c; TileClass tc = tileTypeTable[tiletype].shape;
return tc != WALL && tc != PILLAR && tc != TREE_DEAD && tc != TREE_OK; return tc != WALL && tc != PILLAR && tc != TREE_DEAD && tc != TREE_OK;
}; };
inline inline
bool isWallTerrain(int in) bool isWallTerrain(int in)
{ {
return tileTypeTable[in].c >= WALL && tileTypeTable[in].c <= FORTIFICATION ; return tileTypeTable[in].shape >= WALL && tileTypeTable[in].shape <= FORTIFICATION ;
} }
inline inline
bool isFloorTerrain(int in) bool isFloorTerrain(int in)
{ {
return tileTypeTable[in].c >= FLOOR && tileTypeTable[in].c <= PEBBLES; return tileTypeTable[in].shape >= FLOOR && tileTypeTable[in].shape <= PEBBLES;
} }
inline inline
bool isRampTerrain(int in) bool isRampTerrain(int in)
{ {
return tileTypeTable[in].c == RAMP; return tileTypeTable[in].shape == RAMP;
} }
inline inline
bool isStairTerrain(int in) bool isStairTerrain(int in)
{ {
return tileTypeTable[in].c >= STAIR_UP && tileTypeTable[in].c <= STAIR_UPDOWN; return tileTypeTable[in].shape >= STAIR_UP && tileTypeTable[in].shape <= STAIR_UPDOWN;
} }
inline inline
bool isOpenTerrain(int in) bool isOpenTerrain(int in)
{ {
return tileTypeTable[in].c == EMPTY; return tileTypeTable[in].shape == EMPTY;
} }
inline inline
int getVegetationType(int in) int getVegetationType(int in)
{ {
return tileTypeTable[in].c; return tileTypeTable[in].shape;
} }
//zilpin: for convenience, when you'll be using the tile information a lot. //zilpin: for convenience, when you'll be using the tile information a lot.
@ -984,11 +984,11 @@ namespace DFHack
{ {
int32_t tt; int32_t tt;
for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){ for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){
if( tclass>-1 ) if( tclass != tileTypeTable[tt].c ) continue; if( tclass>-1 ) if( tclass != tileTypeTable[tt].shape ) continue;
if( tmat>-1 ) if( tmat != tileTypeTable[tt].m ) continue; if( tmat>-1 ) if( tmat != tileTypeTable[tt].material ) continue;
if( tvar>-1 ) if( tvar != tileTypeTable[tt].v ) continue; if( tvar>-1 ) if( tvar != tileTypeTable[tt].variant ) continue;
if( tspecial>-1 ) if( tspecial != tileTypeTable[tt].s ) continue; if( tspecial>-1 ) if( tspecial != tileTypeTable[tt].special ) continue;
if( tdir.whole ) if( tdir.whole != tileTypeTable[tt].d.whole ) continue; if( tdir.whole ) if( tdir.whole != tileTypeTable[tt].direction.whole ) continue;
//Match! //Match!
return tt; return tt;
} }
@ -1023,20 +1023,20 @@ namespace DFHack
#endif #endif
for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){ for(tt=0;tt<TILE_TYPE_ARRAY_LENGTH; ++tt){
if( tclass == tileTypeTable[tt].c ){ if( tclass == tileTypeTable[tt].shape ){
//shortcut null entries //shortcut null entries
if(!tileTypeTable[tt].name) continue; if(!tileTypeTable[tt].name) continue;
//Special flag match is absolutely mandatory! //Special flag match is absolutely mandatory!
if( source->s != tileTypeTable[tt].s ) continue; if( source->special != tileTypeTable[tt].special ) continue;
maybe=tt; value=0; maybe=tt; value=0;
//Material is high-value match //Material is high-value match
if( tileTypeTable[tt].m == source->m ) value|=8; if( tileTypeTable[tt].material == source->material ) value|=8;
//Direction is medium value match //Direction is medium value match
if( tileTypeTable[tt].d.whole == source->d.whole ) value|=4; if( tileTypeTable[tt].direction.whole == source->direction.whole ) value|=4;
//Variant is low-value match //Variant is low-value match
if( tileTypeTable[tt].v == source->v ) value|=1; if( tileTypeTable[tt].variant == source->variant ) value|=1;
//Check value against last match //Check value against last match
if( value>matchv ){ if( value>matchv ){

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

@ -38,7 +38,8 @@ void sort(int32_t &a,int32_t &b)
a = c; a = c;
} }
} }
void printVecOfVec(ostream &out, vector<vector<vector<string> > >vec,char sep){ void printVecOfVec(ostream &out, vector<vector<vector<string> > >vec,char sep)
{
for(int k=0;k<vec.size();k++){ for(int k=0;k<vec.size();k++){
for(int i =0;i<vec[k].size();i++){ for(int i =0;i<vec[k].size();i++){
for(int j=0;j<vec[k][i].size();j++){ for(int j=0;j<vec[k][i].size();j++){
@ -180,22 +181,24 @@ int main (int numargs, const char ** args)
while(1){ while(1){
int32_t cx1,cy1,cz1; int32_t cx1,cy1,cz1;
cx1 = -30000; cx1 = -30000;
while(cx1 == -30000){ while(cx1 == -30000)
{
DF->ForceResume(); DF->ForceResume();
cout << "Set cursor at first position, then press any key"; cout << "Set cursor at first position, then press any key";
cin.ignore(); cin.ignore();
DF->Suspend(); DF->Suspend();
Gui->getCursorCoords(cx1,cy1,cz1); Gui->getCursorCoords(cx1,cy1,cz1);
} }
uint32_t tx1,ty1,tz1; uint32_t tx1,ty1,tz1;
tx1 = cx1/16; tx1 = cx1/16;
ty1 = cy1/16; ty1 = cy1/16;
tz1 = cz1; tz1 = cz1;
int32_t cx2,cy2,cz2; int32_t cx2,cy2,cz2;
cx2 = -30000; cx2 = -30000;
while(cx2 == -30000){ while(cx2 == -30000)
{
DF->Resume(); DF->Resume();
cout << "Set cursor at second position, then press any key"; cout << "Set cursor at second position, then press any key";
cin.ignore(); cin.ignore();
@ -254,12 +257,36 @@ int main (int numargs, const char ** args)
for(int xx = xstart; xx <= xend;xx++) for(int xx = xstart; xx <= xend;xx++)
{ {
int xidx = xx+(16*(x-tx1)-(cx1%16)); int xidx = xx+(16*(x-tx1)-(cx1%16));
if(DFHack::isOpenTerrain(block.tiletypes[xx][yy]) || DFHack::isFloorTerrain(block.tiletypes[xx][yy])) {dig[zidx][yidx][xidx] = "d";} int16_t tt = block.tiletypes[xx][yy];
else if(DFHack::STAIR_DOWN == DFHack::tileTypeTable[block.tiletypes[xx][yy]].c){ dig [zidx][yidx][xidx] = "j"; build [zidx][yidx][xidx] = "Cd";} DFHack::TileClass ts = DFHack::tileTypeTable[tt].shape;
else if(DFHack::STAIR_UP == DFHack::tileTypeTable[block.tiletypes[xx][yy]].c){ dig [zidx][yidx][xidx] = "u"; build [zidx][yidx][xidx] = "Cu";} if(DFHack::isOpenTerrain(tt) || DFHack::isFloorTerrain(tt))
else if(DFHack::STAIR_UPDOWN == DFHack::tileTypeTable[block.tiletypes[xx][yy]].c){ dig [zidx][yidx][xidx] = "i"; build [zidx][yidx][xidx] = "Cx";} {
else if(DFHack::isRampTerrain(block.tiletypes[xx][yy])){dig [zidx][yidx][xidx] = "r";build [zidx][yidx][xidx] = "Cr";} dig[zidx][yidx][xidx] = "d";
else if(DFHack::isWallTerrain(block.tiletypes[xx][yy])){build [zidx][yidx][xidx] = "Cw";} }
else if(DFHack::STAIR_DOWN == ts)
{
dig [zidx][yidx][xidx] = "j";
build [zidx][yidx][xidx] = "Cd";
}
else if(DFHack::STAIR_UP == ts)
{
dig [zidx][yidx][xidx] = "u";
build [zidx][yidx][xidx] = "Cu";
}
else if(DFHack::STAIR_UPDOWN == ts)
{
dig [zidx][yidx][xidx] = "i";
build [zidx][yidx][xidx] = "Cx";
}
else if(DFHack::isRampTerrain(tt))
{
dig [zidx][yidx][xidx] = "r";
build [zidx][yidx][xidx] = "Cr";
}
else if(DFHack::isWallTerrain(tt))
{
build [zidx][yidx][xidx] = "Cw";
}
} }
yidx++; yidx++;
} }

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

@ -78,7 +78,7 @@ void dig(DFHack::Maps* layers, DFHack::Gui* Gui, ::std::vector< ::std::string >&
// ::std::cout << ::std::hex << "designations: " << designations[x_locl][y_locl].bits.dig << ::std::dec << ::std::endl; // ::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]].c == DFHack::WALL) { 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; DFHack::e_designation type = DFHack::designation_no;
switch ((char) *chr_it) { switch ((char) *chr_it) {
case 'd': case 'd':

@ -719,7 +719,7 @@ int main (void)
tp = getTileTypeP(block.tiletypes[x][y]); tp = getTileTypeP(block.tiletypes[x][y]);
d = &block.designation[x][y]; d = &block.designation[x][y];
//Only modify this level if it's 'empty' //Only modify this level if it's 'empty'
if ( EMPTY != tp->c && RAMP_TOP != tp->c && STAIR_DOWN != tp->c && DFHack::TILE_STREAM_TOP != tp->s) if ( EMPTY != tp->shape && RAMP_TOP != tp->shape && STAIR_DOWN != tp->shape && DFHack::TILE_STREAM_TOP != tp->shape)
{ {
continue; continue;
} }
@ -787,7 +787,7 @@ int main (void)
tpat=pattern[x][y]; tpat=pattern[x][y];
//Tile type material categories //Tile type material categories
switch ( tp->m ) switch ( tp->material )
{ {
case AIR: case AIR:
++emptycount; ++emptycount;
@ -804,7 +804,7 @@ int main (void)
//basicly, ignored. //basicly, ignored.
break; break;
default: default:
if ( EMPTY == tp->c || RAMP_TOP == tp->c || STAIR_DOWN == tp->c ) if ( EMPTY == tp->shape || RAMP_TOP == tp->shape || STAIR_DOWN == tp->shape )
{ {
++emptycount; ++emptycount;
} }
@ -949,7 +949,7 @@ int main (void)
if ( tpat && tpat!=3 && exposemagma ) if ( tpat && tpat!=3 && exposemagma )
{ {
//Leave certain tiles unchanged. //Leave certain tiles unchanged.
switch ( tp->m ) switch ( tp->material )
{ {
case HFS: case HFS:
case FEATSTONE: case FEATSTONE:
@ -1026,7 +1026,7 @@ int main (void)
case 2: case 2:
//Wall. //Wall.
//First guess based on current material //First guess based on current material
switch ( tp->m ) switch ( tp->material )
{ {
case OBSIDIAN: case OBSIDIAN:
t=wmagma; t=wmagma;
@ -1096,7 +1096,7 @@ int main (void)
if ( aquify ) if ( aquify )
{ {
//Only normal stone types can be aquified //Only normal stone types can be aquified
if ( tp->m!=MAGMA && tp->m!=FEATSTONE && tp->m!=HFS ) if ( tp->material!=MAGMA && tp->material!=FEATSTONE && tp->material!=HFS )
{ {
//Only place next to the hole. //Only place next to the hole.
//If no hole, place in middle. //If no hole, place in middle.
@ -1221,7 +1221,7 @@ int main (void)
} }
//Tile material check. //Tile material check.
switch ( tp->m ) switch ( tp->material )
{ {
case OBSIDIAN: case OBSIDIAN:
t=340; t=340;

@ -77,11 +77,11 @@ int main (int argc, char **argv)
{ {
fprintf(f," %*i ; %-*s ; %-*s ; %*c ; %-*s ; %-*s ; %s\n", fprintf(f," %*i ; %-*s ; %-*s ; %*c ; %-*s ; %-*s ; %s\n",
Size[0], i, Size[0], i,
Size[1], ( tileTypeTable[i].name ? TileClassString[ tileTypeTable[i].c ] : "" ), Size[1], ( tileTypeTable[i].name ? TileClassString[ tileTypeTable[i].shape ] : "" ),
Size[2], ( tileTypeTable[i].name ? TileMaterialString[ tileTypeTable[i].m ] : "" ), Size[2], ( tileTypeTable[i].name ? TileMaterialString[ tileTypeTable[i].material ] : "" ),
Size[3], ( tileTypeTable[i].v ? '0'+tileTypeTable[i].v : ' ' ), Size[3], ( tileTypeTable[i].variant ? '0'+tileTypeTable[i].variant : ' ' ),
Size[4], ( tileTypeTable[i].s ? TileSpecialString[ tileTypeTable[i].s ] : "" ), Size[4], ( tileTypeTable[i].special ? TileSpecialString[ tileTypeTable[i].special ] : "" ),
Size[5], ( tileTypeTable[i].d.whole ? tileTypeTable[i].d.getStr() : "" ), Size[5], ( tileTypeTable[i].direction.whole ? tileTypeTable[i].direction.getStr() : "" ),
( tileTypeTable[i].name ? tileTypeTable[i].name : "" ), ( tileTypeTable[i].name ? tileTypeTable[i].name : "" ),
0 0
); );

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

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

@ -111,12 +111,11 @@ int main (int numargs, const char ** args)
if(tileTypeTable[tiletype].name) if(tileTypeTable[tiletype].name)
std::cout << " = " << tileTypeTable[tiletype].name << std::endl; std::cout << " = " << tileTypeTable[tiletype].name << std::endl;
printf("%-10s: %4d %s\n","Class",tileTypeTable[tiletype].c,TileClassString[ tileTypeTable[tiletype].c ]); printf("%-10s: %4d %s\n","Class",tileTypeTable[tiletype].shape,TileClassString[ tileTypeTable[tiletype].shape ]);
printf("%-10s: %4d %s\n","Material",tileTypeTable[tiletype].c,TileMaterialString[ tileTypeTable[tiletype].m ]); printf("%-10s: %4d %s\n","Material",tileTypeTable[tiletype].material,TileMaterialString[ tileTypeTable[tiletype].material ]);
printf("%-10s: %4d %s\n","Special",tileTypeTable[tiletype].c,TileSpecialString[ tileTypeTable[tiletype].s ]); printf("%-10s: %4d %s\n","Special",tileTypeTable[tiletype].special,TileSpecialString[ tileTypeTable[tiletype].special ]);
printf("%-10s: %4d\n","Variant",tileTypeTable[tiletype].v); printf("%-10s: %4d\n","Variant",tileTypeTable[tiletype].variant);
printf("%-10s: %s\n","Direction",tileTypeTable[tiletype].d.getStr()); printf("%-10s: %s\n","Direction",tileTypeTable[tiletype].direction.getStr());
std::cout << std::endl; std::cout << std::endl;
std::cout <<"temperature1: " << mc.temperature1At(cursor) << " U" << std::endl; std::cout <<"temperature1: " << mc.temperature1At(cursor) << " U" << std::endl;

@ -158,13 +158,13 @@ int main (int argc, const char* argv[])
// read data // read data
Maps->ReadBlock40d(x,y,z, &Block); Maps->ReadBlock40d(x,y,z, &Block);
//Maps->ReadTileTypes(x,y,z, &tiletypes); DFHack::tiletypes40d & tt = Block.tiletypes;
//Maps->ReadDesignations(x,y,z, &designations);
memset(tempvein, -1, sizeof(tempvein)); memset(tempvein, -1, sizeof(tempvein));
veins.clear(); veins.clear();
Maps->ReadVeins(x,y,z,&veins); Maps->ReadVeins(x,y,z,&veins);
if(showbaselayers) if(showbaselayers)
{ {
// get the layer materials // get the layer materials
@ -172,6 +172,9 @@ int main (int argc, const char* argv[])
{ {
for (uint32_t yy = 0; yy< 16;yy++) for (uint32_t yy = 0; yy< 16;yy++)
{ {
DFHack::TileMaterial mat = DFHack::tileTypeTable[tt[xx][yy]].material;
if(mat != DFHack::SOIL && mat != DFHack::STONE)
continue;
uint8_t test = Block.designation[xx][yy].bits.biome; uint8_t test = Block.designation[xx][yy].bits.biome;
if(test > maximum_regionoffset) if(test > maximum_regionoffset)
maximum_regionoffset = test; maximum_regionoffset = test;
@ -197,6 +200,9 @@ int main (int argc, const char* argv[])
//iterate through the bits //iterate through the bits
for (uint32_t k = 0; k< 16;k++) for (uint32_t k = 0; k< 16;k++)
{ {
DFHack::TileMaterial mat = DFHack::tileTypeTable[tt[k][j]].material;
if(mat != DFHack::VEIN)
continue;
// and the bit array with a one-bit mask, check if the bit is set // and the bit array with a one-bit mask, check if the bit is set
bool set = !!(((1 << k) & veins[i].assignment[j]) >> k); bool set = !!(((1 << k) & veins[i].assignment[j]) >> k);
if(set) if(set)

@ -127,8 +127,8 @@ int main (int argc, char* argv[])
bool above = 0; bool above = 0;
bool sides = 0; bool sides = 0;
bool unhide = 1; bool unhide = 1;
// by tile class, determine behavior and action // by tile shape, determine behavior and action
switch (r->c) switch (r->shape)
{ {
// walls: // walls:
case WALL: case WALL:

@ -93,7 +93,7 @@ void putwch(int x, int y, int znak, int color)
void puttile(int x, int y, int tiletype, int color) void puttile(int x, int y, int tiletype, int color)
{ {
unsigned int znak; unsigned int znak;
switch(tileTypeTable[tiletype].c) switch(tileTypeTable[tiletype].shape)
{ {
case EMPTY: case EMPTY:
znak = ' '; znak = ' ';
@ -199,7 +199,7 @@ void clrscr()
*/ */
int pickColor(int tiletype) int pickColor(int tiletype)
{ {
switch(tileTypeTable[tiletype].m) switch(tileTypeTable[tiletype].material)
{ {
case AIR: case AIR:
return COLOR_BLACK; return COLOR_BLACK;
@ -792,8 +792,8 @@ int main(int argc, char *argv[])
{ {
for(int x = 0; x < 16; x++) for(int y = 0; y < 16; y++) for(int x = 0; x < 16; x++) for(int y = 0; y < 16; y++)
{ {
TileClass tc = tileTypeTable[Block->tiletypes[x][y]].c; TileClass tc = tileTypeTable[Block->tiletypes[x][y]].shape;
TileMaterial tm = tileTypeTable[Block->tiletypes[x][y]].m; TileMaterial tm = tileTypeTable[Block->tiletypes[x][y]].material;
if( tc == WALL && tm == VEIN || tc == TREE_OK || tc == TREE_DEAD) if( tc == WALL && tm == VEIN || tc == TREE_OK || tc == TREE_DEAD)
{ {
Block->designation[x][y].bits.dig = designation_default; Block->designation[x][y].bits.dig = designation_default;