… | |
… | |
60 | |
60 | |
61 | static void draw_onion (char **maze, float *xlocations, float *ylocations, int layers); |
61 | static void draw_onion (char **maze, float *xlocations, float *ylocations, int layers); |
62 | static void make_doors (char **maze, float *xlocations, float *ylocations, int layers, int options); |
62 | static void make_doors (char **maze, float *xlocations, float *ylocations, int layers, int options); |
63 | |
63 | |
64 | void |
64 | void |
65 | map_gen_onion (Layout maze, int option, int layers) |
65 | map_gen_onion (Layout &maze, int option, int layers) |
66 | { |
66 | { |
67 | int i, j; |
67 | int i, j; |
68 | |
68 | |
69 | int xsize = maze->w; |
69 | int xsize = maze.w; |
70 | int ysize = maze->h; |
70 | int ysize = maze.h; |
71 | |
71 | |
72 | maze->clear (); |
72 | maze.clear (); |
73 | |
73 | |
74 | /* pick some random options if option = 0 */ |
74 | /* pick some random options if option = 0 */ |
75 | if (option == 0) |
75 | if (option == 0) |
76 | { |
76 | { |
77 | switch (rmg_rndm (3)) |
77 | switch (rmg_rndm (3)) |
… | |
… | |
91 | if (rmg_rndm (2)) option |= RMOPT_IRR_SPACE; |
91 | if (rmg_rndm (2)) option |= RMOPT_IRR_SPACE; |
92 | } |
92 | } |
93 | |
93 | |
94 | /* write the outer walls, if appropriate. */ |
94 | /* write the outer walls, if appropriate. */ |
95 | if (!(option & RMOPT_WALL_OFF)) |
95 | if (!(option & RMOPT_WALL_OFF)) |
96 | maze->border (); |
96 | maze.border (); |
97 | |
97 | |
98 | if (option & RMOPT_WALLS_ONLY) |
98 | if (option & RMOPT_WALLS_ONLY) |
99 | return; |
99 | return; |
100 | |
100 | |
101 | /* pick off the mutually exclusive options */ |
101 | /* pick off the mutually exclusive options */ |