|
|
1 | |
1 | /* |
2 | /* |
2 | CrossFire, A Multiplayer game for X-windows |
3 | CrossFire, A Multiplayer game for X-windows |
3 | |
4 | |
|
|
5 | Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
6 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 1992 Frank Tore Johansen |
7 | Copyright (C) 1992 Frank Tore Johansen |
6 | |
8 | |
7 | This program is free software; you can redistribute it and/or modify |
9 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
10 | it under the terms of the GNU General Public License as published by |
… | |
… | |
26 | #include <random_map.h> |
28 | #include <random_map.h> |
27 | #include <rproto.h> |
29 | #include <rproto.h> |
28 | |
30 | |
29 | /* make a map and layout the floor. */ |
31 | /* make a map and layout the floor. */ |
30 | |
32 | |
31 | mapstruct * |
33 | maptile * |
32 | make_map_floor (char **layout, char *floorstyle, RMParms * RP) |
34 | make_map_floor (char **layout, char *floorstyle, random_map_params *RP) |
33 | { |
35 | { |
34 | char styledirname[256]; |
36 | char styledirname[1024]; |
35 | char stylefilepath[256]; |
37 | char stylefilepath[1024]; |
36 | mapstruct *style_map = 0; |
38 | maptile *style_map = 0; |
37 | object *the_floor; |
39 | object *the_floor; |
38 | mapstruct *newMap = 0; |
40 | maptile *newMap = 0; |
39 | |
41 | |
40 | /* allocate the map */ |
42 | /* allocate the map */ |
41 | newMap = get_empty_map (RP->Xsize, RP->Ysize); |
43 | newMap = new maptile (RP->Xsize, RP->Ysize); |
42 | |
44 | |
43 | /* get the style map */ |
45 | /* get the style map */ |
44 | sprintf (styledirname, "%s", "/styles/floorstyles"); |
46 | sprintf (styledirname, "%s", "/styles/floorstyles"); |
45 | sprintf (stylefilepath, "%s/%s", styledirname, floorstyle); |
47 | sprintf (stylefilepath, "%s/%s", styledirname, floorstyle); |
46 | style_map = find_style (styledirname, floorstyle, -1); |
48 | style_map = find_style (styledirname, floorstyle, -1); |