Atrinik Client  4.0
Data Structures | Macros | Typedefs
map.h File Reference

Go to the source code of this file.

Data Structures

struct  _multi_part_tile
 
struct  _multi_part_obj
 
struct  _mapdata
 
struct  MapCell
 
struct  map_target_struct
 
struct  map_anim
 

Macros

#define MAP_TILE_POS_YOFF   23
 
#define MAP_TILE_POS_YOFF2   12
 
#define MAP_TILE_POS_XOFF   48
 
#define MAP_TILE_POS_XOFF2   24
 
#define MAP_TILE_XOFF   12
 
#define MAP_TILE_YOFF   24
 
#define LAYER_SYS   0
 
#define LAYER_FLOOR   1
 
#define LAYER_FMASK   2
 
#define LAYER_ITEM   3
 
#define LAYER_ITEM2   4
 
#define LAYER_WALL   5
 
#define LAYER_LIVING   6
 
#define LAYER_EFFECT   7
 
#define NUM_LAYERS   7
 
#define NUM_SUB_LAYERS   7
 
#define NUM_REAL_LAYERS   (NUM_LAYERS * NUM_SUB_LAYERS)
 
#define GET_MAP_LAYER(_layer, _sub_layer)   (NUM_LAYERS * (_sub_layer) + (_layer) - 1)
 
#define MAP_STARTX   map_width * (MAP_FOW_SIZE / 2)
 
#define MAP_STARTY   map_height * (MAP_FOW_SIZE / 2)
 
#define MAP_WIDTH   map_width
 
#define MAP_HEIGHT   map_height
 
#define MAP_CELL_GET(_x, _y)   (&cells[(_y) * (map_width * MAP_FOW_SIZE) + (_x)])
 
#define MAP_CELL_GET_MIDDLE(_x, _y)
 
#define MAP_NAME_FONT   FONT_SERIF14
 
#define MAP_NAME_FADEOUT   500
 
#define HEIGHT_MAX_RENDER   50
 
#define ANIM_DAMAGE   1
 
#define ANIM_KILL   2
 

Typedefs

typedef struct _multi_part_tile _multi_part_tile
 
typedef struct _multi_part_obj _multi_part_obj
 
typedef struct _mapdata _mapdata
 
typedef struct MapCell MapCell
 
typedef struct map_target_struct map_target_struct
 
typedef struct map_anim map_anim_t
 

Detailed Description

Map header file.

Definition in file map.h.

Macro Definition Documentation

#define HEIGHT_MAX_RENDER   50

Maximum height difference between the rendered tile and the player's tile.

Tiles that are lower/higher than this (relative to the player) will not be rendered.

Only applicable to tiles that are in the Fog of War, or if MapData::height_diff is set.

Definition at line 289 of file map.h.

#define MAP_CELL_GET_MIDDLE (   _x,
  _y 
)
Value:
(&cells[((_y) + map_height * (MAP_FOW_SIZE / 2)) * \
static int map_height
Definition: map.c:51
#define MAP_FOW_SIZE
Definition: config.h:65
static int map_width
Definition: map.c:47
static struct MapCell * cells
Definition: map.c:43

Definition at line 264 of file map.h.

#define MAP_NAME_FADEOUT   500

Time in milliseconds for fade out/in effect of the map name.

Definition at line 278 of file map.h.

#define MAP_NAME_FONT   FONT_SERIF14

Font used for the map name.

Definition at line 275 of file map.h.

#define MAP_TILE_POS_XOFF   48

Map tile position X offset

Definition at line 40 of file map.h.

#define MAP_TILE_POS_XOFF2   24

Map tile position X offset 2

Definition at line 43 of file map.h.

#define MAP_TILE_POS_YOFF   23

Map tile position Y offset

Definition at line 34 of file map.h.

#define MAP_TILE_POS_YOFF2   12

Map tile position Y offset 2

Definition at line 37 of file map.h.

#define MAP_TILE_XOFF   12

Map tile X offset

Definition at line 46 of file map.h.

#define MAP_TILE_YOFF   24

Map tile Y offset

Definition at line 49 of file map.h.

#define NUM_LAYERS   7

The number of object layers.

Definition at line 76 of file map.h.

#define NUM_REAL_LAYERS   (NUM_LAYERS * NUM_SUB_LAYERS)

Effective number of all the visible layers.

Definition at line 84 of file map.h.

#define NUM_SUB_LAYERS   7

Number of sub-layers.

Definition at line 80 of file map.h.

Typedef Documentation

typedef struct _mapdata _mapdata

Map data structure

Table of predefined multi arch objects. mpart_id and mpart_nr in the arches are committed from server to analyze the exact tile position inside a mpart object.

The way of determinate the starting and shift points is explained in the dev/multi_arch folder of the arches, where the multi arch templates & masks are.

Multi part object tile structure

typedef struct map_anim map_anim_t

Map animation structure.

typedef struct MapCell MapCell

Map cell structure.