Atrinik Server  4.0
Data Fields
mapdef Struct Reference

#include <map.h>

Data Fields

struct mapdeftile_map [TILED_NUM]
 
shstr * name
 
shstr * bg_music
 
shstr * weather
 
char * tmpname
 
char * msg
 
shstr * path
 
shstr * tile_path [TILED_NUM]
 
MapSpacespaces
 
MapSpacefirst_light
 
region_structregion
 
struct map_eventevents
 
map_exit_texits
 
objectlinkbuttons
 
objectlinklinked_spawn_points
 
objectplayer_first
 
uint32_t * bitmap
 
uint32_t pathfinding_id
 
struct path_node ** path_nodes
 
uint32_t map_flags
 
uint32_t reset_time
 
uint32_t reset_timeout
 
int32_t timeout
 
uint32_t swap_time
 
uint32_t in_memory
 
uint32_t traversed
 
int darkness
 
int light_value
 
int difficulty
 
int height
 
int width
 
int enter_x
 
int enter_y
 
int16_t coords [3]
 X, Y and Z coordinates.
 
int8_t level_min
 Minimum level offset that is part of this map.
 
int8_t level_max
 Maximum level offset that is part of this map.
 
bool global_removed
 If true, the map was removed from the global list.
 
tag_t count
 Unique identifier for the map.
 

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

Field Documentation

shstr* mapdef::bg_music

Background music of the map

Definition at line 556 of file map.h.

uint32_t* mapdef::bitmap

Bitmap used for marking visited tiles in pathfinding

Definition at line 597 of file map.h.

objectlink* mapdef::buttons

Linked list of linked lists of buttons

Definition at line 588 of file map.h.

int mapdef::darkness

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

int mapdef::difficulty

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

Definition at line 650 of file map.h.

int mapdef::enter_x

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

int mapdef::enter_y

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

struct map_event* mapdef::events

Map-wide events for this map.

Definition at line 583 of file map.h.

MapSpace* mapdef::first_light

List of tile spaces with light sources

Definition at line 577 of file map.h.

int mapdef::height

Height of the map.

Definition at line 653 of file map.h.

uint32_t mapdef::in_memory

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

int mapdef::light_value

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

Definition at line 644 of file map.h.

objectlink* mapdef::linked_spawn_points

Linked list of linked spawn points.

Definition at line 591 of file map.h.

uint32_t mapdef::map_flags

Map flags for various map settings

Definition at line 605 of file map.h.

char* mapdef::msg

Message map creator may have left

Definition at line 565 of file map.h.

shstr* mapdef::name

Name of map as given by its creator

Definition at line 553 of file map.h.

shstr* mapdef::path

Filename of the map (shared string now)

Definition at line 568 of file map.h.

uint32_t mapdef::pathfinding_id

For which traversal is mapstruct::bitmap valid.

Definition at line 600 of file map.h.

object* mapdef::player_first

Chained list of players on this map

Definition at line 594 of file map.h.

region_struct* mapdef::region

Pointer to the region this map is in.

Definition at line 580 of file map.h.

uint32_t mapdef::reset_time

When this map should reset

Definition at line 608 of file map.h.

uint32_t mapdef::reset_timeout

How many seconds must elapse before this map should be reset

Definition at line 614 of file map.h.

MapSpace* mapdef::spaces

Array of spaces on this map

Definition at line 574 of file map.h.

uint32_t mapdef::swap_time

How long to wait before a map is swapped out.

Definition at line 620 of file map.h.

struct mapdef* mapdef::tile_map[TILED_NUM]

Any maps tiled together to this one

Definition at line 550 of file map.h.

shstr* mapdef::tile_path[TILED_NUM]

Path to adjoining maps (shared strings)

Definition at line 571 of file map.h.

int32_t mapdef::timeout

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

Definition at line 617 of file map.h.

char* mapdef::tmpname

Name of temporary file

Definition at line 562 of file map.h.

uint32_t mapdef::traversed

Used by relative_tile_position() to mark visited maps

Definition at line 630 of file map.h.

shstr* mapdef::weather

Weather effect active on this map.

Definition at line 559 of file map.h.

int mapdef::width

Width of the map.

Definition at line 656 of file map.h.


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