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:
@@ -46,18 +46,6 @@ main (void)
|
||||
hname = "Mac Hack";
|
||||
hackpid = getpid();
|
||||
|
||||
/*
|
||||
* Initialisation of the boundaries of the mazes
|
||||
* Both boundaries have to be even.
|
||||
*/
|
||||
|
||||
x_maze_max = COLNO-1;
|
||||
if (x_maze_max % 2)
|
||||
x_maze_max--;
|
||||
y_maze_max = ROWNO-1;
|
||||
if (y_maze_max % 2)
|
||||
y_maze_max--;
|
||||
|
||||
setrandom();
|
||||
initoptions();
|
||||
init_nhwindows(&argc, (char **)&hname);
|
||||
|
||||
Reference in New Issue
Block a user