… | |
… | |
68 | write_map_parameters_to_string (buf, RP); |
68 | write_map_parameters_to_string (buf, RP); |
69 | |
69 | |
70 | if (RP->difficulty == 0) |
70 | if (RP->difficulty == 0) |
71 | { |
71 | { |
72 | RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ |
72 | RP->difficulty = RP->dungeon_level; /* use this instead of a map difficulty */ |
|
|
73 | |
73 | if (RP->difficulty_increase > 0.001) |
74 | if (RP->difficulty_increase > 0.001) |
74 | { |
|
|
75 | RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase); |
75 | RP->difficulty = (int) ((float) RP->dungeon_level * RP->difficulty_increase); |
|
|
76 | |
76 | if (RP->difficulty < 1) |
77 | if (RP->difficulty < 1) |
77 | RP->difficulty = 1; |
78 | RP->difficulty = 1; |
78 | } |
|
|
79 | } |
79 | } |
80 | else |
80 | else |
81 | RP->difficulty_given = 1; |
81 | RP->difficulty_given = 1; |
82 | |
82 | |
83 | if (RP->Xsize < MIN_RANDOM_MAP_SIZE) |
83 | if (RP->Xsize < MIN_RANDOM_MAP_SIZE) |
84 | RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; |
84 | RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; |
|
|
85 | |
85 | if (RP->Ysize < MIN_RANDOM_MAP_SIZE) |
86 | if (RP->Ysize < MIN_RANDOM_MAP_SIZE) |
86 | RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; |
87 | RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM () % 25 + 5; |
87 | |
88 | |
88 | if (RP->expand2x > 0) |
89 | if (RP->expand2x > 0) |
89 | { |
90 | { |
… | |
… | |
161 | |
162 | |
162 | theMap->msg = strdup_local (buf); |
163 | theMap->msg = strdup_local (buf); |
163 | |
164 | |
164 | return theMap; |
165 | return theMap; |
165 | } |
166 | } |
166 | |
|
|
167 | |
167 | |
168 | /* function selects the layout function and gives it whatever |
168 | /* function selects the layout function and gives it whatever |
169 | arguments it needs. */ |
169 | arguments it needs. */ |
170 | char ** |
170 | char ** |
171 | layoutgen (RMParms * RP) |
171 | layoutgen (RMParms * RP) |