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

Comparing deliantra/server/random_maps/treasure.C (file contents):
Revision 1.49 by root, Fri Mar 26 00:59:21 2010 UTC vs.
Revision 1.51 by root, Sun Mar 28 22:29:50 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,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2001 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 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
194treasureoptions (may be 0 for random choices or positive) 194treasureoptions (may be 0 for random choices or positive)
195*/ 195*/
196void 196void
197place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP) 197place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP)
198{ 198{
199 char styledirname[1024];
200 char stylefilepath[1024];
201 maptile *style_map = 0;
202 int num_treasures; 199 int num_treasures;
203 200
204 /* bail out if treasure isn't wanted. */ 201 /* bail out if treasure isn't wanted. */
205 if (treasure_style) 202 if (treasure_style)
206 if (!strcmp (treasure_style, "none")) 203 if (!strcmp (treasure_style, "none"))
228 225
229 if (num_treasures <= 0) 226 if (num_treasures <= 0)
230 return; 227 return;
231 228
232 /* get the style map */ 229 /* get the style map */
233 sprintf (styledirname, "%s", "/styles/treasurestyles");
234 sprintf (stylefilepath, "%s/%s", styledirname, treasure_style);
235 style_map = find_style (styledirname, treasure_style, -1); 230 maptile *style_map = find_style ("/styles/treasurestyles", treasure_style, -1);
236 231
237 if (!style_map) 232 if (!style_map)
238 { 233 {
239 LOG (llevError, "unable to load style map %s %s.\n", styledirname, treasure_style); 234 LOG (llevError, "unable to load style map %s %s.\n", "/styles/treasurestyles", treasure_style);
240 return; 235 return;
241 } 236 }
242 237
243 /* all the treasure at one spot in the map. */ 238 /* all the treasure at one spot in the map. */
244 if (treasureoptions & CONCENTRATED) 239 if (treasureoptions & CONCENTRATED)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines