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.17 by root, Sun Dec 31 20:46:17 2006 UTC vs.
Revision 1.20 by pippijn, Sat Jan 6 14:42:30 2007 UTC

1
2/* 1/*
3 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
4 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 Copyright (C) 2001 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2001 Mark Wedel & Crossfire Development Team
6 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
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, char *exitstyle, int orientation, random_map_params *RP)
121{ 121{
122 char styledirname[256]; 122 char styledirname[1024];
123 maptile *style_map_down = 0; /* harder maze */ 123 maptile *style_map_down = 0; /* harder maze */
124 maptile *style_map_up = 0; /* easier maze */ 124 maptile *style_map_up = 0; /* easier maze */
125 object *the_exit_down; /* harder maze */ 125 object *the_exit_down; /* harder maze */
126 object *the_exit_up; /* easier maze */ 126 object *the_exit_up; /* easier maze */
127 object *random_sign; /* magic mouth saying this is a random map. */ 127 object *random_sign; /* magic mouth saying this is a random map. */
319 { 319 {
320 maptile *new_map; 320 maptile *new_map;
321 object *the_exit_back = arch_to_object (the_exit_up->arch); 321 object *the_exit_back = arch_to_object (the_exit_up->arch);
322 322
323 /* load it */ 323 /* load it */
324 if (!(new_map = maptile::load_map_sync (RP->final_map))) 324 if (!(new_map = maptile::find_sync (RP->final_map)))
325 return; 325 return;
326
327 new_map->load_sync ();
326 328
327 the_exit_down->slaying = RP->final_map; 329 the_exit_down->slaying = RP->final_map;
328 330
329 for (object *tmp = new_map->at (new_map->enter_x, new_map->enter_y).bot; tmp; tmp = tmp->above) 331 for (object *tmp = new_map->at (new_map->enter_x, new_map->enter_y).bot; tmp; tmp = tmp->above)
330 /* Remove exit back to previous random map. There should only be one 332 /* Remove exit back to previous random map. There should only be one

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines