ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/exit.C
(Generate patch)

Comparing deliantra/server/random_maps/exit.C (file contents):
Revision 1.40 by root, Sun Mar 28 22:29:50 2010 UTC vs.
Revision 1.44 by root, Wed Jun 30 01:32:57 2010 UTC

115 4 means leftward 115 4 means leftward
116 5 means northward 116 5 means northward
117 6 means southward 117 6 means southward
118*/ 118*/
119void 119void
120place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP) 120place_exits (maptile *map, char **maze, const char *exitstyle, int orientation, random_map_params *RP)
121{ 121{
122 maptile *style_map_down = 0; /* harder maze */ 122 maptile *style_map_down = 0; /* harder maze */
123 maptile *style_map_up = 0; /* easier maze */ 123 maptile *style_map_up = 0; /* easier maze */
124 object *the_exit_down; /* harder maze */ 124 object *the_exit_down; /* harder maze */
125 object *the_exit_up; /* easier maze */ 125 object *the_exit_up; /* easier maze */
137 137
138 switch (orientation) 138 switch (orientation)
139 { 139 {
140 case 1: 140 case 1:
141 { 141 {
142 style_map_up = find_style ("/styles/exitstyles/up" , exitstyle, -1); 142 style_map_up = find_style ("/styles/exitstyles/up" , exitstyle, RP->difficulty);
143 style_map_down = find_style ("/styles/exitstyles/down", exitstyle, -1); 143 style_map_down = find_style ("/styles/exitstyles/down", exitstyle, RP->difficulty);
144 break; 144 break;
145 } 145 }
146 146
147 case 2: 147 case 2:
148 { 148 {
149 style_map_up = find_style ("/styles/exitstyles/down", exitstyle, -1); 149 style_map_up = find_style ("/styles/exitstyles/down", exitstyle, RP->difficulty);
150 style_map_down = find_style ("/styles/exitstyles/up" , exitstyle, -1); 150 style_map_down = find_style ("/styles/exitstyles/up" , exitstyle, RP->difficulty);
151 break; 151 break;
152 } 152 }
153 153
154 default: 154 default:
155 { 155 {
156 style_map_up = 156 style_map_up =
157 style_map_down = find_style ("/styles/exitstyles/generic", exitstyle, -1); 157 style_map_down = find_style ("/styles/exitstyles/generic", exitstyle, RP->difficulty);
158 break; 158 break;
159 } 159 }
160 } 160 }
161 161
162 the_exit_up = style_map_up 162 the_exit_up = style_map_up
276 if (downx == -1) 276 if (downx == -1)
277 find_in_layout (0, 0, &downx, &downy, maze, RP); 277 find_in_layout (0, 0, &downx, &downy, maze, RP);
278 278
279 if (the_exit_down) 279 if (the_exit_down)
280 { 280 {
281 char buf[16384];
282
283 int i = find_free_spot (the_exit_down, map, downx, downy, 1, SIZEOFFREE1 + 1); 281 int i = rmg_find_free_spot (the_exit_down, map, downx, downy, 1, SIZEOFFREE1 + 1);
284 the_exit_down->x = downx + freearr_x[i]; 282 the_exit_down->x = downx + freearr_x[i];
285 the_exit_down->y = downy + freearr_y[i]; 283 the_exit_down->y = downy + freearr_y[i];
286 RP->origin_x = the_exit_down->x; 284 RP->origin_x = the_exit_down->x;
287 RP->origin_y = the_exit_down->y; 285 RP->origin_y = the_exit_down->y;
288 write_map_parameters_to_string (buf, RP); 286
289 the_exit_down->msg = buf; 287 the_exit_down->msg = RP->as_shstr ();
290 288
291 /* the identifier for making a random map. */ 289 /* the identifier for making a random map. */
292 if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map) 290 if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map)
293 { 291 {
294 maptile *new_map; 292 maptile *new_map;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines