Atrinik Server  4.0
Macros
Map structure macros

Macros

#define MAP_WHEN_RESET(m)   ((m)->reset_time)
 
#define MAP_RESET_TIMEOUT(m)   ((m)->reset_timeout)
 
#define MAP_DIFFICULTY(m)   ((m)->difficulty)
 
#define MAP_TIMEOUT(m)   ((m)->timeout)
 
#define MAP_SWAP_TIME(m)   ((m)->swap_time)
 
#define MAP_OUTDOORS(m)   ((m)->map_flags & MAP_FLAG_OUTDOOR)
 
#define MAP_UNIQUE(m)   ((m)->map_flags & MAP_FLAG_UNIQUE)
 
#define MAP_FIXED_RESETTIME(m)   ((m)->map_flags & MAP_FLAG_FIXED_RTIME)
 
#define MAP_NOSAVE(m)   ((m)->map_flags & MAP_FLAG_NO_SAVE)
 
#define MAP_NOMAGIC(m)   ((m)->map_flags & MAP_FLAG_NOMAGIC)
 
#define MAP_HEIGHT_DIFF(m)   ((m)->map_flags & MAP_FLAG_HEIGHT_DIFF)
 
#define MAP_NOHARM(m)   ((m)->map_flags & MAP_FLAG_NOHARM)
 
#define MAP_NOSUMMON(m)   ((m)->map_flags & MAP_FLAG_NOSUMMON)
 
#define MAP_FIXEDLOGIN(m)   ((m)->map_flags & MAP_FLAG_FIXED_LOGIN)
 
#define MAP_PLAYER_NO_SAVE(m)   ((m)->map_flags & MAP_FLAG_PLAYER_NO_SAVE)
 
#define MAP_PVP(m)   ((m)->map_flags & MAP_FLAG_PVP)
 
#define MAP_DARKNESS(m)   (m)->darkness
 
#define MAP_WIDTH(m)   (m)->width
 
#define MAP_HEIGHT(m)   (m)->height
 
#define MAP_SIZE(m)   ((m)->width * (m)->height)
 
#define MAP_ENTER_X(m)   (m)->enter_x
 
#define MAP_ENTER_Y(m)   (m)->enter_y
 

Detailed Description

These macros are used to access flags of a map, the map reset time, the map owner, etc.

Macro Definition Documentation

#define MAP_DARKNESS (   m)    (m)->darkness

Darkness of a map

Definition at line 118 of file map.h.

#define MAP_DIFFICULTY (   m)    ((m)->difficulty)

The map difficulty

Definition at line 88 of file map.h.

#define MAP_ENTER_X (   m)    (m)->enter_x

Enter X position of a map

Definition at line 129 of file map.h.

#define MAP_ENTER_Y (   m)    (m)->enter_y

Enter Y position of a map

Definition at line 131 of file map.h.

#define MAP_FIXED_RESETTIME (   m)    ((m)->map_flags & MAP_FLAG_FIXED_RTIME)

Does the map have fixed reset time?

Definition at line 98 of file map.h.

#define MAP_FIXEDLOGIN (   m)    ((m)->map_flags & MAP_FLAG_FIXED_LOGIN)

Is the map a fixed login map?

Definition at line 112 of file map.h.

#define MAP_HEIGHT (   m)    (m)->height

Height of a map

Definition at line 122 of file map.h.

#define MAP_NOHARM (   m)    ((m)->map_flags & MAP_FLAG_NOHARM)

Does the map disallow harmful spells?

Definition at line 108 of file map.h.

#define MAP_NOMAGIC (   m)    ((m)->map_flags & MAP_FLAG_NOMAGIC)

Does the map disallow magic?

Definition at line 102 of file map.h.

#define MAP_NOSAVE (   m)    ((m)->map_flags & MAP_FLAG_NO_SAVE)

Is the map no-save map?

Definition at line 100 of file map.h.

#define MAP_NOSUMMON (   m)    ((m)->map_flags & MAP_FLAG_NOSUMMON)

Does the map disallow summoning spells?

Definition at line 110 of file map.h.

#define MAP_OUTDOORS (   m)    ((m)->map_flags & MAP_FLAG_OUTDOOR)

Is the map outdoors map?

Definition at line 94 of file map.h.

#define MAP_PLAYER_NO_SAVE (   m)    ((m)->map_flags & MAP_FLAG_PLAYER_NO_SAVE)

Are players unable to save on this map?

Definition at line 114 of file map.h.

#define MAP_PVP (   m)    ((m)->map_flags & MAP_FLAG_PVP)

Is the map PVP area?

Definition at line 116 of file map.h.

#define MAP_RESET_TIMEOUT (   m)    ((m)->reset_timeout)

The map reset timeout

Definition at line 86 of file map.h.

#define MAP_SIZE (   m)    ((m)->width * (m)->height)

Convenience function - total number of spaces on map is used in many places.

Definition at line 127 of file map.h.

#define MAP_SWAP_TIME (   m)    ((m)->swap_time)

The map swap time

Definition at line 92 of file map.h.

#define MAP_TIMEOUT (   m)    ((m)->timeout)

The map timeout

Definition at line 90 of file map.h.

#define MAP_UNIQUE (   m)    ((m)->map_flags & MAP_FLAG_UNIQUE)

Is the map unique map?

Definition at line 96 of file map.h.

#define MAP_WHEN_RESET (   m)    ((m)->reset_time)

This is when the map will reset

Definition at line 84 of file map.h.

#define MAP_WIDTH (   m)    (m)->width

Width of a map

Definition at line 120 of file map.h.