1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_random_map_c = |
|
|
4 | * "$Id: random_map.C,v 1.3 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) 2001 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2001 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 | #include <time.h> |
24 | #include <time.h> |
31 | #include <stdio.h> |
25 | #include <stdio.h> |
32 | #include <global.h> |
26 | #include <global.h> |
… | |
… | |
56 | } |
50 | } |
57 | } |
51 | } |
58 | printf ("\n"); |
52 | printf ("\n"); |
59 | } |
53 | } |
60 | EXTERN FILE *logfile; |
54 | EXTERN FILE *logfile; |
61 | mapstruct * |
55 | maptile * |
62 | generate_random_map (const char *OutFileName, RMParms * RP) |
56 | generate_random_map (const char *OutFileName, RMParms * RP) |
63 | { |
57 | { |
64 | char **layout, buf[HUGE_BUF]; |
58 | char **layout, buf[HUGE_BUF]; |
65 | mapstruct *theMap; |
59 | maptile *theMap; |
66 | int i; |
60 | int i; |
67 | |
61 | |
68 | /* pick a random seed, or use the one from the input file */ |
62 | /* pick a random seed, or use the one from the input file */ |
69 | if (RP->random_seed == 0) |
63 | if (RP->random_seed == 0) |
70 | RP->random_seed = time (0); |
64 | RP->random_seed = time (0); |