another main() bit (trunk only)

It always struck me as odd that x_maze_max and y_maze_max were
initialized in main().  They're only needed when making new levels, so
don't have to come before saved game restoration.  They could easily have
gone into init_dungeon() (although they make well predate that), or even
mklev() (reinitializing them for each new level wouldn't have been a big
deal).  That's all moot, though, since it's trivial to initialize them at
compile time.
This commit is contained in:
nethack.rankin
2009-03-23 00:29:56 +00:00
parent a2124ab231
commit 664229027e
6 changed files with 4 additions and 58 deletions

View File

@@ -24,7 +24,10 @@ NEARDATA int nroom = 0;
NEARDATA int nsubroom = 0;
NEARDATA int occtime = 0;
int x_maze_max, y_maze_max; /* initialized in main, used in mkmaze.c */
/* maze limits must be even; masking off lowest bit guarantees that */
int x_maze_max = (COLNO-1) & ~1,
y_maze_max = (ROWNO-1) & ~1;
int otg_temp; /* used by object_to_glyph() [otg] */
#ifdef REDO