… | |
… | |
25 | #ifndef RANDOM_MAP_H |
25 | #ifndef RANDOM_MAP_H |
26 | #define RANDOM_MAP_H |
26 | #define RANDOM_MAP_H |
27 | |
27 | |
28 | #include "util.h" |
28 | #include "util.h" |
29 | |
29 | |
30 | struct random_map_params |
30 | struct random_map_params : zero_initialised |
31 | { |
31 | { |
32 | char wallstyle[512]; |
|
|
33 | char wall_name[512]; |
32 | char wall_name[512]; |
34 | char floorstyle[512]; |
|
|
35 | char monsterstyle[512]; |
33 | char monsterstyle[512]; |
36 | char treasurestyle[512]; |
34 | char treasurestyle[512]; |
37 | char layoutstyle[512]; |
35 | char layoutstyle[512]; |
38 | char doorstyle[512]; |
36 | char doorstyle[512]; |
39 | char decorstyle[512]; |
37 | char decorstyle[512]; |
40 | char miningstyle[512]; |
|
|
41 | shstr origin_map; |
38 | shstr origin_map; |
42 | shstr final_map; |
39 | shstr final_map; |
43 | char exitstyle[512]; |
|
|
44 | shstr this_map; |
40 | shstr this_map; |
45 | char exit_on_final_map[512]; |
41 | char exit_on_final_map[512]; |
46 | char *custom; |
42 | |
47 | |
|
|
48 | int xsize, ysize; |
43 | int xsize, ysize; |
49 | int expand2x; |
44 | int expand2x; |
50 | int layoutoptions1; |
45 | int layoutoptions1; |
51 | int layoutoptions2; |
46 | int layoutoptions2; |
52 | int layoutoptions3; |
47 | int layoutoptions3; |
… | |
… | |
68 | int treasureoptions; |
63 | int treasureoptions; |
69 | int symmetry_used; |
64 | int symmetry_used; |
70 | |
65 | |
71 | struct region *region; |
66 | struct region *region; |
72 | |
67 | |
|
|
68 | HV *hv; |
|
|
69 | |
|
|
70 | // fetch something from the options hash |
|
|
71 | const_utf8_string get_str (const_utf8_string option, const_utf8_string fallback = "") const; |
|
|
72 | IV get_iv (const_utf8_string option, IV fallback = 0) const; |
|
|
73 | |
|
|
74 | void set (const_utf8_string option, const_utf8_string value); |
|
|
75 | void set (const_utf8_string option, IV value); |
|
|
76 | |
73 | // "private", adjusted sizes |
77 | // "private", adjusted sizes |
74 | int Xsize; |
78 | int Xsize; |
75 | int Ysize; |
79 | int Ysize; |
|
|
80 | |
|
|
81 | ~random_map_params (); |
76 | }; |
82 | }; |
77 | |
83 | |
78 | enum { |
84 | enum { |
79 | LAYOUT_NONE, |
85 | LAYOUT_NONE, |
80 | LAYOUT_ONION, |
86 | LAYOUT_ONION, |
… | |
… | |
195 | ::swap (layout.ptr->w , ptr->w ); |
201 | ::swap (layout.ptr->w , ptr->w ); |
196 | ::swap (layout.ptr->h , ptr->h ); |
202 | ::swap (layout.ptr->h , ptr->h ); |
197 | } |
203 | } |
198 | }; |
204 | }; |
199 | |
205 | |
|
|
206 | // utility functions, to use rmg_rndm instead of rndm. |
|
|
207 | static inline int |
|
|
208 | rmg_find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop) |
|
|
209 | { |
|
|
210 | swap (rmg_rndm, rndm); |
|
|
211 | int i = find_free_spot (ob, m, x, y, start, stop); |
|
|
212 | swap (rmg_rndm, rndm); |
|
|
213 | return i; |
|
|
214 | } |
|
|
215 | |
200 | #endif |
216 | #endif |
201 | |
217 | |