1 | #include <stdio.h> |
1 | #include <stdio.h> |
2 | #include <global.h> |
2 | #include <global.h> |
3 | #include <expand2x.h> |
3 | #include <expand2x.h> |
4 | |
4 | |
5 | |
|
|
6 | /* this is a testing program for layouts. It's |
5 | /* this is a testing program for layouts. It's |
7 | included here for convenience only. */ |
6 | included here for convenience only. */ |
8 | char **map_gen_spiral (int, int, int); |
7 | Layout map_gen_spiral (int, int, int); |
9 | char **roguelike_layout_gen (int xsize, int ysize, int options); |
8 | Layout roguelike_layout_gen (int xsize, int ysize, int options); |
10 | char **make_snake_layout (int xsize, int ysize, int options); |
9 | Layout make_snake_layout (int xsize, int ysize, int options); |
11 | char **make_square_spiral_layout (int xsize, int ysize, int options); |
10 | Layout make_square_spiral_layout (int xsize, int ysize, int options); |
12 | char **gen_corridor_rooms (int, int, int); |
11 | Layout gen_corridor_rooms (int, int, int); |
13 | |
12 | |
14 | void |
13 | void |
15 | dump_layout (char **layout, int Xsize, int Ysize) |
14 | dump_layout (char **layout, int Xsize, int Ysize) |
16 | { |
15 | { |
17 | int i, j; |
16 | int i, j; |
… | |
… | |
33 | int Xsize, Ysize; |
32 | int Xsize, Ysize; |
34 | char **layout, **biglayout; |
33 | char **layout, **biglayout; |
35 | |
34 | |
36 | SRANDOM (time (0)); |
35 | SRANDOM (time (0)); |
37 | |
36 | |
38 | Xsize = RANDOM () % 30 + 10; |
37 | Xsize = rmg_rndm (30) + 10; |
39 | Ysize = RANDOM () % 20 + 10; |
38 | Ysize = rmg_rndm (20) + 10; |
40 | |
39 | |
41 | |
40 | |
42 | /* put your layout here */ |
41 | /* put your layout here */ |
43 | layout = roguelike_layout_gen (Xsize, Ysize, 0); |
42 | layout = roguelike_layout_gen (Xsize, Ysize, 0); |
44 | /*layout = make_snake_layout(Xsize,Ysize,0); */ |
43 | /*layout = make_snake_layout(Xsize,Ysize,0); */ |