Crossfire Server, Trunk  R20608
mapdef Struct Reference

#include <map.h>

+ Collaboration diagram for mapdef:

Data Fields

char * background_music
 
oblinkptbuttons
 
uint8_t darkness
 
uint16_t difficulty
 
int16_t enter_x
 
int16_t enter_y
 
uint32_t fixed_resettime:1
 
uint16_t height
 
uint32_t in_memory
 
uint32_t is_template:1
 
long last_reset_time
 
char * maplore
 
char * msg
 
char * name
 
struct mapdefnext
 
uint32_t nosmooth:1
 
uint32_t outdoor:1
 
char path [HUGE_BUF]
 
int16_t players
 
struct regiondefregion
 
uint32_t reset_time
 
uint32_t reset_timeout
 
double shopgreed
 
struct shopitemshopitems
 
uint64_t shopmax
 
uint64_t shopmin
 
char * shoprace
 
MapSpacespaces
 
int32_t swap_time
 
struct mapdeftile_map [4]
 
char * tile_path [4]
 
int32_t timeout
 
char * tmpname
 
uint32_t unique:1
 
uint16_t width
 

Detailed Description

This is a game-map.

In general, code should always use the macros above (or functions in map.c) to access many of the values in the map structure. Failure to do this will almost certainly break various features. You may think it is safe to look at width and height values directly (or even through the macros), but doing so will completely break map tiling.

Definition at line 325 of file map.h.

Field Documentation

char* mapdef::background_music

Background music to use for this map.

Definition at line 367 of file map.h.

Referenced by free_map(), load_map_header(), pick_bg_music(), and save_map().

int16_t mapdef::enter_x
int16_t mapdef::enter_y

Enter_x and enter_y are default entrance coordinates to use for a map such that when an exit specifies hp,sp of -1,-1 for an exit pointing to the map, when the exit is applied, the character is placed at enter_x,enter_y when they arrive.

Definition at line 348 of file map.h.

Referenced by cfapi_map_get_map_property(), cfapi_object_transfer(), load_map_header(), and save_map().

uint32_t mapdef::fixed_resettime

If true, reset time is not affected by players entering/exiting map.

Definition at line 335 of file map.h.

Referenced by load_map_header(), save_map(), and swap_map().

uint16_t mapdef::height
uint32_t mapdef::is_template

If set, this is a template map.

Definition at line 338 of file map.h.

Referenced by enter_fixed_template_map(), enter_random_template_map(), flush_old_maps(), load_map_header(), and save_map().

long mapdef::last_reset_time

A timestamp of the last original map loading.

Definition at line 366 of file map.h.

Referenced by cast_create_town_portal(), generate_random_map(), get_linked_map(), load_map_header(), ready_map_name(), and save_map().

char* mapdef::maplore

Map lore information.

Definition at line 362 of file map.h.

Referenced by dump_map(), free_map(), load_map_header(), process_map(), and save_map().

char* mapdef::msg

Message map creator may have left.

Definition at line 361 of file map.h.

Referenced by cfapi_map_get_map_property(), current_map_info(), dump_map(), free_map(), generate_random_map(), load_map_header(), and save_map().

uint32_t mapdef::nosmooth

If set the content of this map has smoothlevel=0 forced.

Definition at line 339 of file map.h.

Referenced by load_map_header(), and save_map().

uint32_t mapdef::outdoor

True if an outdoor map.

Definition at line 340 of file map.h.

Referenced by dawn_to_dusk(), expand_lighted_sight(), load_map_header(), ready_map_name(), save_map(), and set_darkness_map().

char mapdef::path[HUGE_BUF]

Filename of the map.

Definition at line 365 of file map.h.

