Crossfire Server, Branch 1.12  R12190
Data Fields
mapdef Struct Reference

This is a game-map. More...

#include <map.h>

Collaboration diagram for mapdef:
Collaboration graph
[legend]

Data Fields

char * background_music
 Background music to use for this map.
oblinkpt * buttons
 Linked list of linked lists of buttons.
uint8 compressed
 Compression method used.
uint8 darkness
 Indicates level of darkness of map.
uint16 difficulty
 What level the player should be to play here.
uint16 enter_x
 Enter_x and enter_y are default entrance location.
uint16 enter_y
 on the map if none are set in the exit.
uint32 fixed_resettime:1
 If true, reset time is not affected by players entering/exiting map.
uint16 height
 Width and height of map.
uint32 in_memory
 Combination of IN_MEMORY_xxx flags.
uint32 is_template:1
 If set, this is a template map.
struct timeval last_reset_time
 A timestamp of the last original map loading.
char * maplore
 Map lore information.
char * msg
 Message map creator may have left.
char * name
 Name of map as given by its creator.
struct mapdefnext
 Next map, linked list.
uint32 nosmooth:1
 If set the content of this map has smoothlevel=0 forced.
uint32 outdoor:1
 True if an outdoor map.
char path [HUGE_BUF]
 Filename of the map.
sint16 players
 How many players are on this level right now.
struct regiondefregion
 What jurisdiction in the game world this map is ruled by points to the struct containing all the properties of the region.
uint32 reset_time
 When this map should reset.
uint32 reset_timeout
 How many seconds must elapse before this map should be reset.
double shopgreed
 How much our shopkeeper overcharges.
struct shopitemshopitems
 List of item-types the map's shop will trade in.
uint64 shopmax
 MMaximum price a shop will offer.
uint64 shopmin
 Minimum price a shop will trade for.
char * shoprace
 The preffered race of the local shopkeeper.
MapSpacespaces
 Array of spaces on this map.
sint32 swap_time
 When it reaches 0, the map will be swapped out.
struct mapdeftile_map [4]
 Adjoining maps.
char * tile_path [4]
 Path to adjoining maps.
sint32 timeout
 Swapout is set to this.
char * tmpname
 Name of temporary file.
uint32 unique:1
 If set, this is a per player unique map.
uint16 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 344 of file map.h.


Field Documentation

Background music to use for this map.

Definition at line 384 of file map.h.

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

oblinkpt* mapdef::buttons

Linked list of linked lists of buttons.

Definition at line 371 of file map.h.

Referenced by add_button_link(), find_unused_connected_value(), free_map(), Map_TriggerConnected(), update_buttons(), and verify_button_links().

Compression method used.

Definition at line 365 of file map.h.

Referenced by load_original_map(), load_overlay_map(), load_temporary_map(), and save_map().

Indicates level of darkness of map.

Definition at line 367 of file map.h.

Referenced by cfapi_map_get_map_property(), change_map_light(), dump_map(), load_map_header(), read_map_log(), save_map(), set_darkness_map(), and write_map_log().

Enter_x and enter_y are default entrance location.

Definition at line 369 of file map.h.

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

on the map if none are set in the exit.

Definition at line 370 of file map.h.

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

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

Definition at line 354 of file map.h.

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

Width and height of map.

Definition at line 368 of file map.h.

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

If set, this is a template map.

Definition at line 357 of file map.h.

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

struct timeval mapdef::last_reset_time

A timestamp of the last original map loading.

Definition at line 383 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().

Map lore information.

Definition at line 379 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 378 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().

char* mapdef::name

Name of map as given by its creator.

Definition at line 347 of file map.h.

Referenced by cfapi_map_get_map_property(), current_map_info(), free_map(), get_name_of_region_for_map(), load_map_header(), process_map(), and save_map().

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

Definition at line 358 of file map.h.

Referenced by load_map_header(), and save_map().

True if an outdoor map.

Definition at line 359 of file map.h.

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

How many players are on this level right now.

Automatically updated by the object handling functions.

Definition at line 363 of file map.h.

Referenced by cfapi_map_get_map_property(), current_map_info(), enter_map(), and map_info().

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 348 of file map.h.

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

When this map should reset.

Definition at line 351 of file map.h.

Referenced by cfapi_map_get_map_property(), command_reset(), process_map(), read_map_log(), swap_map(), and write_map_log().

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

Definition at line 352 of file map.h.

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

How much our shopkeeper overcharges.

Definition at line 375 of file map.h.

Referenced by describe_shop(), load_map_header(), save_map(), and shop_greed().

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

Definition at line 373 of file map.h.

Referenced by describe_shop(), free_map(), load_map_header(), print_shop_string(), save_map(), and shop_specialisation_ratio().

MMaximum price a shop will offer.

Definition at line 377 of file map.h.

Referenced by describe_shop(), load_map_header(), save_map(), and value_limit().

Minimum price a shop will trade for.

Definition at line 376 of file map.h.

Referenced by describe_shop(), load_map_header(), save_map(), and value_limit().

The preffered race of the local shopkeeper.

Definition at line 374 of file map.h.

Referenced by describe_shop(), free_map(), load_map_header(), save_map(), and shopkeeper_approval().

Array of spaces on this map.

Definition at line 372 of file map.h.

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

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

Definition at line 361 of file map.h.

Referenced by save_map().

Adjoining maps.

Definition at line 381 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().

Path to adjoining maps.

Definition at line 380 of file map.h.

Referenced by free_map(), get_map_from_coord(), load_and_link_tiled_map(), load_map_header(), out_of_map(), process_map(), and save_map().

If set, this is a per player unique map.

Definition at line 356 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: