![]() |
Crossfire Server, Trunk
1.75.0
|
This is a game-map. More...
#include <map.h>
Data Fields | |
char * | background_music |
Background music to use for this map. More... | |
oblinkpt * | buttons |
Linked list of linked lists of buttons. More... | |
uint8_t | darkness |
Indicates level of darkness of map. More... | |
uint16_t | difficulty |
What level the player should be to play here. More... | |
int16_t | enter_x |
int16_t | 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. More... | |
uint32_t | fixed_resettime:1 |
If true, reset time is not affected by players entering/exiting map. More... | |
uint16_t | height |
Width and height of map. More... | |
uint32_t | in_memory |
Combination of IN_MEMORY_xxx flags. More... | |
uint32_t | is_template:1 |
If set, this is a template map. More... | |
long | last_reset_time |
A timestamp of the last original map loading. More... | |
char * | maplore |
Map lore information. More... | |
char * | msg |
Message map creator may have left. More... | |
char * | name |
Name of map as given by its creator. More... | |
mapstruct * | next |
Next map, linked list. More... | |
uint32_t | nosmooth:1 |
If set the content of this map has smoothlevel=0 forced. More... | |
uint32_t | outdoor:1 |
True if an outdoor map. More... | |
char | path [HUGE_BUF] |
Filename of the map. More... | |
int16_t | players |
How many players are on this level right now. More... | |
struct region * | region |
What jurisdiction in the game world this map is ruled by points to the struct containing all the properties of the region. More... | |
sstring | reset_group |
For reset purpose, all maps in the same group reset at the same time. More... | |
uint32_t | reset_time |
Server time when map gets reset, seconds since epoch. More... | |
uint32_t | reset_timeout |
How many seconds must elapse before this map should be reset. More... | |
double | shopgreed |
How much our shopkeeper overcharges. More... | |
struct shopitems * | shopitems |
List of item-types the map's shop will trade in. More... | |
uint64_t | shopmax |
MMaximum price a shop will offer. More... | |
uint64_t | shopmin |
Minimum price a shop will trade for. More... | |
char * | shoprace |
The preffered race of the local shopkeeper. More... | |
MapSpace * | spaces |
Array of spaces on this map. More... | |
mapstruct * | tile_map [4] |
Adjoining maps. More... | |
char * | tile_path [4] |
Path to adjoining maps. More... | |
int32_t | timeout |
Swapout is set to this. More... | |
char * | tmpname |
Name of temporary file. More... | |
uint32_t | unique:1 |
If set, this is a per player unique map. More... | |
uint16_t | width |
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.
char* mapstruct::background_music |
Background music to use for this map.
Definition at line 357 of file map.h.
Referenced by pick_bg_music().
oblinkpt* mapstruct::buttons |
Linked list of linked lists of buttons.
Definition at line 344 of file map.h.
Referenced by add_button_link(), find_unused_connected_value(), get_button_links(), get_button_value(), Map_TriggerConnected(), remove_button_link(), and runtrigger().
uint8_t mapstruct::darkness |
Indicates level of darkness of map.
Definition at line 336 of file map.h.
Referenced by adj_attackroll(), cfapi_map_get_map_property(), hideability(), monster_can_detect_enemy(), monster_can_see_enemy(), monster_check_wakeup(), monster_move(), read_map_log(), and write_map_log().
uint16_t mapstruct::difficulty |
What level the player should be to play here.
Definition at line 333 of file map.h.
Referenced by apply_auto(), attempt_hide(), attempt_pick_lock(), calc_skill_exp(), command_create(), do_harvest(), do_hidden_move(), fix_generated_item(), generate_monster_arch(), generate_monster_inv(), generate_random_map(), mimic_type_apply(), place_chest(), polymorph_living(), put_a_monster(), read_map_log(), rune_attack(), trap_disarm(), trap_see(), and write_map_log().
int16_t mapstruct::enter_x |
Definition at line 338 of file map.h.
Referenced by cfapi_map_get_map_property(), and cfapi_object_transfer().
int16_t mapstruct::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 338 of file map.h.
Referenced by cfapi_map_get_map_property(), and cfapi_object_transfer().
uint32_t mapstruct::fixed_resettime |
If true, reset time is not affected by players entering/exiting map.
Definition at line 325 of file map.h.
Referenced by swap_map().
uint16_t mapstruct::height |
Width and height of map.
Definition at line 337 of file map.h.
Referenced by cfapi_map_get_map_property(), and monster_compute_path().
uint32_t mapstruct::in_memory |
Combination of IN_MEMORY_xxx flags.
Definition at line 335 of file map.h.
Referenced by check_active_maps(), draw_client_map(), ensure_map_in_memory(), esrv_draw_look(), face_player(), free_all_maps(), get_linked_map(), leave(), map_can_reset_no_group(), move_player(), object_free(), object_remove(), object_update(), pets_follow_owner(), process_events(), process_map(), read_map_log(), swap_map(), and write_map_log().
uint32_t mapstruct::is_template |
If set, this is a template map.
Definition at line 329 of file map.h.
Referenced by enter_fixed_template_map(), and enter_random_template_map().
long mapstruct::last_reset_time |
A timestamp of the last original map loading.
Definition at line 356 of file map.h.
Referenced by cast_create_town_portal(), generate_random_map(), get_linked_map(), and town_portal_find_force().
char* mapstruct::msg |
Message map creator may have left.
Definition at line 351 of file map.h.
Referenced by cfapi_map_get_map_property(), and generate_random_map().
char* mapstruct::name |
Name of map as given by its creator.
Definition at line 318 of file map.h.
Referenced by account_char_add(), cfapi_map_get_map_property(), deathstrike_living(), enter_fixed_template_map(), enter_random_template_map(), get_who_escape_code_value(), hiscore_check(), map_get_path(), monster_move(), and parse_shop_string().
mapstruct* mapstruct::next |
Next map, linked list.
Definition at line 316 of file map.h.
Referenced by cfapi_map_get_map_property(), cfapi_system_get_map_vector(), check_active_maps(), command_style_map_info(), delete_map(), free_style_maps(), get_linked_map(), has_been_loaded(), key_confirm_quit(), load_style_map(), map_can_reset(), swap_map(), and write_map_log().
uint32_t mapstruct::nosmooth |
uint32_t mapstruct::outdoor |
True if an outdoor map.
Definition at line 331 of file map.h.
Referenced by expand_lighted_sight(), and generate_random_map().
char mapstruct::path[HUGE_BUF] |
Filename of the map.
Definition at line 355 of file map.h.
Referenced by add_npcs_to_map(), add_object_to_socklist(), 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_swap(), command_teleport(), create_player_cmd(), do_exit_map(), do_item_conversion(), 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(), 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_style_map(), map_get_path(), map_remove_unique_files(), monster_move(), move_creator(), move_detector(), move_duplicator(), move_firewall(), move_player_mover(), object_remove(), place_exits(), process_events(), put_doors(), read_map_log(), save_player(), shop_specialisation_ratio(), swap_map(), town_portal_find_force(), while(), and write_map_log().
int16_t mapstruct::players |
How many players are on this level right now.
Automatically updated by the object handling functions.
Definition at line 334 of file map.h.
Referenced by cfapi_map_get_map_property(), do_wizard_hide(), object_insert_in_map(), object_remove(), player_map_change_common(), transport_type_apply(), and unhide().
struct region* mapstruct::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 319 of file map.h.
Referenced by generate_random_map(), and get_map_id().
sstring mapstruct::reset_group |
For reset purpose, all maps in the same group reset at the same time.
Definition at line 327 of file map.h.
Referenced by enter_random_map(), enter_random_template_map(), generate_random_map(), map_can_reset(), place_exits(), and swap_map().
uint32_t mapstruct::reset_time |
Server time when map gets reset, seconds since epoch.
Accessed through MAP_WHEN_RESET().
Definition at line 322 of file map.h.
Referenced by cfapi_map_get_map_property(), map_can_reset_no_group(), process_map(), read_map_log(), swap_map(), and write_map_log().
uint32_t mapstruct::reset_timeout |
How many seconds must elapse before this map should be reset.
Definition at line 323 of file map.h.
Referenced by cfapi_map_get_map_property().
double mapstruct::shopgreed |
How much our shopkeeper overcharges.
Definition at line 348 of file map.h.
Referenced by include_map_in_map(), shop_describe(), and shop_greed().
struct shopitems* mapstruct::shopitems |
List of item-types the map's shop will trade in.
Definition at line 346 of file map.h.
Referenced by include_map_in_map(), shop_describe(), and shop_specialisation_ratio().
uint64_t mapstruct::shopmax |
MMaximum price a shop will offer.
Definition at line 350 of file map.h.
Referenced by include_map_in_map(), shop_describe(), and value_limit().
uint64_t mapstruct::shopmin |
Minimum price a shop will trade for.
Definition at line 349 of file map.h.
Referenced by include_map_in_map(), shop_describe(), and value_limit().
char* mapstruct::shoprace |
The preffered race of the local shopkeeper.
Definition at line 347 of file map.h.
Referenced by include_map_in_map(), shop_approval(), and shop_describe().
MapSpace* mapstruct::spaces |
mapstruct* mapstruct::tile_map[4] |
Adjoining maps.
Definition at line 354 of file map.h.
Referenced by adjacent_map(), delete_map(), load_and_link_tiled_map(), and update_all_los().
char* mapstruct::tile_path[4] |
Path to adjoining maps.
Definition at line 353 of file map.h.
Referenced by load_and_link_tiled_map().
int32_t mapstruct::timeout |
Swapout is set to this.
Definition at line 332 of file map.h.
Referenced by check_active_maps(), leave(), player_map_change_common(), read_map_log(), set_map_timeout(), and swap_map().
char* mapstruct::tmpname |
Name of temporary file.
Definition at line 317 of file map.h.
Referenced by cfapi_map_get_map_property(), map_can_reset_no_group(), read_map_log(), and write_map_log().
uint32_t mapstruct::unique |
If set, this is a per player unique map.
Definition at line 328 of file map.h.
Referenced by cast_create_town_portal(), cfapi_map_get_map_property(), enter_unique_map(), is_legal_2ways_exit(), and map_remove_unique_files().
uint16_t mapstruct::width |
Definition at line 337 of file map.h.
Referenced by cfapi_map_get_map_property(), get_map_flags(), and monster_compute_path().