stone/unexplored glyph follow-up

typo
This commit is contained in:
nhmall
2020-02-13 17:26:39 -05:00
parent 5ca2cdbd86
commit a213811975
6 changed files with 11 additions and 6 deletions

View File

@@ -1199,7 +1199,6 @@ struct const_globals {
const struct obj zeroobj; /* used to zero out a struct obj */
const struct monst zeromonst; /* used to zero out a struct monst */
const anything zeroany; /* used to zero out union any */
const struct rm zerorm; /* used to zero out struct rm */
};
E const struct const_globals cg;

View File

@@ -482,7 +482,9 @@ struct obj *corpse;
/* Clear all memory from the level. */
for (x = 1; x < COLNO; x++)
for (y = 0; y < ROWNO; y++) {
levl[x][y] = cg.zerorm;
levl[x][y].seenv = 0;
levl[x][y].waslit = 0;
levl[x][y].glyph = GLYPH_UNEXPLORED;
g.lastseentyp[x][y] = 0;
}

View File

@@ -699,7 +699,6 @@ const struct const_globals cg = {
DUMMY, /* zeroobj */
DUMMY, /* zeromonst */
DUMMY, /* zeroany */
{ GLYPH_UNEXPLORED, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
};
#define ZERO(x) memset(&x, 0, sizeof(x))

View File

@@ -585,6 +585,8 @@ makevtele()
void
clear_level_structures()
{
static struct rm zerorm = { GLYPH_UNEXPLORED,
0, 0, 0, 0, 0, 0, 0, 0, 0 };
register int x, y;
register struct rm *lev;
@@ -595,7 +597,7 @@ clear_level_structures()
for (x = 0; x < COLNO; x++) {
lev = &levl[x][0];
for (y = 0; y < ROWNO; y++) {
*lev++ = cg.zerorm;
*lev++ = zerorm;
/*
* These used to be '#if MICROPORT_BUG',
* with use of memset(0) for '#if !MICROPORT_BUG' below,

View File

@@ -804,7 +804,9 @@ int howmuch;
for (zy = 0; zy < ROWNO; zy++)
if (howmuch & ALL_MAP || rn2(7)) {
/* Zonk all memory of this location. */
levl[zx][zy] = cg.zerorm;
levl[zx][zy].seenv = 0;
levl[zx][zy].waslit = 0;
levl[zx][zy].glyph = GLYPH_UNEXPLORED;
g.lastseentyp[zx][zy] = STONE;
}
/* forget overview data for this level */

View File

@@ -579,7 +579,8 @@ xchar lev;
for (x = 0; x < COLNO; x++) {
g.level.monsters[x][y] = 0;
g.level.objects[x][y] = 0;
levl[x][y] = cg.zerorm;
levl[x][y].seenv = 0;
levl[x][y].glyph = GLYPH_UNEXPLORED;
}
fmon = 0;
g.ftrap = 0;