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.20 by pippijn, Sat Jan 27 16:25:19 2007 UTC vs.
Revision 1.23 by root, Sun Mar 18 03:05:40 2007 UTC

168 } 168 }
169 169
170 object *fountain = get_archetype ("fountain"); 170 object *fountain = get_archetype ("fountain");
171 object *potion = object::create (); 171 object *potion = object::create ();
172 172
173 pick_random_object (fountain_style)->copy_to (potion); 173 fountain_style->pick_random_object ()->copy_to (potion);
174 174
175 while (i < 0 && tries < 10) 175 while (i < 0 && tries < 10)
176 { 176 {
177 ix = rndm (map->width - 2) + 1; 177 ix = rndm (map->width - 2) + 1;
178 iy = rndm (map->height - 2) + 1; 178 iy = rndm (map->height - 2) + 1;
193 SET_FLAG (potion, FLAG_NO_PICK); 193 SET_FLAG (potion, FLAG_NO_PICK);
194 SET_FLAG (potion, FLAG_IDENTIFIED); 194 SET_FLAG (potion, FLAG_IDENTIFIED);
195 potion->name = potion->name_pl = "fountain"; 195 potion->name = potion->name_pl = "fountain";
196 potion->x = ix; 196 potion->x = ix;
197 potion->y = iy; 197 potion->y = iy;
198 potion->material = M_ADAMANT; 198 potion->materialname = "adamantium";
199 fountain->x = ix; 199 fountain->x = ix;
200 fountain->y = iy; 200 fountain->y = iy;
201 insert_ob_in_map (fountain, map, NULL, 0); 201 insert_ob_in_map (fountain, map, NULL, 0);
202 insert_ob_in_map (potion, map, NULL, 0); 202 insert_ob_in_map (potion, map, NULL, 0);
203} 203}
204 204
205void 205void
206place_special_exit (maptile *map, int hole_type, random_map_params *RP) 206place_special_exit (maptile *map, int hole_type, random_map_params *RP)
207{ 207{
208 int ix, iy, i = -1; 208 int ix, iy, i = -1;
209 char buf[16384];
209 char buf[16384], *style, *decor, *mon; 210 const char *style, *decor, *mon;
210 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", -1); 211 maptile *exit_style = find_style ("/styles/misc", "obscure_exits", -1);
211 int g_xsize, g_ysize; 212 int g_xsize, g_ysize;
212 213
213 if (!exit_style) 214 if (!exit_style)
214 { 215 {
219 object *the_exit = object::create (); 220 object *the_exit = object::create ();
220 221
221 if (!exit_style) 222 if (!exit_style)
222 return; 223 return;
223 224
224 pick_random_object (exit_style)->copy_to (the_exit); 225 exit_style->pick_random_object ()->copy_to (the_exit);
225 226
226 while (i < 0) 227 while (i < 0)
227 { 228 {
228 ix = rndm (map->width - 2) + 1; 229 ix = rndm (map->width - 2) + 1;
229 iy = rndm (map->height - 2) + 1; 230 iy = rndm (map->height - 2) + 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines