 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
52 {
"/world/world_104_115",
"city" },
53 {
"/world/world_105_115",
"city" },
54 {
"/world/world_104_116",
"city" },
55 {
"/world/world_105_116",
"city" },
57 {
"/world/world_122_116",
"city" },
58 {
"/world/world_121_116",
"city" },
59 {
"/world/world_122_117",
"city" },
60 {
"/world/world_121_117",
"city" },
75 if (strcmp(
zones[zone].mappath, map->
path) == 0)
111 int seed = 0, len, w = 0;
113 snprintf(r,
sizeof(r),
"%s!%d,%d*%s", exit->
arch->
name, exit->
x, exit->
y, map->
path);
117 seed ^= ((int)r[len])<<w;
141 snprintf(params,
sizeof(params),
"layoutstyle onion\n"
142 "floorstyle indoor\n"
147 "decorstyle furniture\n"
191 va_start(args,
type);
192 code = va_arg(args,
int);
struct Settings settings
Server settings.
#define FOR_MAP_FINISH()
Finishes FOR_MAP_PREPARE().
void random_house_generator_init(Settings *settings)
Module initialisation.
static void add_exit_to_item(object *exit, const house_zone_struct *zone, const mapstruct *map)
Change an empty exit to point to a random map.
struct archetype * arch
Pointer to archetype.
static int is_suitable_exit(object *exit)
Should we add a random map to this exit?
#define EVENT_MAPLOAD
A map is loaded (pristine state)
static void add_exits_to_map(const mapstruct *map)
Checks if the map should be processed, and if so process it.
char path[HUGE_BUF]
Filename of the map.
#define HUGE_BUF
Used for messages - some can be quite long.
static const house_zone_struct zones[]
Maps we work on.
event_registration events_register_global_handler(int eventcode, f_plug_event hook)
Register a global event handler.
int16_t y
Position in the map for this object.
void random_house_generator_close()
Close the module.
void events_unregister_global_handler(int eventcode, event_registration id)
Remove a global event handler.
sstring add_string(const char *str)
This will add 'str' to the hash table.
uint8_t type
PLAYER, BULLET, etc.
std::vector< char * > disabled_plugins
List of disabled plugins, 'All' means all.
const char * monsterstyle
Style of monsters.
#define MAP_WIDTH(m)
Map width.
const char * mappath
Full map path.
#define MAX_BUF
Used for all kinds of things.
static event_registration eg
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
Constructs a loop iterating over all objects of a map tile.
sstring slaying
Which race to do double damage to.
unsigned long event_registration
Registration identifier type.
static int cfrhg_globalEventListener(int *type,...)
Global server event handling.
sstring msg
If this is a book/sign/magic mouth/etc.
#define MAP_HEIGHT(m)
Map height.
static int get_exit_seed(const object *exit, const mapstruct *map)
Get the random map seed.
static const house_zone_struct * get_map_zone(const mapstruct *map)
Get the random map parameters of a map.
Link between a map and the exits to generate for it.
Crossfire Architecture the general intention is to enhance the enjoyability and playability of CF In this code
sstring name
More definite name, like "generate_kobold".