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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user