ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/server/random_maps/decor.C
(Generate patch)

Comparing cf.schmorp.de/server/random_maps/decor.C (file contents):
Revision 1.2 by root, Sun Sep 10 16:06:37 2006 UTC vs.
Revision 1.4 by root, Sat Sep 16 22:24:12 2006 UTC

1
2/*
3 * static char *rcsid_decor_ =
4 * "$Id: decor.C,v 1.2 2006/09/10 16:06:37 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 5 Copyright (C) 1992 Frank Tore Johansen
22 16
23 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 20
27 The authors can be reached via e-mail at crossfire-devel@real-time.com 21 The authors can be reached via e-mail at <crossfire@schmorp.de>
28*/ 22*/
29 23
30 24
31#include <global.h> 25#include <global.h>
32#include <random_map.h> 26#include <random_map.h>
35#define NR_DECOR_OPTIONS 1 29#define NR_DECOR_OPTIONS 1
36 30
37/* return a simple count of objects in the map at x,y. */ 31/* return a simple count of objects in the map at x,y. */
38 32
39int 33int
40obj_count_in_map (mapstruct *map, int x, int y) 34obj_count_in_map (maptile *map, int x, int y)
41{ 35{
42 int count = 0; 36 int count = 0;
43 object *tmp; 37 object *tmp;
44 38
45 for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above) 39 for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above)
48} 42}
49 43
50/* put the decor into the map. Right now, it's very primitive. */ 44/* put the decor into the map. Right now, it's very primitive. */
51 45
52void 46void
53put_decor (mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms * RP) 47put_decor (maptile *map, char **maze, char *decorstyle, int decor_option, RMParms * RP)
54{ 48{
55 mapstruct *decor_map; 49 maptile *decor_map;
56 char style_name[256]; 50 char style_name[256];
57 51
58 sprintf (style_name, "/styles/decorstyles"); 52 sprintf (style_name, "/styles/decorstyles");
59 53
60 decor_map = find_style (style_name, decorstyle, -1); 54 decor_map = find_style (style_name, decorstyle, -1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines