Crossfire Client, Trunk
Macros | Functions
Server->Client map command functions.

Macros

#define NUM_LAYERS   (MAP1_LAYERS-1)
 

Functions

int ExtSmooth (unsigned char *data, int len, int x, int y, int layer)
 
void MagicMapCmd (unsigned char *data, int len)
 
void Map2Cmd (unsigned char *data, int len)
 
void map_scrollCmd (char *data, int len)
 
void MapExtendedCmd (unsigned char *data, int len)
 
void NewmapCmd (unsigned char *data, int len)
 

Detailed Description

Macro Definition Documentation

◆ NUM_LAYERS

#define NUM_LAYERS   (MAP1_LAYERS-1)

Definition at line 2074 of file commands.c.

Function Documentation

◆ ExtSmooth()

int ExtSmooth ( unsigned char *  data,
int  len,
int  x,
int  y,
int  layer 
)

Extract smoothing infos from an extendedmapinfo packet part data is located at the beginning of the smooth datas

Parameters
data
len
x
y
layer

Definition at line 2224 of file commands.c.

References GetChar_String(), mapdata_cell(), mapdata_contains(), MapCell::need_resmooth, pl_pos, MapCell::smooth, PlayerPosition::x, and PlayerPosition::y.

Referenced by MapExtendedCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MagicMapCmd()

void MagicMapCmd ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 2324 of file commands.c.

References cpl, draw_magic_map(), LOG(), LOG_WARNING, Player_Struct::magicmap, Player_Struct::mmapx, Player_Struct::mmapy, Player_Struct::pmapx, and Player_Struct::pmapy.

Here is the call graph for this function:

◆ Map2Cmd()

void Map2Cmd ( unsigned char *  data,
int  len 
)

◆ map_scrollCmd()

void map_scrollCmd ( char *  data,
int  len 
)

Scrolls the map on the client by some amount.

Parameters
data
len

Definition at line 2194 of file commands.c.

References display_map_doneupdate(), LOG(), LOG_WARNING, and mapdata_scroll().

Here is the call graph for this function:

◆ MapExtendedCmd()

void MapExtendedCmd ( unsigned char *  data,
int  len 
)

Handle MapExtended command Warning! if you add commands to extended, take care that the 'layer' argument of main loop is the opposite of the layer of the map so if you reference a layer, use NUM_LAYERS-layer.

Parameters
data
len

Definition at line 2262 of file commands.c.

References display_map_doneupdate(), EMI_HASMOREBITS, EMI_NOREDRAW, EMI_SMOOTH, ExtSmooth(), GetChar_String(), GetShort_String(), mapupdatesent, and NUM_LAYERS.

Here is the call graph for this function:

◆ NewmapCmd()

void NewmapCmd ( unsigned char *  data,
int  len 
)
Parameters
data
len

Definition at line 2055 of file commands.c.

References mapdata_newmap().

Here is the call graph for this function: