killer, level and rooms move to instance globals.

This commit is contained in:
Bart House
2018-12-24 19:50:08 -08:00
parent 198e44216e
commit be5cdcf77a
74 changed files with 793 additions and 790 deletions

View File

@@ -168,7 +168,7 @@ int show;
else if (lev->typ == CORR && glyph == cmap_to_glyph(S_litcorr))
glyph = cmap_to_glyph(S_corr);
}
if (level.flags.hero_memory)
if (g.level.flags.hero_memory)
lev->glyph = glyph;
if (show)
show_glyph(x, y, glyph);
@@ -204,7 +204,7 @@ register int show;
{
register int glyph = back_to_glyph(x, y);
if (level.flags.hero_memory)
if (g.level.flags.hero_memory)
levl[x][y].glyph = glyph;
if (show)
show_glyph(x, y, glyph);
@@ -224,7 +224,7 @@ register int show;
register int x = trap->tx, y = trap->ty;
register int glyph = trap_to_glyph(trap);
if (level.flags.hero_memory)
if (g.level.flags.hero_memory)
levl[x][y].glyph = glyph;
if (show)
show_glyph(x, y, glyph);
@@ -244,7 +244,7 @@ register int show;
register int x = obj->ox, y = obj->oy;
register int glyph = obj_to_glyph(obj);
if (level.flags.hero_memory) {
if (g.level.flags.hero_memory) {
/* MRKR: While hallucinating, statues are seen as random monsters */
/* but remembered as random objects. */
@@ -272,7 +272,7 @@ map_invisible(x, y)
register xchar x, y;
{
if (x != u.ux || y != u.uy) { /* don't display I at hero's location */
if (level.flags.hero_memory)
if (g.level.flags.hero_memory)
levl[x][y].glyph = GLYPH_INVISIBLE;
show_glyph(x, y, GLYPH_INVISIBLE);
}
@@ -306,7 +306,7 @@ register int x, y;
{
register struct trap *trap;
if (!level.flags.hero_memory)
if (!g.level.flags.hero_memory)
return;
if ((trap = t_at(x, y)) != 0 && trap->tseen && !covers_traps(x, y))
@@ -671,13 +671,13 @@ xchar x, y;
* the wrong glyph.
*/
if (uchain->ox == x && uchain->oy == y) {
if (level.objects[x][y] == uchain)
if (g.level.objects[x][y] == uchain)
u.bc_felt |= BC_CHAIN;
else
u.bc_felt &= ~BC_CHAIN; /* do not feel the chain */
}
if (!carried(uball) && uball->ox == x && uball->oy == y) {
if (level.objects[x][y] == uball)
if (g.level.objects[x][y] == uball)
u.bc_felt |= BC_BALL;
else
u.bc_felt &= ~BC_BALL; /* do not feel the ball */
@@ -1611,7 +1611,7 @@ xchar x, y;
switch (ptr->typ) {
case SCORR:
case STONE:
idx = level.flags.arboreal ? S_tree : S_stone;
idx = g.level.flags.arboreal ? S_tree : S_stone;
break;
case ROOM:
idx = S_room;
@@ -1807,7 +1807,7 @@ xchar x, y;
switch (lev->typ) {
case SCORR:
case STONE:
idx = level.flags.arboreal ? S_tree : S_stone;
idx = g.level.flags.arboreal ? S_tree : S_stone;
break;
case ROOM:
idx = S_room;