 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
53 {
"/world/world_104_115",
"city" },
54 {
"/world/world_105_115",
"city" },
55 {
"/world/world_104_116",
"city" },
56 {
"/world/world_105_116",
"city" },
58 {
"/world/world_122_116",
"city" },
59 {
"/world/world_121_116",
"city" },
60 {
"/world/world_122_117",
"city" },
61 {
"/world/world_121_117",
"city" },
76 if (strcmp(
zones[zone].mappath, map->
path) == 0)
112 int seed = 0, len, w = 0;
114 snprintf(r,
sizeof(r),
"%s!%d,%d*%s", exit->
arch->
name, exit->
x, exit->
y, map->
path);
118 seed ^= ((int)r[len])<<w;
142 snprintf(params,
sizeof(params),
"layoutstyle onion\n"
143 "floorstyle indoor\n"
148 "decorstyle furniture\n"
192 va_start(args,
type);
193 code = va_arg(args,
int);
215 settings->disabled_plugins.push_back(strdup(
"cfrhg"));
struct Settings settings
Global settings.
#define FOR_MAP_FINISH()
Finishes FOR_MAP_PREPARE().
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?
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_init(Settings *, ServerSettings *settings)
Module initialisation.
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.
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.
#define EVENT_MAPLOAD
A map is loaded (pristine state)
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".