|
|
1 | /* |
|
|
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
|
|
3 | * |
|
|
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
|
|
5 | * Copyright (©) Crossfire Development Team (restored, original file without copyright notice) |
|
|
6 | * |
|
|
7 | * Deliantra is free software: you can redistribute it and/or modify it under |
|
|
8 | * the terms of the Affero GNU General Public License as published by the |
|
|
9 | * Free Software Foundation, either version 3 of the License, or (at your |
|
|
10 | * option) any later version. |
|
|
11 | * |
|
|
12 | * This program is distributed in the hope that it will be useful, |
|
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
15 | * GNU General Public License for more details. |
|
|
16 | * |
|
|
17 | * You should have received a copy of the Affero GNU General Public License |
|
|
18 | * and the GNU General Public License along with this program. If not, see |
|
|
19 | * <http://www.gnu.org/licenses/>. |
|
|
20 | * |
|
|
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
|
|
22 | */ |
|
|
23 | |
1 | #include <stdio.h> |
24 | #include <stdio.h> |
2 | #include <global.h> |
25 | #include <global.h> |
3 | #include <expand2x.h> |
26 | #include <expand2x.h> |
4 | |
27 | |
5 | /* this is a testing program for layouts. It's |
28 | /* this is a testing program for layouts. It's |
6 | included here for convenience only. */ |
29 | included here for convenience only. */ |
7 | Maze map_gen_spiral (int, int, int); |
30 | Layout map_gen_spiral (int, int, int); |
8 | Maze roguelike_layout_gen (int xsize, int ysize, int options); |
31 | Layout roguelike_layout_gen (int xsize, int ysize, int options); |
9 | Maze make_snake_layout (int xsize, int ysize, int options); |
32 | Layout make_snake_layout (int xsize, int ysize, int options); |
10 | Maze make_square_spiral_layout (int xsize, int ysize, int options); |
33 | Layout make_square_spiral_layout (int xsize, int ysize, int options); |
11 | Maze gen_corridor_rooms (int, int, int); |
34 | Layout gen_corridor_rooms (int, int, int); |
12 | |
35 | |
13 | void |
36 | void |
14 | dump_layout (char **layout, int Xsize, int Ysize) |
37 | dump_layout (char **layout, int Xsize, int Ysize) |
15 | { |
38 | { |
16 | int i, j; |
39 | int i, j; |
… | |
… | |
32 | int Xsize, Ysize; |
55 | int Xsize, Ysize; |
33 | char **layout, **biglayout; |
56 | char **layout, **biglayout; |
34 | |
57 | |
35 | SRANDOM (time (0)); |
58 | SRANDOM (time (0)); |
36 | |
59 | |
37 | Xsize = rndm (30) + 10; |
60 | Xsize = rmg_rndm (30) + 10; |
38 | Ysize = rndm (20) + 10; |
61 | Ysize = rmg_rndm (20) + 10; |
39 | |
62 | |
40 | |
63 | |
41 | /* put your layout here */ |
64 | /* put your layout here */ |
42 | layout = roguelike_layout_gen (Xsize, Ysize, 0); |
65 | layout = roguelike_layout_gen (Xsize, Ysize, 0); |
43 | /*layout = make_snake_layout(Xsize,Ysize,0); */ |
66 | /*layout = make_snake_layout(Xsize,Ysize,0); */ |