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

Comparing deliantra/server/random_maps/special.C (file contents):
Revision 1.17 by root, Thu Jan 18 19:42:10 2007 UTC vs.
Revision 1.18 by root, Sat Jan 27 00:50:13 2007 UTC

158void 158void
159place_fountain_with_specials (maptile *map) 159place_fountain_with_specials (maptile *map)
160{ 160{
161 int ix, iy, i = -1, tries = 0; 161 int ix, iy, i = -1, tries = 0;
162 maptile *fountain_style = find_style ("/styles/misc", "fountains", -1); 162 maptile *fountain_style = find_style ("/styles/misc", "fountains", -1);
163
164 if (!fountain_style)
165 LOG (llevError, "unabel to load stylemap /styles/misc fountains\n"),
166 return;
167
163 object *fountain = get_archetype ("fountain"); 168 object *fountain = get_archetype ("fountain");
164 object *potion = object::create (); 169 object *potion = object::create ();
165 170
166 pick_random_object (fountain_style)->copy_to (potion); 171 pick_random_object (fountain_style)->copy_to (potion);
167 172
201 int ix, iy, i = -1; 206 int ix, iy, i = -1;
202 char buf[16384], *style, *decor, *mon; 207 char buf[16384], *style, *decor, *mon;
203 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", -1); 208 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", -1);
204 int g_xsize, g_ysize; 209 int g_xsize, g_ysize;
205 210
211 if (!exit_style)
212 LOG (llevError, "unabel to load stylemap /styles/misc obscure_exits\n"),
213 return 0;
214
206 object *the_exit = object::create (); 215 object *the_exit = object::create ();
207 216
208 if (!exit_style) 217 if (!exit_style)
209 return; 218 return;
210 219
296 305
297 /* includes a special map into the random map being made. */ 306 /* includes a special map into the random map being made. */
298 case SPECIAL_SUBMAP: 307 case SPECIAL_SUBMAP:
299 { 308 {
300 special_map = find_style ("/styles/specialmaps", 0, RP->difficulty); 309 special_map = find_style ("/styles/specialmaps", 0, RP->difficulty);
301 if (special_map == NULL) 310 if (!special_map)
302 return; 311 return;
303 312
304 if (find_spot_for_submap (map, layout, &ix, &iy, special_map->width, special_map->height)) 313 if (find_spot_for_submap (map, layout, &ix, &iy, special_map->width, special_map->height))
305 include_map_in_map (map, special_map, ix, iy); 314 include_map_in_map (map, special_map, ix, iy);
306 break; 315 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines