Crossfire Server, Trunk
|
Go to the source code of this file.
Data Structures | |
struct | MapSpace |
struct | mapstruct |
struct | region |
struct | rv_vector |
struct | shopitems |
Macros | |
#define | AB_NO_PASS 0x04 |
#define | GET_MAP_FACE_OBJ(M, X, Y, L) (map_space(M, X, Y)->faces_obj[L]) |
#define | GET_MAP_FACE_OBJS(M, X, Y) (map_space(M, X, Y)->faces_obj) |
#define | GET_MAP_FLAGS(M, X, Y) (map_space(M, X, Y)->flags) |
#define | GET_MAP_LIGHT(M, X, Y) (map_space(M, X, Y)->light) |
#define | GET_MAP_MOVE_BLOCK(M, X, Y) (map_space(M, X, Y)->move_block) |
#define | GET_MAP_MOVE_OFF(M, X, Y) (map_space(M, X, Y)->move_off) |
#define | GET_MAP_MOVE_ON(M, X, Y) (map_space(M, X, Y)->move_on) |
#define | GET_MAP_MOVE_SLOW(M, X, Y) (map_space(M, X, Y)->move_slow) |
#define | GET_MAP_OB(M, X, Y) (map_space(M, X, Y)->bottom) |
#define | GET_MAP_PLAYER(M, X, Y) (map_space(M, X, Y)->pl) |
#define | GET_MAP_TOP(M, X, Y) (map_space(M, X, Y)->top) |
#define | MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
#define | MAGIC_MAP_SIZE 50 |
#define | MAP_DARKNESS(m) (m)->darkness |
#define | MAP_DIFFICULTY(m) ((m)->difficulty) |
#define | MAP_ENTER_X(m) (m)->enter_x |
#define | MAP_ENTER_Y(m) (m)->enter_y |
#define | MAP_FLUSH 0x1 |
#define | MAP_HEIGHT(m) (m)->height |
#define | MAP_IN_MEMORY 1 |
#define | MAP_LAYER_FLOOR 0 |
#define | MAP_LAYER_FLY1 8 |
#define | MAP_LAYER_FLY2 9 |
#define | MAP_LAYER_ITEM1 3 |
#define | MAP_LAYER_ITEM2 4 |
#define | MAP_LAYER_ITEM3 5 |
#define | MAP_LAYER_LIVING1 6 |
#define | MAP_LAYER_LIVING2 7 |
#define | MAP_LAYER_NO_PICK1 1 |
#define | MAP_LAYER_NO_PICK2 2 |
#define | MAP_LAYERS 10 |
#define | MAP_LOADING 3 |
#define | MAP_NO_DIFFICULTY 0x4 |
#define | MAP_NOSMOOTH(m) (m)->nosmooth |
#define | MAP_OUTDOORS(m) ((m)->outdoor) |
#define | MAP_OVERLAY 0x10 |
#define | MAP_PLAYER_UNIQUE 0x2 |
#define | MAP_RESET_TIMEOUT(m) ((m)->reset_timeout) |
#define | MAP_SAVING 4 |
#define | MAP_SIZE(m) map_size(m) |
#define | MAP_STYLE 0x8 |
#define | MAP_SWAPPED 2 |
#define | MAP_TIMEOUT(m) ((m)->timeout) |
#define | MAP_TYPE_CHOICE 3 |
#define | MAP_TYPE_DEFAULT 2 |
#define | MAP_TYPE_LEGACY 1 |
#define | MAP_WHEN_RESET(m) ((m)->reset_time) |
#define | MAP_WIDTH(m) (m)->width |
#define | OUT_OF_REAL_MAP(M, X, Y) ((X) < 0 || (Y) < 0 || (X) >= (M)->width || (Y) >= (M)->height) |
#define | P_BLOCKSVIEW 0x01 |
#define | P_IS_ALIVE 0x10 |
#define | P_NEED_UPDATE 0x40 |
#define | P_NEW_MAP 0x200 |
#define | P_NO_CLERIC 0x20 |
#define | P_NO_ERROR 0x80 |
#define | P_NO_MAGIC 0x02 |
#define | P_OUT_OF_MAP 0x100 |
#define | P_PLAYER 0x08 |
#define | SAVE_ERROR_CLOSE -6 |
#define | SAVE_ERROR_NO_PATH -4 |
#define | SAVE_ERROR_NOT_IN_MEMORY -10 |
#define | SAVE_ERROR_OK 0 |
#define | SAVE_ERROR_PLAYER -11 |
#define | SAVE_ERROR_RCREATION -1 |
#define | SAVE_ERROR_UCREATION -2 |
#define | SAVE_ERROR_URENAME -5 |
#define | SAVE_ERROR_WRITE -3 |
#define | SAVE_FLAG_NO_REMOVE 2 |
#define | SAVE_FLAG_SAVE_UNPAID 1 |
#define | SAVE_MODE_INPLACE 1 |
#define | SAVE_MODE_NORMAL 0 |
#define | SAVE_MODE_OVERLAY 2 |
#define | SET_MAP_FACE_OBJ(M, X, Y, C, L) (map_space(M, X, Y)->faces_obj[L] = C) |
#define | SET_MAP_FLAGS(M, X, Y, C) (map_space(M, X, Y)->flags = C) |
#define | SET_MAP_LIGHT(M, X, Y, L) (map_space(M, X, Y)->light = L) |
#define | SET_MAP_MOVE_BLOCK(M, X, Y, C) (map_space(M, X, Y)->move_block = C) |
#define | SET_MAP_MOVE_OFF(M, X, Y, C) (map_space(M, X, Y)->move_off = C) |
#define | SET_MAP_MOVE_ON(M, X, Y, C) (map_space(M, X, Y)->move_on = C) |
#define | SET_MAP_MOVE_SLOW(M, X, Y, C) (map_space(M, X, Y)->move_slow = C) |
#define | SET_MAP_OB(M, X, Y, tmp) (map_space(M, X, Y)->bottom = (tmp)) |
#define | SET_MAP_PLAYER(M, X, Y, C) (map_space(M, X, Y)->pl = C) |
#define | SET_MAP_TOP(M, X, Y, tmp) (map_space(M, X, Y)->top = (tmp)) |
Functions | |
bool | map_path_unique (const char *name) |
void | map_reset_swap (mapstruct *m) |
uint32_t | map_size (mapstruct *m) |
MapSpace * | map_space (const mapstruct *m, int x, int y) |
Variables | |
const char *const | map_layer_name [MAP_LAYERS] |
This file contains basic map-related structures and macros.
Definition in file map.h.
#define GET_MAP_FACE_OBJ | ( | M, | |
X, | |||
Y, | |||
L | |||
) | (map_space(M, X, Y)->faces_obj[L]) |
#define GET_MAP_FACE_OBJS | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->faces_obj) |
#define GET_MAP_LIGHT | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->light) |
#define GET_MAP_MOVE_BLOCK | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->move_block) |
#define GET_MAP_MOVE_OFF | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->move_off) |
#define GET_MAP_MOVE_ON | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->move_on) |
#define GET_MAP_MOVE_SLOW | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->move_slow) |
#define GET_MAP_OB | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->bottom) |
#define GET_MAP_TOP | ( | M, | |
X, | |||
Y | |||
) | (map_space(M, X, Y)->top) |
#define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
#define MAP_FLUSH 0x1 |
#define MAP_NO_DIFFICULTY 0x4 |
#define MAP_OVERLAY 0x10 |
#define MAP_PLAYER_UNIQUE 0x2 |
#define MAP_SAVING 4 |
Map being saved. Will stop object_remove() from some processing.
#define MAP_STYLE 0x8 |
#define MAP_TYPE_DEFAULT 2 |
#define MAP_TYPE_LEGACY 1 |
#define OUT_OF_REAL_MAP | ( | M, | |
X, | |||
Y | |||
) | ((X) < 0 || (Y) < 0 || (X) >= (M)->width || (Y) >= (M)->height) |
Checks if a square is out of the map. You should really know what you are doing before using this - you should almost always be using out_of_map() instead, which takes into account map tiling.
#define P_NEW_MAP 0x200 |
#define P_NO_ERROR 0x80 |
#define SAVE_ERROR_NOT_IN_MEMORY -10 |
#define SAVE_ERROR_RCREATION -1 |
#define SAVE_ERROR_UCREATION -2 |
#define SAVE_ERROR_URENAME -5 |
#define SAVE_FLAG_NO_REMOVE 2 |
#define SAVE_FLAG_SAVE_UNPAID 1 |
#define SAVE_MODE_INPLACE 1 |
#define SET_MAP_LIGHT | ( | M, | |
X, | |||
Y, | |||
L | |||
) | (map_space(M, X, Y)->light = L) |
#define SET_MAP_OB | ( | M, | |
X, | |||
Y, | |||
tmp | |||
) | (map_space(M, X, Y)->bottom = (tmp)) |
#define SET_MAP_TOP | ( | M, | |
X, | |||
Y, | |||
tmp | |||
) | (map_space(M, X, Y)->top = (tmp)) |
bool map_path_unique | ( | const char * | path | ) |
Return true if the given map path leads to a unique map. This is needed to correctly load a map with the MAP_UNIQUE flag set, because there are some contexts in which only a map path is available.
Definition at line 2683 of file map.cpp.
References python_init::path.
Referenced by cast_create_town_portal(), enter_exit(), and town_portal_destroy_existing().
void map_reset_swap | ( | mapstruct * | m | ) |
Call this when an in-memory map is used or referenced. Helps inform which maps to swap.
Definition at line 1750 of file map.cpp.
References m, and MAP_MINTIMEOUT.
Referenced by draw_client_map(), and ready_map_name().
uint32_t map_size | ( | mapstruct * | m | ) |
Calculate map size without intermediate sign extension.
Definition at line 798 of file map.cpp.
References m.
Referenced by allocate_map(), command_style_map_info(), and malloc_info().
Definition at line 2687 of file map.cpp.
References m, OUT_OF_REAL_MAP, diamondslots::x, and diamondslots::y.
const char* const map_layer_name[MAP_LAYERS] |
These correspond to the layer names in map.h - since some of the types can be on multiple layers, names are duplicated to correspond to that layer.
Definition at line 46 of file map.cpp.
Referenced by get_ob_diff(), and while().