Crossfire Server, Trunk
mapstruct Struct Reference

#include <map.h>

+ Collaboration diagram for mapstruct:

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
 
mapstructnext
 
uint32_t nosmooth:1
 
uint32_t outdoor:1
 
char path [HUGE_BUF]
 
int16_t players
 
struct regionregion
 
sstring reset_group
 
uint32_t reset_time
 
uint32_t reset_timeout
 
double shopgreed
 
struct shopitemsshopitems
 
uint64_t shopmax
 
uint64_t shopmin
 
char * shoprace
 
MapSpacespaces
 
mapstructtile_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 313 of file map.h.

Field Documentation

◆ background_music

char* mapstruct::background_music

Background music to use for this map.

Definition at line 355 of file map.h.

◆ buttons

oblinkpt* mapstruct::buttons

Linked list of linked lists of buttons.

Definition at line 342 of file map.h.

Referenced by get_button_links(), and get_button_value().

◆ darkness

uint8_t mapstruct::darkness

Indicates level of darkness of map.

Definition at line 334 of file map.h.

Referenced by adj_attackroll(), and monster_can_see_enemy().

◆ difficulty

uint16_t mapstruct::difficulty

What level the player should be to play here.

Definition at line 331 of file map.h.

Referenced by generate_monster_arch(), generate_monster_inv(), generate_random_map(), and trap_disarm().

◆ enter_x

int16_t mapstruct::enter_x

Definition at line 336 of file map.h.

◆ enter_y

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

◆ fixed_resettime

uint32_t mapstruct::fixed_resettime

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

Definition at line 323 of file map.h.

◆ height

uint16_t mapstruct::height

Width and height of map.

Definition at line 335 of file map.h.

Referenced by monster_compute_path(), and START_TEST().

◆ in_memory

uint32_t mapstruct::in_memory

◆ is_template

uint32_t mapstruct::is_template

If set, this is a template map.

Definition at line 327 of file map.h.

Referenced by enter_fixed_template_map(), and enter_random_template_map().

◆ last_reset_time

long mapstruct::last_reset_time

A timestamp of the last original map loading.

Definition at line 354 of file map.h.

Referenced by cast_create_town_portal(), and generate_random_map().

◆ maplore

char* mapstruct::maplore

Map lore information.

Definition at line 350 of file map.h.

◆ msg

char* mapstruct::msg

Message map creator may have left.

Definition at line 349 of file map.h.

Referenced by generate_random_map().

◆ name

char* mapstruct::name

Name of map as given by its creator.

Definition at line 316 of file map.h.

Referenced by enter_fixed_template_map(), and enter_random_template_map().

◆ next

mapstruct* mapstruct::next

Next map, linked list.

Definition at line 314 of file map.h.

Referenced by command_style_map_info(), delete_map(), free_style_maps(), key_confirm_quit(), load_style_map(), map_can_reset(), and START_TEST().

◆ nosmooth

uint32_t mapstruct::nosmooth

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

Definition at line 328 of file map.h.

◆ outdoor

uint32_t mapstruct::outdoor

True if an outdoor map.

Definition at line 329 of file map.h.

Referenced by generate_random_map().

◆ path

◆ players

int16_t mapstruct::players

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

Definition at line 332 of file map.h.

Referenced by player_map_change_common(), and transport_type_apply().

◆ region

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

Referenced by generate_random_map().

◆ reset_group

sstring mapstruct::reset_group

For reset purpose, all maps in the same group reset at the same time.

Definition at line 325 of file map.h.

Referenced by enter_random_map(), enter_random_template_map(), generate_random_map(), map_can_reset(), and place_exits().

◆ reset_time

uint32_t mapstruct::reset_time

Server time when map gets reset, seconds since epoch. Accessed through MAP_WHEN_RESET().

Definition at line 320 of file map.h.

Referenced by CREMapInformationManager::checkItem(), monsterFight(), process_map(), and START_TEST().

◆ reset_timeout

uint32_t mapstruct::reset_timeout

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

Definition at line 321 of file map.h.

◆ shopgreed

double mapstruct::shopgreed

How much our shopkeeper overcharges.

Definition at line 346 of file map.h.

Referenced by include_map_in_map().

◆ shopitems

struct shopitems* mapstruct::shopitems

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

Definition at line 344 of file map.h.

Referenced by include_map_in_map().

◆ shopmax

uint64_t mapstruct::shopmax

MMaximum price a shop will offer.

Definition at line 348 of file map.h.

Referenced by include_map_in_map().

◆ shopmin

uint64_t mapstruct::shopmin

Minimum price a shop will trade for.

Definition at line 347 of file map.h.

Referenced by include_map_in_map().

◆ shoprace

char* mapstruct::shoprace

The preffered race of the local shopkeeper.

Definition at line 345 of file map.h.

Referenced by include_map_in_map().

◆ spaces

MapSpace* mapstruct::spaces

Array of spaces on this map.

Definition at line 343 of file map.h.

Referenced by get_map_flags().

◆ tile_map

mapstruct* mapstruct::tile_map[4]

Adjoining maps.

Definition at line 352 of file map.h.

Referenced by adjacent_map(), load_and_link_tiled_map(), and test_stand_in_light().

◆ tile_path

char* mapstruct::tile_path[4]

Path to adjoining maps.

Definition at line 351 of file map.h.

Referenced by load_and_link_tiled_map().

◆ timeout

int32_t mapstruct::timeout

Swapout is set to this.

Definition at line 330 of file map.h.

Referenced by player_map_change_common(), and set_map_timeout().

◆ tmpname

char* mapstruct::tmpname

Name of temporary file.

Definition at line 315 of file map.h.

◆ unique

uint32_t mapstruct::unique

If set, this is a per player unique map.

Definition at line 326 of file map.h.

Referenced by enter_unique_map(), and is_legal_2ways_exit().

◆ width

uint16_t mapstruct::width

Definition at line 335 of file map.h.

Referenced by get_map_flags(), monster_compute_path(), and START_TEST().


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