--- deliantra/server/random_maps/maze_gen.C 2006/12/31 19:02:24 1.5 +++ deliantra/server/random_maps/maze_gen.C 2007/01/27 02:19:37 1.7 @@ -22,11 +22,6 @@ #include #include - -/* this include solely, and only, is needed for the definition of RANDOM */ - - - /* global variables that everyone needs: don't want to pass them in as parameters every time. */ int *wall_x_list = 0; @@ -138,7 +133,7 @@ void pop_wall_point (int *x, int *y) { - int index = RANDOM () % wall_free_size; + int index = rndm (wall_free_size); *x = wall_x_list[index]; *y = wall_y_list[index]; @@ -226,9 +221,10 @@ /* choose a random direction */ if (count > 1) - count = RANDOM () % count; + count = rndm (count); else count = 0; + switch (dirlist[count]) { case 1: /* up */ @@ -275,7 +271,7 @@ maze[x][y] = '#'; /* decide if we're going to pick from the wall_free_list */ - if (RANDOM () % 4 && wall_free_size > 0) + if (rndm (4) && wall_free_size > 0) { pop_wall_point (&xc, &yc); fill_maze_full (maze, xc, yc, xsize, ysize); @@ -301,7 +297,7 @@ maze[x][y] = '#'; /* decide if we're going to pick from the wall_free_list */ - if (RANDOM () % 4 && wall_free_size > 0) + if (rndm (4) && wall_free_size > 0) { pop_wall_point (&xc, &yc); fill_maze_sparse (maze, xc, yc, xsize, ysize);