Go to the source code of this file.
Maximum size of view area a server could support.
Definition at line 37 of file mapdata.h.
Referenced by expand_clear_bigface(), expand_clear_bigface_from_layer(), expand_set_bigface(), Map2Cmd(), mapdata_bigface_head(), mapdata_clear_old(), mapdata_clear_space(), mapdata_init(), mapdata_set_anim_layer(), mapdata_set_check_space(), mapdata_set_darkness(), mapdata_set_face_layer(), mapdata_set_smooth(), and recenter_virtual_map_view().
The protocol supports 10 layers, so set MAXLAYERS accordingly.
Definition at line 32 of file mapdata.h.
Referenced by display_mapcell(), expand_clear_bigface(), expand_clear_bigface_from_layer(), expand_clear_face(), expand_clear_face_from_layer(), expand_need_update_from_layer(), expand_set_bigface(), expand_set_face(), Map2Cmd(), mapdata_animation(), mapdata_bigface(), mapdata_bigface_head(), mapdata_clear_old(), mapdata_clear_space(), mapdata_face(), mapdata_init(), mapdata_set_anim_layer(), and mapdata_set_check_space().
sint16 mapdata_bigface |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
layer, |
|
|
int * |
ww, |
|
|
int * |
hh |
|
) |
| |
Returns the face to display at a given location. This function returns the "tail" information, i.e. big faces expanded by the client.
*ww and *hh return the offset of the current tile relative to the head; 0 <= *ww < (width of face), 0 <= *hh < (height of face).
When drawing the map view, this function must be used instead than a direct access to the_map.cells[]. This is because the_map.cells[] eventually still contains obsolete (fog of war) big face information; this function detects and clears such faces.
Definition at line 966 of file mapdata.c.
sint16 mapdata_face |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
layer |
|
) |
| |
Returns the face to display at a given location. This function returns the "head" information, i.e. the face information sent by the server.
Definition at line 955 of file mapdata.c.
void mapdata_init |
( |
void |
| ) |
|
Initializes the module. Allocates memory for the_map. This functions must be called before any other function is used.
Definition at line 514 of file mapdata.c.
int mapdata_is_inside |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Checks whether the given coordinates are within the current display size (as set by mapdata_set_size).
Definition at line 587 of file mapdata.c.
void mapdata_newmap |
( |
void |
| ) |
|
Clears the map view. Must be called whenever a newmap command was received from the server.
Definition at line 935 of file mapdata.c.
void mapdata_reset |
( |
void |
| ) |
|
Resets all stored information.
Definition at line 572 of file mapdata.c.
void mapdata_scroll |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| |
Scrolls the map view. Must be called whenever a map_scroll command was received from the server.
Definition at line 859 of file mapdata.c.
void mapdata_set_size |
( |
int |
viewx, |
|
|
int |
viewy |
|
) |
| |
Sets the current display size. Must be called whenever a new display size was negotiated with the server.
Definition at line 577 of file mapdata.c.