… | |
… | |
34 | static void rotate_layout (Layout maze, int rotation); |
34 | static void rotate_layout (Layout maze, int rotation); |
35 | |
35 | |
36 | void |
36 | void |
37 | dump_layout (Layout layout) |
37 | dump_layout (Layout layout) |
38 | { |
38 | { |
39 | for (int i = 0; i < layout->w; i++) |
|
|
40 | { |
|
|
41 | for (int j = 0; j < layout->h; j++) |
39 | for (int j = 0; j < layout->h; j++) |
|
|
40 | { |
|
|
41 | for (int i = 0; i < layout->w; i++) |
42 | putc (layout[i][j] ? layout[i][j] : ' ', stdout); |
42 | putc (layout[i][j] ? layout[i][j] : ' ', stdout); |
43 | |
43 | |
44 | putc ('\n', stdout); |
44 | putc ('\n', stdout); |
45 | } |
45 | } |
46 | |
46 | |
… | |
… | |
125 | abort (); |
125 | abort (); |
126 | |
126 | |
127 | Layout layout = layoutgen (RP); |
127 | Layout layout = layoutgen (RP); |
128 | |
128 | |
129 | #ifdef RMAP_DEBUG |
129 | #ifdef RMAP_DEBUG |
130 | dump_layout (layout, RP); |
130 | dump_layout (layout); |
131 | #endif |
131 | #endif |
132 | |
132 | |
133 | /* increment these for the current map */ |
133 | /* increment these for the current map */ |
134 | RP->dungeon_level += 1; |
134 | ++RP->dungeon_level; |
135 | /* allow constant-difficulty maps. */ |
|
|
136 | /* difficulty+=1; */ |
|
|
137 | |
135 | |
138 | // need to patch RP becasue following code doesn't use the Layout object |
136 | // need to patch RP becasue following code doesn't use the Layout object |
139 | RP->Xsize = layout->w; |
137 | RP->Xsize = layout->w; |
140 | RP->Ysize = layout->h; |
138 | RP->Ysize = layout->h; |
141 | |
139 | |