|
Atrinik Client 2.5
|
#include <global.h>Go to the source code of this file.
Defines | |
| #define | MAP_NAME_FONT FONT_SERIF14 |
| #define | MAX_STRETCH 8 |
| #define | MAX_STRETCH_DIAG 12 |
Functions | |
| void | load_mapdef_dat () |
| void | widget_show_mapname (widgetdata *widget) |
| void | clear_map () |
| void | display_mapscroll (int dx, int dy) |
| void | update_map_name (const char *name) |
| void | update_map_weather (const char *weather) |
| void | init_map_data (int xl, int yl, int px, int py) |
| static int | calc_map_cell_height (int x, int y) |
| void | align_tile_stretch (int x, int y) |
| void | adjust_tile_stretch () |
| void | map_set_data (int x, int y, int layer, sint16 face, uint8 quick_pos, uint8 obj_flags, const char *name, const char *name_color, sint16 height, uint8 probe, sint16 zoom, sint16 align, uint8 draw_double, uint8 alpha, sint16 rotate, uint8 infravision) |
| void | map_clear_cell (int x, int y) |
| void | map_set_darkness (int x, int y, uint8 darkness) |
| static void | draw_map_object (int x, int y, int layer, int player_height_offset) |
| void | map_draw_map () |
| void | map_draw_one (int x, int y, _Sprite *sprite) |
| static void | send_move_path (int tx, int ty) |
| static void | send_target (int tx, int ty) |
| void | widget_map_mevent (widgetdata *widget, SDL_Event *event) |
| static void | menu_map_walk_here (widgetdata *widget, int x, int y) |
| static void | menu_map_talk_to (widgetdata *widget, int x, int y) |
| void | widget_map_render (widgetdata *widget) |
| int | mouse_to_tile_coords (int mx, int my, int *tx, int *ty) |
Variables | |
| static struct Map | the_map |
| static SDL_Surface * | zoomed = NULL |
| _mapdata | MapData |
| static _multi_part_obj | MultiArchs [16] |
| static int | old_map_mouse_x = 0 |
| static int | old_map_mouse_y = 0 |
| static int | right_click_ticks = -1 |
| const char | tile_off [MAP_TILE_YOFF][MAP_TILE_POS_XOFF] |
| void adjust_tile_stretch | ( | ) |
Adjust the tile stretch of a map.
Goes through the whole map and for each coordinate calls align_tile_stretch() in all directions. This is done to fix any inconsistencies, since the map command doesn't send us the whole map all over again, but only new/changes parts.
| void align_tile_stretch | ( | int | x, |
| int | y | ||
| ) |
| static int calc_map_cell_height | ( | int | x, |
| int | y | ||
| ) | [static] |
| void display_mapscroll | ( | int | dx, |
| int | dy | ||
| ) |
| static void draw_map_object | ( | int | x, |
| int | y, | ||
| int | layer, | ||
| int | player_height_offset | ||
| ) | [static] |
| void init_map_data | ( | int | xl, |
| int | yl, | ||
| int | px, | ||
| int | py | ||
| ) |
| void map_clear_cell | ( | int | x, |
| int | y | ||
| ) |
| void map_draw_one | ( | int | x, |
| int | y, | ||
| _Sprite * | sprite | ||
| ) |
| void map_set_darkness | ( | int | x, |
| int | y, | ||
| uint8 | darkness | ||
| ) |
| void map_set_data | ( | int | x, |
| int | y, | ||
| int | layer, | ||
| sint16 | face, | ||
| uint8 | quick_pos, | ||
| uint8 | obj_flags, | ||
| const char * | name, | ||
| const char * | name_color, | ||
| sint16 | height, | ||
| uint8 | probe, | ||
| sint16 | zoom, | ||
| sint16 | align, | ||
| uint8 | draw_double, | ||
| uint8 | alpha, | ||
| sint16 | rotate, | ||
| uint8 | infravision | ||
| ) |
Set data for map cell.
| x | X of the cell. |
| y | Y of the cell. |
| layer | Layer we're doing this for. |
| face | Face to set. |
| quick_pos | Is this a multi-arch? |
| obj_flags | Flags. |
| name | Player's name. |
| name_color | Player's name color. |
| height | Z position of the tile. |
| probe | Target's HP bar. |
| zoom | How much to zoom the face by. |
| align | X align. |
| rotate | Rotation in degrees. |
| infravision | Whether to show the object in red. |
| static void menu_map_talk_to | ( | widgetdata * | widget, |
| int | x, | ||
| int | y | ||
| ) | [static] |
| static void menu_map_walk_here | ( | widgetdata * | widget, |
| int | x, | ||
| int | y | ||
| ) | [static] |
| int mouse_to_tile_coords | ( | int | mx, |
| int | my, | ||
| int * | tx, | ||
| int * | ty | ||
| ) |
Transform mouse coordinates to tile coordinates on map.
Both 'tx' and 'ty' can be NULL, which is useful if you only want to check if the mouse is over a valid map tile.
| mx | Mouse X. | |
| my | Mouse Y. | |
| [out] | tx | Will contain tile X, unless function returns 0. |
| [out] | ty | Will contain tile Y, unless function returns 0. |
| 1 | Successfully transformed mouse coordinates into tile ones. |
| 0 | Failed to transform the coordinates; 'tx' and 'ty' are left untouched. |
| static void send_move_path | ( | int | tx, |
| int | ty | ||
| ) | [static] |
| static void send_target | ( | int | tx, |
| int | ty | ||
| ) | [static] |
| void update_map_name | ( | const char * | name | ) |
| void update_map_weather | ( | const char * | weather | ) |
| void widget_map_mevent | ( | widgetdata * | widget, |
| SDL_Event * | event | ||
| ) |
| void widget_map_render | ( | widgetdata * | widget | ) |
| void widget_show_mapname | ( | widgetdata * | widget | ) |
int old_map_mouse_x = 0 [static] |
int right_click_ticks = -1 [static] |
| const char tile_off[MAP_TILE_YOFF][MAP_TILE_POS_XOFF] |
{
"000000000000000000000022221111111111111111111111",
"000000000000000000002222222211111111111111111111",
"000000000000000000222222222222111111111111111111",
"000000000000000022222222222222221111111111111111",
"000000000000002222222222222222222211111111111111",
"000000000000222222222222222222222222111111111111",
"000000000022222222222222222222222222221111111111",
"000000002222222222222222222222222222222211111111",
"000000222222222222222222222222222222222222111111",
"000022222222222222222222222222222222222222221111",
"002222222222222222222222222222222222222222222211",
"222222222222222222222222222222222222222222222222",
"332222222222222222222222222222222222222222222244",
"333322222222222222222222222222222222222222224444",
"333333222222222222222222222222222222222222444444",
"333333332222222222222222222222222222222244444444",
"333333333322222222222222222222222222224444444444",
"333333333333222222222222222222222222444444444444",
"333333333333332222222222222222222244444444444444",
"333333333333333322222222222222224444444444444444",
"333333333333333333222222222222444444444444444444",
"333333333333333333332222222244444444444444444444",
"333333333333333333333322224444444444444444444444"
}
Tile offsets used in mouse_to_tile_coords().
1.7.4