Referenced by add_npcs_to_map(), add_object_to_socklist(), allocate_map(), apply_builder_remove(), apply_map_builder(), apply_savebed(), cast_create_town_portal(), cfapi_map_get_map_property(), cfapi_map_set_map_property(), check_altar_sacrifice(), command_overlay_reset(), command_reset(), command_summon(), command_teleport(), convert_item(), create_player_cmd(), current_map_info(), delete_map(), do_exit_map(), dump_map(), ensure_map_in_memory(), enter_exit(), enter_fixed_template_map(), enter_map(), enter_player_savebed(), enter_random_map(), enter_random_template_map(), enter_unique_map(), examine(), expand_lighted_sight(), find_or_create_connection_for_map(), flush_old_maps(), generate_random_map(), get_exit_seed(), get_map_id(), get_map_zone(), get_who_escape_code_value(), get_zone_for_map(), has_been_loaded(), hiscore_check(), is_legal_2ways_exit(), key_confirm_quit(), load_and_link_tiled_map(), load_map_header(), load_objects(), load_overlay_map(), load_style_map(), load_temporary_map(), load_unique_objects(), map_get_path(), map_info(), map_least_timeout(), map_remove_unique_files(), mapfile_load(), monster_find_nearest_living_creature(), move_creator(), move_detector(), move_duplicator(), move_player_mover(), object_remove(), place_exits(), CREMapInformationManager::process(), process_events(), process_map(), put_doors(), read_map_log(), save_map(), save_player(), shop_specialisation_ratio(), START_TEST(), swap_below_max(), swap_map(), update_position(), and write_map_log().

int16_t mapdef::players

How many players are on this level right now. Automatically updated by the object handling functions.

Definition at line 344 of file map.h.

Referenced by cfapi_map_get_map_property(), command_kick2(), command_nowiz(), current_map_info(), do_wizard_hide(), enter_map(), map_info(), object_insert_in_map(), and object_remove().

struct regiondef* mapdef::region

What jurisdiction in the game world this map is ruled by points to the struct containing all the properties of the region.

Definition at line 329 of file map.h.

Referenced by generate_random_map(), get_map_id(), get_name_of_region_for_map(), load_map_header(), CREMapInformationManager::process(), and save_map().

uint32_t mapdef::reset_time
uint32_t mapdef::reset_timeout

How many seconds must elapse before this map should be reset.

Definition at line 333 of file map.h.

Referenced by cfapi_map_get_map_property(), load_map_header(), and save_map().

double mapdef::shopgreed

How much our shopkeeper overcharges.

Definition at line 358 of file map.h.

Referenced by include_map_in_map(), load_map_header(), CREMapInformationManager::process(), save_map(), shop_describe(), and shop_greed().

struct shopitem* mapdef::shopitems

List of item-types the map's shop will trade in.

Definition at line 356 of file map.h.

Referenced by free_map(), include_map_in_map(), load_map_header(), print_shop_string(), CREMapInformationManager::process(), save_map(), shop_describe(), and shop_specialisation_ratio().

uint64_t mapdef::shopmax

MMaximum price a shop will offer.

Definition at line 360 of file map.h.

Referenced by include_map_in_map(), load_map_header(), CREMapInformationManager::process(), save_map(), shop_describe(), and value_limit().

uint64_t mapdef::shopmin

Minimum price a shop will trade for.

Definition at line 359 of file map.h.

Referenced by include_map_in_map(), load_map_header(), CREMapInformationManager::process(), save_map(), shop_describe(), and value_limit().

char* mapdef::shoprace

The preffered race of the local shopkeeper.

Definition at line 357 of file map.h.

Referenced by free_map(), include_map_in_map(), load_map_header(), CREMapInformationManager::process(), save_map(), shop_approval(), and shop_describe().

MapSpace* mapdef::spaces

Array of spaces on this map.

Definition at line 355 of file map.h.

Referenced by allocate_map(), blocked_link(), free_map(), and get_map_flags().

int32_t mapdef::swap_time

When it reaches 0, the map will be swapped out.

Definition at line 342 of file map.h.

Referenced by save_map().

struct mapdef* mapdef::tile_map[4]

Adjoining maps.

Definition at line 364 of file map.h.

Referenced by adjacent_map(), delete_map(), free_map(), get_map_from_coord(), load_and_link_tiled_map(), out_of_map(), and update_all_los().

char* mapdef::tile_path[4]
uint32_t mapdef::unique

If set, this is a per player unique map.

Definition at line 337 of file map.h.

Referenced by cfapi_map_get_map_property(), command_reset(), decay_objects(), enter_unique_map(), flush_old_maps(), load_map_header(), map_remove_unique_files(), and save_map().


The documentation for this struct was generated from the following file: