version 1.2 | | version 1.3 |
---|
| | |
| | |
| | #ifndef RANDOM_MAP_H |
| | #define RANDOM_MAP_H |
| | |
extern char wallstyle[]; | | typedef struct { |
extern char wall_name[]; | | char wallstyle[512]; |
extern char floorstyle[]; | | char wall_name[512]; |
extern char monsterstyle[]; | | char floorstyle[512]; |
extern char treasurestyle[]; | | char monsterstyle[512]; |
extern char layoutstyle[]; | | char treasurestyle[512]; |
extern char doorstyle[]; | | char layoutstyle[512]; |
extern char decorstyle[]; | | char doorstyle[512]; |
extern char origin_map[]; | | char decorstyle[512]; |
extern char final_map[]; | | char origin_map[512]; |
extern char exitstyle[]; | | char final_map[512]; |
extern char this_map[]; | | char exitstyle[512]; |
| | char this_map[512]; |
extern int Xsize; | | |
extern int Ysize; | | int Xsize; |
extern int layoutoptions1; | | int Ysize; |
extern int layoutoptions2; | | int layoutoptions1; |
extern int layoutoptions3; | | int layoutoptions2; |
extern int symmetry; | | int layoutoptions3; |
extern int difficulty; | | int symmetry; |
extern int dungeon_level; | | int difficulty; |
extern int dungeon_depth; | | int difficulty_given; |
extern int decoroptions; | | int dungeon_level; |
extern int orientation; | | int dungeon_depth; |
extern int origin_y; | | int decoroptions; |
extern int origin_x; | | int orientation; |
extern int random_seed; | | int origin_y; |
extern long unsigned int total_map_hp; | | int origin_x; |
extern int map_layout_style; | | int random_seed; |
extern int treasureoptions; | | long unsigned int total_map_hp; |
extern int symmetry_used; | | int map_layout_style; |
extern int generate_treasure_now; | | int treasureoptions; |
| | int symmetry_used; |
| | int generate_treasure_now; |
| | } RMParms; |
| | |
int load_parameters(FILE *fp, int bufstate); | | int load_parameters(FILE *fp, int bufstate,RMParms *RP); |
| | |
#include <rproto.h> | | |
| | |
#define ONION_LAYOUT 1 | | #define ONION_LAYOUT 1 |
#define MAZE_LAYOUT 2 | | #define MAZE_LAYOUT 2 |
| | |
/* a macro to get a strongly centered random distribution, | | /* a macro to get a strongly centered random distribution, |
from 0 to x, centered at x/2 */ | | from 0 to x, centered at x/2 */ |
#define BC_RANDOM(x) ((int) ((RANDOM() % (x)+RANDOM()%(x)+RANDOM()%(x))/3.)) | | #define BC_RANDOM(x) ((int) ((RANDOM() % (x)+RANDOM()%(x)+RANDOM()%(x))/3.)) |
| | |
| | #endif |