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.34 by root, Mon Oct 12 14:00:58 2009 UTC vs.
Revision 1.38 by root, Fri Mar 26 00:59:21 2010 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
27#include <sproto.h> 27#include <sproto.h>
28#include <rproto.h> 28#include <rproto.h>
29 29
30/* find a character in the layout. fx and fy are pointers to 30/* find a character in the layout. fx and fy are pointers to
31 where to find the char. fx,fy = -1 if not found. */ 31 where to find the char. fx,fy = -1 if not found. */
32void 32static void
33find_in_layout (int mode, char target, int *fx, int *fy, char **layout, random_map_params *RP) 33find_in_layout (int mode, char target, int *fx, int *fy, char **layout, random_map_params *RP)
34{ 34{
35 int M; 35 int M;
36 int i, j; 36 int i, j;
37 37
296 296
297 /* the identifier for making a random map. */ 297 /* the identifier for making a random map. */
298 if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map) 298 if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map)
299 { 299 {
300 maptile *new_map; 300 maptile *new_map;
301 object *the_exit_back = arch_to_object (the_exit_up->arch); 301 object *the_exit_back = the_exit_up->arch->instance ();
302 302
303 /* load it */ 303 /* load it */
304 if (!(new_map = maptile::find_sync (RP->final_map))) 304 if (!(new_map = maptile::find_sync (RP->final_map)))
305 return; 305 return;
306 306
331 331
332 insert_ob_in_map (the_exit_back, new_map, NULL, 0); 332 insert_ob_in_map (the_exit_back, new_map, NULL, 0);
333 } 333 }
334 } 334 }
335 else 335 else
336 the_exit_down->slaying = "/!"; 336 the_exit_down->slaying = shstr_random_map_exit;
337 337
338 /* Block the exit so things don't get dumped on top of it. */ 338 /* Block the exit so things don't get dumped on top of it. */
339 the_exit_down->move_block = MOVE_ALL; 339 the_exit_down->move_block = MOVE_ALL;
340 insert_ob_in_map (the_exit_down, map, NULL, 0); 340 insert_ob_in_map (the_exit_down, map, NULL, 0);
341 maze[the_exit_down->x][the_exit_down->y] = '>'; 341 maze[the_exit_down->x][the_exit_down->y] = '>';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines