Use symbolic name STONE for levl typ 0
This commit is contained in:
@@ -888,7 +888,7 @@ wiz_map_levltyp(VOID_ARGS)
|
||||
for (x = 1; x < COLNO; x++) {
|
||||
terrain = levl[x][y].typ;
|
||||
/* assumes there aren't more than 10+26+26 terrain types */
|
||||
row[x - 1] = (char) ((terrain == 0 && !may_dig(x, y))
|
||||
row[x - 1] = (char) ((terrain == STONE && !may_dig(x, y))
|
||||
? '*'
|
||||
: (terrain < 10)
|
||||
? '0' + terrain
|
||||
@@ -896,7 +896,7 @@ wiz_map_levltyp(VOID_ARGS)
|
||||
? 'a' + terrain - 10
|
||||
: 'A' + terrain - 36);
|
||||
}
|
||||
if (levl[0][y].typ != 0 || may_dig(0, y))
|
||||
if (levl[0][y].typ != STONE || may_dig(0, y))
|
||||
row[x++] = '!';
|
||||
row[x] = '\0';
|
||||
putstr(win, 0, row);
|
||||
|
||||
@@ -231,7 +231,7 @@ int dir;
|
||||
mz_move(x, y, dir);
|
||||
mz_move(x, y, dir);
|
||||
if (x < 3 || y < 3 || x > x_maze_max || y > y_maze_max
|
||||
|| levl[x][y].typ != 0)
|
||||
|| levl[x][y].typ != STONE)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -814,7 +814,7 @@ nextpos:
|
||||
else
|
||||
ny += dy;
|
||||
|
||||
while ((typ = (crm = &levl[nx][ny])->typ) != 0) {
|
||||
while ((typ = (crm = &levl[nx][ny])->typ) != STONE) {
|
||||
/* in view of the above we must have IS_WALL(typ) or typ == POOL */
|
||||
/* must be a wall here */
|
||||
if (isok(nx + nx - x, ny + ny - y) && !IS_POOL(typ)
|
||||
|
||||
Reference in New Issue
Block a user