… | |
… | |
29 | |
29 | |
30 | struct random_map_params : zero_initialised |
30 | struct random_map_params : zero_initialised |
31 | { |
31 | { |
32 | char wall_name[512]; |
32 | char wall_name[512]; |
33 | char monsterstyle[512]; |
33 | char monsterstyle[512]; |
34 | char treasurestyle[512]; |
|
|
35 | char layoutstyle[512]; |
34 | char layoutstyle[512]; |
36 | char doorstyle[512]; |
35 | char doorstyle[512]; |
37 | char decorstyle[512]; |
|
|
38 | shstr origin_map; |
36 | shstr origin_map; |
39 | shstr final_map; |
37 | shstr final_map; |
40 | shstr this_map; |
38 | shstr this_map; |
41 | char exit_on_final_map[512]; |
39 | char exit_on_final_map[512]; |
42 | |
40 | |
… | |
… | |
51 | float difficulty_increase; |
49 | float difficulty_increase; |
52 | |
50 | |
53 | int dungeon_level; |
51 | int dungeon_level; |
54 | int dungeon_depth; |
52 | int dungeon_depth; |
55 | |
53 | |
56 | int decoroptions; |
|
|
57 | int orientation; |
54 | int orientation; |
|
|
55 | int origin_x; |
58 | int origin_y; |
56 | int origin_y; |
59 | int origin_x; |
|
|
60 | uint32_t random_seed; |
57 | uint32_t random_seed; |
61 | uint64_t total_map_hp; |
58 | uint64_t total_map_hp; |
62 | int map_layout_style; |
59 | int map_layout_style; |
63 | int treasureoptions; |
|
|
64 | int symmetry_used; |
60 | int symmetry_used; |
65 | |
61 | |
66 | struct region *region; |
62 | struct region *region; |
67 | |
63 | |
68 | HV *hv; |
64 | HV *hv; |
|
|
65 | void hv_clone (); // replaces the hv by a clone'd copy (%new_hv = { %hv }) |
|
|
66 | |
|
|
67 | shstr_tmp as_shstr () const; |
69 | |
68 | |
70 | // fetch something from the options hash |
69 | // fetch something from the options hash |
71 | const_utf8_string get_str (const_utf8_string option, const_utf8_string fallback = "") const; |
70 | SV *get_sv (const char *option) const; |
|
|
71 | const_utf8_string get_str (const char *option, const_utf8_string fallback = "") const; |
72 | IV get_iv (const_utf8_string option, IV fallback = 0) const; |
72 | IV get_iv (const char *option, IV fallback = 0) const; |
|
|
73 | UV get_uv (const char *option, UV fallback = 0) const; |
|
|
74 | NV get_nv (const char *option, NV fallback = 0) const; |
73 | |
75 | |
74 | void set (const_utf8_string option, const_utf8_string value); |
76 | void set (const char *option, SV *value) const; |
|
|
77 | void set (const char *option, const_utf8_string value) const; |
75 | void set (const_utf8_string option, IV value); |
78 | void set (const char *option, IV value) const; |
|
|
79 | void set (const char *option, UV value) const; |
|
|
80 | void set (const char *option, NV value) const; |
|
|
81 | |
|
|
82 | void set (const char *option, int value) const { set (option, (IV)value); } |
76 | |
83 | |
77 | // "private", adjusted sizes |
84 | // "private", adjusted sizes |
78 | int Xsize; |
85 | int Xsize; |
79 | int Ysize; |
86 | int Ysize; |
80 | |
87 | |
… | |
… | |
199 | { |
206 | { |
200 | ::swap (layout.ptr->col, ptr->col); |
207 | ::swap (layout.ptr->col, ptr->col); |
201 | ::swap (layout.ptr->w , ptr->w ); |
208 | ::swap (layout.ptr->w , ptr->w ); |
202 | ::swap (layout.ptr->h , ptr->h ); |
209 | ::swap (layout.ptr->h , ptr->h ); |
203 | } |
210 | } |
|
|
211 | |
|
|
212 | // for debugging, print layout to stdout |
|
|
213 | void print (); |
204 | }; |
214 | }; |
205 | |
215 | |
206 | // utility functions, to use rmg_rndm instead of rndm. |
216 | // utility functions, to use rmg_rndm instead of rndm. |
207 | static inline int |
217 | static inline int |
208 | rmg_find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop) |
218 | rmg_find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop) |