Atrinik Server 2.5
Data Fields
mapdef Struct Reference

#include <map.h>

Data Fields

struct mapdefprevious
struct mapdefnext
struct mapdeftile_map [TILED_MAPS]
char * name
char * bg_music
char * weather
char * tmpname
char * msg
shstrpath
shstrtile_path [TILED_MAPS]
MapSpacespaces
MapSpacefirst_light
struct regiondefregion
struct map_eventevents
objectlinkbuttons
objectplayer_first
uint32bitmap
uint32 pathfinding_id
uint32 map_flags
uint32 reset_time
uint32 reset_timeout
sint32 timeout
uint32 swap_time
uint32 in_memory
uint32 traversed
int darkness
int light_value
int difficulty
int height
int width
int enter_x
int enter_y
int compressed

Detailed Description

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


Field Documentation

Background music of the map

Definition at line 561 of file map.h.

Bitmap used for marking visited tiles in pathfinding

Definition at line 597 of file map.h.

Linked list of linked lists of buttons

Definition at line 591 of file map.h.

Compression method used

Definition at line 670 of file map.h.

Indicates the base light value on this map.

This value is only used when the map is not marked as outdoor.

See also:
MAP_DEFAULT_DARKNESS

Definition at line 633 of file map.h.

What level the player should be to play here. Affects treasures, random shops and various other things.

Definition at line 643 of file map.h.

Used to indicate the X position of where to put the player when he logs in to the map if the map has flag MAP_FLAG_FIXED_LOGIN set.

Also used by exits as the default X location if the exit doesn't have one set.

See also:
MAP_FLAG_FIXED_LOGIN

Definition at line 658 of file map.h.

Used to indicate the Y position of where to put the player when he logs in to the map if the map has flag MAP_FLAG_FIXED_LOGIN set.

Also used by exits as the default Y location if the exit doesn't have one set.

See also:
MAP_FLAG_FIXED_LOGIN

Definition at line 667 of file map.h.

Map-wide events for this map.

Definition at line 588 of file map.h.

List of tile spaces with light sources

Definition at line 582 of file map.h.

Height of the map.

Definition at line 646 of file map.h.

If not true, the map has been freed and must be loaded before used. The map, omap and map_ob arrays will be allocated when the map is loaded

Definition at line 623 of file map.h.

The real light_value, built out from darkness and possible other factors.

Definition at line 638 of file map.h.

Map flags for various map settings

Definition at line 603 of file map.h.

char* mapdef::msg

Message map creator may have left

Definition at line 570 of file map.h.

char* mapdef::name

Name of map as given by its creator

Definition at line 558 of file map.h.

Next map, linked list

Definition at line 552 of file map.h.

Filename of the map (shared string now)

Definition at line 573 of file map.h.

For which traversal is mapstruct::bitmap valid.

Definition at line 600 of file map.h.

Chained list of players on this map

Definition at line 594 of file map.h.

Previous map before. If NULL we are first_map.

Definition at line 549 of file map.h.

Pointer to the region this map is in.

Definition at line 585 of file map.h.

When this map should reset

Definition at line 606 of file map.h.

How many seconds must elapse before this map should be reset

Definition at line 611 of file map.h.

Array of spaces on this map

Definition at line 579 of file map.h.

How long to wait before a map is swapped out.

Definition at line 617 of file map.h.

struct mapdef* mapdef::tile_map[TILED_MAPS]

Any maps tiled together to this one

Definition at line 555 of file map.h.

shstr* mapdef::tile_path[TILED_MAPS]

Path to adjoining maps (shared strings)

Definition at line 576 of file map.h.

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

Definition at line 614 of file map.h.

Name of temporary file

Definition at line 567 of file map.h.

Used by relative_tile_position() to mark visited maps

Definition at line 626 of file map.h.

Weather effect active on this map.

Definition at line 564 of file map.h.

Width of the map.

Definition at line 649 of file map.h.


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