Crossfire Client, Branch
R11627
|
#include <client.h>
#include "clientbmap.h"
#include <item.h>
#include <config.h>
#include <script.h>
#include <p_cmd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "mapdata.h"
#include "x11proto.h"
#include "x11.h"
#include <errno.h>
#include "pixmaps/clear.xbm"
#include "pixmaps/locked.xbm"
#include "pixmaps/applied.xbm"
#include "pixmaps/unpaid.xbm"
#include "pixmaps/damned.xbm"
#include "pixmaps/cursed.xbm"
#include "pixmaps/magic.xbm"
#include "pixmaps/close.xbm"
#include "pixmaps/stipple.111"
#include "pixmaps/stipple.112"
Go to the source code of this file.
Data Structures | |
struct | InfoData |
struct | InfoLine |
struct | itemlist |
Defines | |
#define | CREATEPM(name, data) |
#define | GAME_WIDTH (image_size * use_config[CONFIG_MAPWIDTH] + 5) |
#define | INFOCHARS 50 |
#define | INFOCHARS 50 |
#define | INFOLINES 36 |
#define | INV_WIDTH 300 |
#define | MAX_BARS_MESSAGE 80 |
#define | MAX_INFO_WIDTH 80 |
#define | MAXNAMELENGTH 50 |
#define | ROOT_HEIGHT 522 |
#define | SCROLLBAR_WIDTH 16 /* +2+2 for border on each side */ |
#define | STAT_HEIGHT 140 |
#define | WINDOW_SPACING 3 |
#define | X_PROG_NAME "cfclient" |
#define | XPMGCS 100 |
Typedefs | |
typedef enum inventory_show | inventory_show |
Enumerations | |
enum | { no_icon = 0, locked_icon, applied_icon, unpaid_icon, damned_icon, cursed_icon, magic_icon, close_icon, stipple1_icon, stipple2_icon, max_icons } |
enum | inventory_show { show_all = 0, show_applied = 0x1, show_unapplied = 0x2, show_unpaid = 0x4, show_cursed = 0x8, show_magical = 0x10, show_nonmagical = 0x20, show_locked = 0x40, show_unlocked = 0x80, show_mask = 0xff } |
Functions | |
int | associate_cache_entry (Cache_Entry *ce, int pixnum) |
This functions associates image_data in the cache entry with the specific pixmap number. | |
static void | buttonpress_in_info (XButtonEvent *xbutton) |
static int | buttonpress_in_list (itemlist *l, XButtonEvent *xbutton) |
void | check_x_events (void) |
void | cleanup_connection (void) |
Called from disconnect command - that closes the socket - we just need to do the gtk cleanup. | |
void | close_container (item *op) |
Open and close_container are now no-ops - since these are now drawn inline as treestores, we don't need to update what we are drawing were. | |
void | command_show (const char *params) |
static void | create_status_icons (void) |
static void | delete_ch (void) |
void | display_map_doneupdate (int redraw, int notice) |
If redraw is set, force redraw of all tiles. | |
void | display_map_newmap (void) |
The player has changed maps, so any info we have (for fog of war) is bogus, so clear out all that old info. | |
void | display_map_startupdate (void) |
This isn't used - it is basically a prequel - we know we got a map command from the server, but have digested it all yet. | |
static void | display_mapcell (int ax, int ay) |
int | display_mapscroll (int dx, int dy) |
static void | do_key_press (int repeated) |
static void | draw_all_info (void) |
static void | draw_all_list (itemlist *l) |
static void | draw_all_message (void) |
void | draw_color_info (int colr, const char *buf) |
Display information in color. | |
void | draw_info (const char *str, int color) |
Add text to the informational message windows. | |
static void | draw_info_scrollbar (int redraw) |
static void | draw_list (itemlist *l) |
void | draw_lists (void) |
Redraws inventory and look windows when necessary. | |
void | draw_magic_map (void) |
Draws the magic map - basically, it is just a simple encoding of space X is color C. | |
void | draw_message_window (int redraw) |
Updates the stats pain - hp, sp, etc labels. | |
void | draw_prompt (const char *str) |
Draws a prompt. | |
static void | draw_stat_bar (int bar_pos, int height, int is_alert) |
void | draw_stats (int redraw) |
Draws the stats window. | |
static void | draw_status_icon (itemlist *l, int x, int y, int face) |
void | end_windows (void) |
int | error_handler (Display *dp, XErrorEvent *xe) |
void | event_loop (void) |
event loop iteration stuff | |
static void | gen_draw_face (Drawable where, int face, int x, int y, int sx, int sy) |
static int | get_game_display (void) |
static int | get_info_display (void) |
int | get_info_width (void) |
This is used by the common help system to determine when to wrap. | |
static int | get_inv_display (void) |
static void | get_list_display (itemlist *l, int x, int y, int w, int h, const char *t, const char *s) |
static int | get_look_display (void) |
static int | get_message_display (void) |
char * | get_metaserver (void) |
Constructs the metaserver dialog and handles metaserver selection. | |
static int | get_root_display (char *display_name) |
static int | get_stats_display (void) |
static void | get_window_coord (Window win, int *x, int *y, int *wx, int *wy, unsigned int *w, unsigned int *h) |
int | init_windows (int argc, char **argv) |
void | item_event_container_clearing (item *container) |
void | item_event_item_changed (item *it) |
void | item_event_item_deleting (item *it) |
void | load_defaults (void) |
This function processes the user saved settings file and establishes the configuration of the client. | |
void | magic_map_flash_pos (void) |
Flash the player position on the magic map. | |
int | main (int argc, char *argv[]) |
The client entry point. | |
void | menu_clear (void) |
Clears all the message panels. | |
void | open_container (item *op) |
static void | parse_game_button_press (int button, int x, int y) |
void | redisplay_stats (void) |
void | reset_image_data (void) |
Connecting to different servers, try to clear out any old images. | |
static void | resize_list_info (itemlist *l, int w, int h) |
void | resize_map_window (int x, int y) |
Resize_map_window is a NOOP for the time being - not sure if it will in fact need to do something, since there are scrollbars for the map window now. | |
static void | resize_win_info (int width, int height) |
static void | resize_win_message (int width, int height) |
static void | resize_win_root (XEvent *event) |
void | save_defaults (void) |
This function saves user settings chosen using the configuration popup dialog. | |
void | save_winpos (void) |
Handles saving of the window positions when the Client | Save Window Position menu item is executed. | |
void | set_autorepeat (const char *s) |
A stub function that does nothing. | |
void | set_scroll (const char *s) |
A stub function that does nothing. | |
void | set_show_icon (const char *s) |
void | set_show_weight (const char *s) |
void | set_weight_limit (uint32 wlim) |
No reason to divide by 1000 everytime we do the display, so do it once and store it here. | |
void | set_window_pos (void) |
static int | show_object (item *ip, inventory_show flags) |
static void | update_icons_list (itemlist *l) |
static void | usage (char *progname) |
void | write_ch (char key) |
void | x_set_echo (void) |
static void | xwritedown (const char *txt, int x) |
Variables | |
static unsigned long | background |
Colormap | colormap |
static Pixmap | dark1 |
static Pixmap | dark2 |
static Pixmap | dark3 |
static Window | def_root |
static long | def_screen |
static XColor | discolor [16] |
Display * | display |
static XEvent | event |
static XFontStruct * | font |
static char * | font_name = "8x13" |
static int | FONTHEIGHT = 13 |
static int | FONTWIDTH = 8 |
static unsigned long | foreground |
static int | gargc |
static char ** | gargv |
static GC | gc_blank |
static GC | gc_clear_xpm |
static GC | gc_copy |
static GC | gc_floor |
GC | gc_game |
static GC | gc_message |
static GC | gc_root |
static GC | gc_stats |
static GC | gc_xpm [XPMGCS] |
static GC | gc_xpm_object |
static Pixmap | icon |
static Pixmap | icons [max_icons] |
uint8 | image_size = 24 |
static float | info_ratio = 0 |
InfoData | infodata |
static itemlist | inv_list |
static Stats | last_stats = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} |
static itemlist | look_list |
int | maxfd |
static XSizeHints | messagehint |
int | misses = 0 |
int | newimages = 0 |
int | noautorepeat = FALSE |
static int | old_mapx = 11 |
static int | old_mapy = 11 |
struct PixmapInfo * | pixmaps [MAXPIXMAPNUM] |
const char * | rcsid_x11_x11_c = "$Id: x11.c 9201 2008-06-01 17:32:45Z anmaster $" |
static XSizeHints | roothint |
static char | stats_buff [7][600] |
int | sync_display = 0 |
int | total = 0 |
Window | win_game |
Window | win_message |
Window | win_root |
Window | win_stats |
static Atom | wm_delete_window |
static Pixmap | xpm_masks [XPMGCS] |
static Pixmap | xpm_pixmap |
Referenced by create_status_icons().
#define GAME_WIDTH (image_size * use_config[CONFIG_MAPWIDTH] + 5) |
Definition at line 171 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_message_display(), get_stats_display(), and resize_win_root().
#define INFOCHARS 50 |
Definition at line 267 of file x11.c.
Referenced by get_info_display(), and get_root_display().
#define INFOLINES 36 |
Definition at line 159 of file x11.c.
Referenced by get_info_display().
#define INV_WIDTH 300 |
Definition at line 176 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_inv_display(), get_look_display(), get_message_display(), get_stats_display(), and init_windows().
#define MAX_BARS_MESSAGE 80 |
Definition at line 1356 of file x11.c.
Referenced by draw_all_message(), draw_message_window(), and draw_stat_bar().
#define MAX_INFO_WIDTH 80 |
#define MAXNAMELENGTH 50 |
#define ROOT_HEIGHT 522 |
Definition at line 180 of file x11.c.
Referenced by get_root_display().
#define SCROLLBAR_WIDTH 16 /* +2+2 for border on each side */ |
Definition at line 157 of file x11.c.
Referenced by buttonpress_in_info(), and draw_info_scrollbar().
#define STAT_HEIGHT 140 |
Definition at line 173 of file x11.c.
Referenced by get_game_display(), get_message_display(), get_stats_display(), and resize_win_root().
#define WINDOW_SPACING 3 |
Definition at line 178 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_inv_display(), get_look_display(), get_message_display(), get_stats_display(), and resize_win_root().
#define X_PROG_NAME "cfclient" |
Definition at line 39 of file x11.c.
Referenced by get_game_display(), and get_root_display().
#define XPMGCS 100 |
Definition at line 242 of file x11.c.
Referenced by display_mapcell(), gen_draw_face(), and get_game_display().
typedef enum inventory_show inventory_show |
anonymous enum |
enum inventory_show |
int associate_cache_entry | ( | Cache_Entry * | ce, |
int | pixnum | ||
) |
This functions associates image_data in the cache entry with the specific pixmap number.
Currently, there is no failure condition, but there is the potential that in the future, we want to more closely look at the data and if it isn't valid, return the failure code.
Definition at line 3159 of file x11.c.
References Cache_Entry::image_data, and pixmaps.
Referenced by finish_face_cmd().
static void buttonpress_in_info | ( | XButtonEvent * | xbutton | ) | [static] |
Definition at line 2389 of file x11.c.
References InfoData::bar_length, InfoData::bar_pos, draw_all_info(), FONTHEIGHT, InfoData::has_scrollbar, InfoData::maxdisp, InfoData::numlines, SCROLLBAR_WIDTH, and InfoData::width.
Referenced by check_x_events().
static int buttonpress_in_list | ( | itemlist * | l, |
XButtonEvent * | xbutton | ||
) | [static] |
Definition at line 2444 of file x11.c.
References itemlist::bar_length, client_send_apply(), client_send_examine(), client_send_move(), Player_Struct::count, cpl, draw_info(), draw_list(), itemlist::env, image_size, item_struct::inv, itemlist::item_pos, item_struct::locked, NDI_BLACK, item_struct::next, send_mark_obj(), show_object(), itemlist::show_what, itemlist::size, item_struct::tag, toggle_locked(), and itemlist::width.
Referenced by check_x_events().
void check_x_events | ( | void | ) |
Definition at line 2567 of file x11.c.
References buttonpress_in_info(), buttonpress_in_list(), clear_fire_run(), CONFIG_CACHE, CONFIG_SPLITWIN, cpl, display, display_map_doneupdate(), do_key_press(), draw_all_info(), draw_all_list(), draw_all_message(), draw_lists(), draw_magic_map(), draw_stats(), event, FALSE, Player_Struct::input_state, LOG(), LOG_INFO, magic_map_flash_pos(), Metaserver_Select, monitorChilds(), newimages, noautorepeat, parse_game_button_press(), parse_key_release(), resize_list_info(), resize_win_info(), resize_win_message(), resize_win_root(), Player_Struct::showmagic, TRUE, update_icons_list(), want_config, itemlist::win, win_game, InfoData::win_info, win_message, win_root, win_stats, and wm_delete_window.
Referenced by event_loop(), and get_metaserver().
void cleanup_connection | ( | void | ) |
Called from disconnect command - that closes the socket - we just need to do the gtk cleanup.
Definition at line 3536 of file x11.c.
References cleanup_textmanagers(), and csocket_fd.
Referenced by do_disconnect().
void close_container | ( | item * | op | ) |
Open and close_container are now no-ops - since these are now drawn inline as treestores, we don't need to update what we are drawing were.
and since the activation of a container will cause the list to be redrawn, don't need to worry about making an explicit call here.
op |
Definition at line 1826 of file x11.c.
References Player_Struct::below, client_send_apply(), closebutton, CONFIG_APPLY_CONTAINER, cpl, draw_list(), itemlist::env, FALSE, set_look_list_env(), item_struct::tag, itemlist::title, update_list_labels(), and use_config.
Referenced by item_actions().
void command_show | ( | const char * | params | ) |
params |
Definition at line 3500 of file x11.c.
References itemlist::env, inv_notebook, item_struct::inv_updated, name, show_all, show_applied, show_cursed, show_locked, show_magical, show_mask, show_nonmagical, show_unapplied, show_unlocked, show_unpaid, itemlist::show_what, and TYPE_LISTS.
static void create_status_icons | ( | void | ) | [static] |
Definition at line 1559 of file x11.c.
References applied_icon, close_icon, CREATEPM, cursed_icon, damned_icon, dark1, dark2, dark3, def_root, display, image_size, locked_icon, magic_icon, no_icon, stipple1_icon, stipple2_icon, and unpaid_icon.
Referenced by get_list_display().
static void delete_ch | ( | void | ) | [static] |
Definition at line 552 of file x11.c.
References cpl, InfoData::data, display, FONTHEIGHT, FONTWIDTH, InfoData::gc_info, InfoLine::info, InfoData::infoline, InfoData::infopos, Player_Struct::input_text, InfoData::numlines, and InfoData::win_info.
Referenced by write_ch().
void display_map_doneupdate | ( | int | redraw, |
int | notice | ||
) |
If redraw is set, force redraw of all tiles.
Do the map drawing.
If notice is set, another call will follow soon.
Definition at line 3101 of file x11.c.
References Map::cells, CFG_DM_SDL, CONFIG_DISPLAYMODE, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, cpl, display, display_mapcell(), gc_floor, gtk_draw_map(), magic_map_flash_pos(), MapCell::need_update, pl_pos, redraw_needed, sdl_gen_map(), Player_Struct::showmagic, the_map, TRUE, updatelock, use_config, PlayerPosition::x, and PlayerPosition::y.
Referenced by check_x_events(), configure_event(), do_key_press(), do_timeout(), expose_event(), main(), Map2Cmd(), map_scrollCmd(), MapExtendedCmd(), and toggle_splitwin().
void display_map_newmap | ( | void | ) |
The player has changed maps, so any info we have (for fog of war) is bogus, so clear out all that old info.
Definition at line 2986 of file x11.c.
References reset_map().
Referenced by mapdata_newmap().
void display_map_startupdate | ( | void | ) |
This isn't used - it is basically a prequel - we know we got a map command from the server, but have digested it all yet.
This can be useful if there is info we know we need to store away or the like before it is destroyed, but there isn't anything like that for the gtk client.
Definition at line 3175 of file x11.c.
Referenced by Map2Cmd(), map_scrollCmd(), and MapExtendedCmd().
static void display_mapcell | ( | int | ax, |
int | ay | ||
) | [static] |
Definition at line 2994 of file x11.c.
References Map::cells, MapCell::cleared, CONFIG_DARKNESS, CONFIG_FOGWAR, dark1, dark2, dark3, MapCell::darkness, discolor, display, gc_blank, gc_clear_xpm, gc_game, gc_xpm, gen_draw_face(), MapCell::have_darkness, PixmapInfo::height, image_size, mapdata_bigface(), mapdata_face(), MAXLAYERS, pl_pos, the_map, use_config, PixmapInfo::width, win_game, PlayerPosition::x, xpm_masks, xpm_pixmap, XPMGCS, and PlayerPosition::y.
Referenced by display_map_doneupdate().
int display_mapscroll | ( | int | dx, |
int | dy | ||
) |
dx | |
dy |
Definition at line 3128 of file x11.c.
References CFG_DM_SDL, CONFIG_DISPLAYMODE, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, display, gc_copy, image_size, sdl_mapscroll(), use_config, and win_game.
Referenced by mapdata_scroll().
static void do_key_press | ( | int | repeated | ) | [static] |
Definition at line 2313 of file x11.c.
References Command_Mode, Configure_Keys, configure_keys(), cpl, display_map_doneupdate(), event, extended_command(), FALSE, Player_Struct::input_state, Player_Struct::input_text, Metaserver_Select, Player_Struct::no_echo, parse_key(), Playing, Reply_Many, Reply_One, send_reply(), Player_Struct::showmagic, text, TRUE, and write_ch().
Referenced by check_x_events().
static void draw_all_info | ( | void | ) | [static] |
Definition at line 936 of file x11.c.
References InfoData::bar_pos, InfoLine::color, InfoData::data, discolor, display, draw_info_scrollbar(), FONTHEIGHT, FONTWIDTH, InfoData::gc_info, InfoLine::info, InfoData::infoline, InfoData::infopos, InfoData::lastcolor, InfoData::maxdisp, InfoData::maxlines, InfoData::numlines, InfoData::scroll_info_window, TRUE, and InfoData::win_info.
Referenced by buttonpress_in_info(), check_x_events(), resize_win_info(), and set_scroll().
static void draw_all_list | ( | itemlist * | l | ) | [static] |
Definition at line 1780 of file x11.c.
References itemlist::bar_length, itemlist::bar_size, copy_name, display, draw_list(), itemlist::faces, itemlist::gc_text, itemlist::icon1, itemlist::icon2, itemlist::icon3, itemlist::icon4, itemlist::item_pos, itemlist::item_used, itemlist::names, itemlist::old_title, itemlist::size, itemlist::width, and itemlist::win.
Referenced by check_x_events(), and resize_list_info().
static void draw_all_message | ( | void | ) | [static] |
Definition at line 1504 of file x11.c.
References display, draw_message_window(), itemlist::gc_text, MAX_BARS_MESSAGE, win_message, and xwritedown().
Referenced by check_x_events().
void draw_color_info | ( | int | colr, |
const char * | buf | ||
) |
Display information in color.
This function simply calls draw_info() with the parameter order swapped, and it provides no unique features. Since it is called from common, it is likely a legacy function that should probably be considered deprecated. Important: This function calls draw_info(), so if a color other than black is specified, the text is routed to both the primary and secondary (critical) message panes.
colr | The color to use when displaying text. |
buf | The text to display. |
Definition at line 925 of file x11.c.
References draw_info().
Referenced by DrawInfoCmd().
void draw_info | ( | const char * | str, |
int | color | ||
) |
Add text to the informational message windows.
Colored text implies some level of importance, and results in the messge being auto-routed to the critical message panel. Note that with the textbufs, it seems you need to manually set it to the bottom of the screen - otherwise, the scrollbar just stays at the top. However, this does not seem ideal if you are trying to scroll back while new stuff comes in. Question: Is there a good reason for draw_info() and draw_color_info() to write directly to the message panel when add_to_textbuf() does this? Does it really make sense to use color to determine if a message is critical?.
str | Pointer to displayable text. |
color | Color of the text. |
Definition at line 750 of file x11.c.
References InfoData::bar_pos, InfoLine::color, Command_Mode, CONFIG_SPLITINFO, CONFIG_TIMESTAMP, CONFIG_TRIMINFO, cpl, InfoData::data, discolor, display, draw_info(), draw_info_freeze1, draw_info_freeze2, draw_info_scrollbar(), FALSE, FONTHEIGHT, FONTWIDTH, InfoData::gc_info, gtkwin_info_text, gtkwin_info_text2, InfoData::has_scrollbar, InfoLine::info, info1_max_chars, info1_num_chars, info2_max_chars, info2_num_chars, InfoData::info_chars, InfoData::infoline, InfoData::infopos, Player_Struct::input_state, Player_Struct::input_text, last_str, InfoData::lastcolor, LOG(), LOG_INFO, InfoData::maxdisp, InfoData::maxlines, MIN, NDI_BLACK, NDI_GREY, NDI_WHITE, InfoData::numlines, Reply_Many, root_color, InfoData::scroll_info_window, TRUE, use_config, and InfoData::win_info.
Referenced by admin_callback(), bind_callback(), bind_key(), buttonpress_in_list(), command_foodbep(), command_show(), command_take(), complete_command(), configure_keys(), do_clienthelp(), do_metaserver(), draw_color_info(), draw_info(), draw_magic_map(), draw_prompt(), DrawInfoCmd(), get_image_info(), handle_local_command(), handle_query(), image_update_download_status(), init_common_cache_data(), keybinding_get_data(), list_button_event(), list_item_action(), load_window_positions(), menu_clear(), metaserver1_thread(), metaserver_select(), metaserver_show(), negotiate_connection(), new_menu_pickup(), parse_key(), parse_key_release(), print_inventory(), save_defaults(), save_keys(), save_winpos(), script_init(), script_kill(), script_list(), script_process_cmd(), script_tell(), set_autorepeat(), set_command_window(), set_scroll(), SetupCmd(), show_keys(), unbind_key(), unbind_usage(), and write_ch().
static void draw_info_scrollbar | ( | int | redraw | ) | [static] |
Definition at line 702 of file x11.c.
References InfoData::bar_length, InfoData::bar_pos, InfoData::bar_size, InfoData::bar_y, discolor, display, InfoData::gc_info, InfoData::has_scrollbar, InfoData::height, InfoData::lastcolor, InfoData::maxdisp, NDI_BLACK, InfoData::numlines, SCROLLBAR_WIDTH, InfoData::width, and InfoData::win_info.
Referenced by draw_all_info(), and draw_info().
Definition at line 1634 of file x11.c.
References item_struct::applied, applied_icon, itemlist::bar_length, itemlist::bar_pos, itemlist::bar_size, close_icon, copy_name, item_struct::cursed, cursed_icon, item_struct::d_name, item_struct::damned, damned_icon, display, draw_status_icon(), itemlist::env, item_struct::face, itemlist::faces, item_struct::flags, itemlist::format_n, itemlist::format_nw, itemlist::format_nwl, itemlist::gc_status, itemlist::gc_text, gen_draw_face(), itemlist::icon1, itemlist::icon2, itemlist::icon3, itemlist::icon4, icons, image_size, item_struct::inv, itemlist::item_pos, itemlist::item_used, item_struct::locked, locked_icon, magic_icon, item_struct::magical, MAX_BUF, itemlist::names, item_struct::next, no_icon, item_struct::nrof, itemlist::old_title, item_struct::open, show_applied, show_cursed, itemlist::show_icon, show_locked, show_magical, show_mask, show_nonmagical, show_object(), show_unapplied, show_unlocked, show_unpaid, itemlist::show_weight, itemlist::show_what, itemlist::size, itemlist::title, item_struct::unpaid, unpaid_icon, item_struct::weight, itemlist::weight_limit, itemlist::width, and itemlist::win.
Referenced by buttonpress_in_list(), close_container(), draw_all_list(), draw_lists(), open_container(), set_show_weight(), and update_icons_list().
void draw_lists | ( | void | ) |
Redraws inventory and look windows when necessary.
Definition at line 1965 of file x11.c.
References Player_Struct::below, Player_Struct::container, cpl, draw_inv(), draw_list(), draw_look_list(), item_struct::env, itemlist::env, inv_notebook, item_struct::inv_updated, and Player_Struct::ob.
Referenced by check_x_events(), close_container(), do_network(), load_theme(), and open_container().
void draw_magic_map | ( | void | ) |
Draws the magic map - basically, it is just a simple encoding of space X is color C.
Definition at line 3186 of file x11.c.
References closebutton, cpl, discolor, display, draw_info(), FACE_COLOR_MASK, FALSE, gc_game, gtkwin_magicmap, LOG(), LOG_WARNING, magic_map_gc, magicgdkpixmap, Player_Struct::magicmap, map_color, mapvbox, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::mmapx, Player_Struct::mmapy, NDI_BLACK, TRUE, and win_game.
Referenced by check_x_events(), do_magicmap(), MagicMapCmd(), and on_drawingarea_magic_map_expose_event().
void draw_message_window | ( | int | redraw | ) |
Updates the stats pain - hp, sp, etc labels.
redraw |
Definition at line 1384 of file x11.c.
References cpl, display, draw_stat_bar(), FALSE, Player_Struct::fire_on, Stat_struct::flags, Stat_struct::food, itemlist::gc_text, Stat_struct::grace, Stat_struct::hp, MAX_BARS_MESSAGE, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, messagehint, NUM_RESISTS, Stat_struct::resist_change, resists, Stat_struct::resists, resists_name, Player_Struct::run_on, SF_FIREON, SF_RUNON, Stat_struct::sp, Player_Struct::stats, updatelock, and win_message.
Referenced by applyconfig(), configure_keys(), draw_all_message(), load_theme(), parse_key(), parse_key_release(), reset_stat_bars(), and StatsCmd().
static void draw_stat_bar | ( | int | bar_pos, |
int | height, | ||
int | is_alert | ||
) | [static] |
Definition at line 1358 of file x11.c.
References discolor, display, foreground, itemlist::gc_text, MAX_BARS_MESSAGE, and win_message.
Referenced by draw_message_window().
void draw_stats | ( | int | redraw | ) |
Draws the stats window.
If redraw is true, it means we need to redraw the entire thing, and not just do an updated
Definition at line 1149 of file x11.c.
References StatWindow::ac, Stat_struct::ac, StatWindow::armor, StatWindow::Cha, Stat_struct::Cha, StatWindow::Con, Stat_struct::Con, CONFIG_FOODBEEP, cpl, StatWindow::dam, Stat_struct::dam, StatWindow::Dex, Stat_struct::Dex, display, Stat_struct::exp, FLOAT_MULTF, StatWindow::food, Stat_struct::food, gc_stats, StatWindow::gr, Stat_struct::grace, StatWindow::hp, Stat_struct::hp, StatWindow::Int, Stat_struct::Int, last_stats, last_used_skills, StatWindow::level, Stat_struct::level, MAX_BUF, MAX_SKILL, Stat_struct::maxgrace, Stat_struct::maxhp, Stat_struct::maxsp, StatWindow::playername, StatWindow::Pow, Stat_struct::Pow, Player_Struct::range, Stat_struct::resists, StatWindow::score, StatWindow::skill, StatWindow::skill_exp, Stat_struct::skill_exp, Stat_struct::skill_level, skill_names, StatWindow::sp, Stat_struct::sp, StatWindow::speed, Stat_struct::speed, Player_Struct::stats, StatWindow::Str, Stat_struct::Str, Player_Struct::title, updatelock, use_config, StatWindow::wc, Stat_struct::wc, Stat_struct::weapon_sp, win_stats, StatWindow::Wis, and Stat_struct::Wis.
Referenced by check_x_events(), load_theme(), read_config_window(), StatsCmd(), and toggle_splitwin().
static void draw_status_icon | ( | itemlist * | l, |
int | x, | ||
int | y, | ||
int | face | ||
) | [static] |
Definition at line 1529 of file x11.c.
References display, itemlist::gc_status, icons, and itemlist::win.
Referenced by draw_list().
void end_windows | ( | void | ) |
Definition at line 402 of file x11.c.
References display, gc_copy, gc_game, itemlist::gc_icon, InfoData::gc_info, gc_message, gc_root, gc_stats, itemlist::gc_status, itemlist::gc_text, gc_xpm_object, and win_game.
int error_handler | ( | Display * | dp, |
XErrorEvent * | xe | ||
) |
Definition at line 286 of file x11.c.
References MAX_BUF.
Referenced by get_root_display().
void event_loop | ( | void | ) |
event loop iteration stuff
Definition at line 300 of file x11.c.
References animate_objects(), check_x_events(), csocket, csocket_fd, do_network(), do_timeout(), DoClient(), ClientSocket::fd, LOG(), LOG_INFO, MAX_TIME, maxfd, script_fdset(), script_process(), and timeout.
static void gen_draw_face | ( | Drawable | where, |
int | face, | ||
int | x, | ||
int | y, | ||
int | sx, | ||
int | sy | ||
) | [static] |
Definition at line 348 of file x11.c.
References display, gc_floor, gc_xpm, image_size, PixmapInfo::mask, mask, MAXPIXMAPNUM, misses, pixmap, total, xpm_masks, and XPMGCS.
Referenced by display_mapcell(), and draw_list().
static int get_game_display | ( | void | ) | [static] |
Definition at line 431 of file x11.c.
References allocate_colors(), background, colormap, CONFIG_SPLITWIN, crossfire_bits, crossfire_height, crossfire_width, def_root, def_screen, discolor, display, foreground, GAME_WIDTH, gargc, gargv, gc_blank, gc_clear_xpm, gc_copy, gc_floor, gc_game, gc_xpm, gc_xpm_object, icon, image_size, INV_WIDTH, STAT_HEIGHT, want_config, win_game, win_root, WINDOW_SPACING, wm_delete_window, X_PROG_NAME, xpm_pixmap, and XPMGCS.
Referenced by init_windows().
static int get_info_display | ( | void | ) | [static] |
Definition at line 502 of file x11.c.
References background, InfoData::bar_length, InfoLine::color, colormap, crossfire_bits, crossfire_height, crossfire_width, InfoData::data, display, font, FONTHEIGHT, FONTWIDTH, foreground, GAME_WIDTH, gargc, gargv, InfoData::gc_info, InfoData::has_scrollbar, InfoData::height, icon, InfoLine::info, InfoData::info_chars, INFOCHARS, INFOLINES, INV_WIDTH, InfoData::max_info_chars, InfoData::maxdisp, InfoData::maxlines, roothint, InfoData::width, InfoData::win_info, win_root, WINDOW_SPACING, and wm_delete_window.
Referenced by init_windows().
int get_info_width | ( | void | ) |
This is used by the common help system to determine when to wrap.
Should be able to get width of window, and divide by character width - however, still not perfect if we are using a variable width font. Actually, gtk can do word wrapping for us, so maybe the real fix is to have it to the word wrapping and just run a sufficiently large value. FIXME: should be better than hardcoded value.
Definition at line 2028 of file x11.c.
References InfoData::info_chars.
Referenced by print_inventory().
static int get_inv_display | ( | void | ) | [static] |
Definition at line 1932 of file x11.c.
References cpl, itemlist::env, get_list_display(), INV_WIDTH, Player_Struct::ob, roothint, show_all, itemlist::show_weight, itemlist::show_what, itemlist::title, itemlist::weight_limit, and WINDOW_SPACING.
static void get_list_display | ( | itemlist * | l, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const char * | t, | ||
const char * | s | ||
) | [static] |
Definition at line 1890 of file x11.c.
References background, colormap, create_status_icons(), crossfire_bits, crossfire_height, crossfire_width, display, itemlist::faces, font, FONTHEIGHT, FONTWIDTH, foreground, gargc, gargv, itemlist::gc_icon, itemlist::gc_status, itemlist::gc_text, icon, image_size, itemlist::names, resize_list_info(), itemlist::win, win_root, and wm_delete_window.
Referenced by get_inv_display(), and get_look_display().
static int get_look_display | ( | void | ) | [static] |
Definition at line 1946 of file x11.c.
References Player_Struct::below, cpl, itemlist::env, get_list_display(), INV_WIDTH, roothint, show_all, itemlist::show_weight, itemlist::show_what, itemlist::title, itemlist::weight_limit, and WINDOW_SPACING.
static int get_message_display | ( | void | ) | [static] |
Definition at line 1318 of file x11.c.
References background, colormap, crossfire_bits, crossfire_height, crossfire_width, display, font, foreground, GAME_WIDTH, gargc, gargv, gc_message, icon, INV_WIDTH, messagehint, roothint, STAT_HEIGHT, win_message, win_root, WINDOW_SPACING, and wm_delete_window.
Referenced by init_windows().
char* get_metaserver | ( | void | ) |
Constructs the metaserver dialog and handles metaserver selection.
Definition at line 2533 of file x11.c.
References check_x_events(), cpl, draw_prompt(), Player_Struct::input_state, Player_Struct::input_text, MAX_BUF, and Metaserver_Select.
Referenced by main().
static int get_root_display | ( | char * | display_name | ) | [static] |
Definition at line 2065 of file x11.c.
References allocate_colors(), background, colormap, CONFIG_ECHO, CONFIG_SPLITWIN, crossfire_bits, crossfire_height, crossfire_width, def_root, def_screen, discolor, display, error_handler(), event, FALSE, font, font_name, FONTHEIGHT, FONTWIDTH, foreground, gargc, gargv, gc_root, icon, INFOCHARS, init_pngx_loader(), InfoData::maxlines, ROOT_HEIGHT, roothint, strdup_local(), sync_display, TRUE, use_config, want_config, win_root, wm_delete_window, and X_PROG_NAME.
Referenced by init_windows().
static int get_stats_display | ( | void | ) | [static] |
Definition at line 1114 of file x11.c.
References background, colormap, crossfire_bits, crossfire_height, crossfire_width, display, font, foreground, GAME_WIDTH, gargc, gargv, gc_stats, icon, INV_WIDTH, STAT_HEIGHT, win_root, win_stats, WINDOW_SPACING, and wm_delete_window.
Referenced by init_windows().
static void get_window_coord | ( | Window | win, |
int * | x, | ||
int * | y, | ||
int * | wx, | ||
int * | wy, | ||
unsigned int * | w, | ||
unsigned int * | h | ||
) | [static] |
int init_windows | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 2780 of file x11.c.
References CFG_DM_PIXMAP, CFG_DM_SDL, CONFIG_CACHE, CONFIG_DARKNESS, CONFIG_DISPLAYMODE, CONFIG_DOWNLOAD, CONFIG_ECHO, CONFIG_FASTTCP, CONFIG_FOGWAR, CONFIG_ICONSCALE, CONFIG_MAPHEIGHT, CONFIG_MAPSCALE, CONFIG_MAPSCROLL, CONFIG_MAPWIDTH, CONFIG_NUMS, CONFIG_POPUPS, CONFIG_PORT, CONFIG_RESISTS, CONFIG_SHOWICON, CONFIG_SMOOTH, CONFIG_SOUND, CONFIG_SPLASH, CONFIG_SPLITINFO, CONFIG_SPLITWIN, CONFIG_TRIMINFO, DEFAULT_IMAGE_SIZE, destroy_splash(), face_info, FALSE, font_name, FULL_VERSION, gargc, gargv, get_game_display(), get_info_display(), get_inv_display(), get_look_display(), get_message_display(), get_root_display(), get_stats_display(), gtk_checkchilds(), history, image_size, info_ratio, init_cache_data(), init_keys(), inv_list, INV_WIDTH, itemlist_set_show_icon(), load_defaults(), LOG(), LOG_INFO, LOG_WARNING, map_image_half_size, map_image_size, MAP_MAX_SIZE, mapdata_init(), MAX_HISTORY, InfoData::maxlines, MINLOG, noautorepeat, server, set_window_pos(), itemlist::show_icon, sound_server, sync_display, time_map_redraw, TRUE, updatekeycodes, usage(), use_config, VERSION_INFO, want_config, Face_Information_struct::want_faceset, want_skill_exp, and InfoData::width.
Referenced by main().
void item_event_container_clearing | ( | item * | container | ) |
Definition at line 2041 of file x11.c.
References container_clearing_one(), and views.
Referenced by remove_item_inventory().
void item_event_item_changed | ( | item * | it | ) |
Definition at line 2042 of file x11.c.
References can_write_spell_on(), item_changed_anim_hook(), item_changed_one(), spellinventory, and views.
Referenced by set_item_values().
void item_event_item_deleting | ( | item * | it | ) |
Definition at line 2040 of file x11.c.
References can_write_spell_on(), item_deleting_one(), item_to_widget_remove_item(), spellinventory, and views.
Referenced by remove_item().
void load_defaults | ( | void | ) |
This function processes the user saved settings file and establishes the configuration of the client.
Definition at line 3376 of file x11.c.
References CFG_DM_PIXMAP, CFG_DM_SDL, COMMAND_WINDOW, CONFIG_CACHE, CONFIG_CWINDOW, CONFIG_DARKNESS, CONFIG_DISPLAYMODE, CONFIG_FOODBEEP, CONFIG_ICONSCALE, CONFIG_LIGHTING, CONFIG_MAPHEIGHT, CONFIG_MAPSCALE, CONFIG_MAPWIDTH, config_names, CONFIG_NUMS, CONFIG_POPUPS, CONFIG_PORT, CONFIG_RESISTS, CONFIG_SHOWICON, CONFIG_SOUND, CONFIG_SPLASH, CONFIG_SPLITWIN, DEFAULT_IMAGE_SIZE, face_info, FALSE, font_name, image_size, inv_list, itemlist_set_show_icon(), LOG(), LOG_WARNING, map_image_half_size, map_image_size, MAP_MAX_SIZE, MAX_BUF, InfoData::maxlines, noautorepeat, InfoData::scroll_info_window, server, itemlist::show_icon, sound_server, strdup_local(), TRUE, use_config, want_config, and Face_Information_struct::want_faceset.
void magic_map_flash_pos | ( | void | ) |
Flash the player position on the magic map.
Definition at line 3238 of file x11.c.
References background, cpl, display, foreground, gc_game, gtkwin_magicmap, magic_map_gc, magicgdkpixmap, map_color, mapvbox, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::pmapx, Player_Struct::pmapy, Player_Struct::showmagic, TRUE, and win_game.
Referenced by check_x_events(), display_map_doneupdate(), and do_timeout().
int main | ( | int | argc, |
char * | argv[] | ||
) |
The client entry point.
argc | |
argv |
Definition at line 3539 of file x11.c.
References Player_Struct::below, SockList::buf, CONFIG_POPUPS, CONFIG_PORT, CONFIG_SOUND, cpl, ClientSocket::cs_version, csocket, display_map_doneupdate(), draw_info_windows(), itemlist::env, event_loop(), FALSE, ClientSocket::fd, get_metaserver(), gLogHandler(), gtkLogListener(), ClientSocket::inbuf, init_client_vars(), init_connection(), init_sounds(), init_text_callbacks(), init_windows(), SockList::len, locate_item(), LOG(), LOG_CRITICAL, mapdata_reset(), MAX_BUF, maxfd, MAXSOCKBUF, meta_port, meta_server, metaserver_get_info(), metaserver_select(), metaserver_show(), negotiate_connection(), Player_Struct::ob, remove_item_inventory(), reset_client_vars(), reset_image_data(), server, set_look_list_env(), setLogListener(), TRUE, use_config, and want_config.
void menu_clear | ( | void | ) |
Clears all the message panels.
It is not clear why someone would use it, but is called from the common area, and so is supported here.
Definition at line 2033 of file x11.c.
References draw_info(), gtkwin_info_text, gtkwin_info_text2, and NDI_BLACK.
Referenced by do_clearinfo(), and get_menu_display().
void open_container | ( | item * | op | ) |
op |
Definition at line 1819 of file x11.c.
References closebutton, item_struct::d_name, draw_list(), itemlist::env, set_look_list_env(), itemlist::title, TRUE, and update_list_labels().
Referenced by item_actions().
static void parse_game_button_press | ( | int | button, |
int | x, | ||
int | y | ||
) | [static] |
Definition at line 2234 of file x11.c.
References clear_fire(), CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, fire_dir(), image_size, look_at(), move_player(), and use_config.
Referenced by check_x_events().
void redisplay_stats | ( | void | ) |
void reset_image_data | ( | void | ) |
Connecting to different servers, try to clear out any old images.
Try to free the data to prevent memory leaks. This could be more clever, ie, if we're caching images and go to a new server and get a name, we should try to re-arrange our cache or the like.
Definition at line 3261 of file x11.c.
References Player_Struct::below, CONFIG_CACHE, cpl, display, itemlist::env, free_pixmap(), mask, MAXPIXMAPNUM, pixmap, pixmaps, reset_image_cache_data(), and want_config.
Referenced by main().
static void resize_list_info | ( | itemlist * | l, |
int | w, | ||
int | h | ||
) | [static] |
Definition at line 1833 of file x11.c.
References itemlist::bar_length, draw_all_list(), itemlist::faces, FONTHEIGHT, FONTWIDTH, itemlist::format_n, itemlist::format_nw, itemlist::format_nwl, itemlist::height, itemlist::icon1, itemlist::icon2, itemlist::icon3, itemlist::icon4, image_size, NAME_LEN, itemlist::names, itemlist::show_icon, itemlist::size, itemlist::text_len, and itemlist::width.
Referenced by check_x_events(), get_list_display(), and set_show_icon().
void resize_map_window | ( | int | x, |
int | y | ||
) |
Resize_map_window is a NOOP for the time being - not sure if it will in fact need to do something, since there are scrollbars for the map window now.
Note - this is note a window resize request, but rather process the size (in spaces) of the map - is received from server.
Definition at line 3061 of file x11.c.
References bigmap, CFG_DM_SDL, CONFIG_DISPLAYMODE, CONFIG_MAPHEIGHT, CONFIG_MAPWIDTH, CONFIG_SPLITWIN, display, drawingarea, FALSE, game_bar_vpane, gameframe, gtkwin_root, height, image_size, init_SDL(), map_image_size, message_frame, old_mapx, old_mapy, stat_frame, stat_game_vpane, TRUE, use_config, want_config, width, win_game, and win_root.
Referenced by SetupCmd().
static void resize_win_info | ( | int | width, |
int | height | ||
) | [static] |
Definition at line 994 of file x11.c.
References InfoData::bar_length, InfoData::bar_pos, InfoLine::color, InfoData::data, draw_all_info(), FONTHEIGHT, FONTWIDTH, InfoData::has_scrollbar, height, InfoData::height, InfoLine::info, InfoData::info_chars, InfoData::infoline, InfoData::infopos, InfoData::max_info_chars, InfoData::maxdisp, InfoData::maxlines, InfoData::numlines, width, and InfoData::width.
Referenced by check_x_events().
static void resize_win_message | ( | int | width, |
int | height | ||
) | [static] |
Definition at line 989 of file x11.c.
References height, messagehint, and width.
Referenced by check_x_events().
static void resize_win_root | ( | XEvent * | event | ) | [static] |
Definition at line 2170 of file x11.c.
References CONFIG_SPLITWIN, display, GAME_WIDTH, info_ratio, messagehint, STAT_HEIGHT, want_config, width, itemlist::win, win_game, InfoData::win_info, win_message, win_stats, and WINDOW_SPACING.
Referenced by check_x_events().
void save_defaults | ( | void | ) |
This function saves user settings chosen using the configuration popup dialog.
Definition at line 3455 of file x11.c.
References CONFIG_CACHE, CONFIG_CWINDOW, CONFIG_FOODBEEP, config_names, CONFIG_NUMS, CONFIG_PORT, CONFIG_SOUND, CONFIG_SPLITWIN, draw_info(), face_info, font_name, LOG(), LOG_ERROR, make_path_to_file(), MAX_BUF, InfoData::maxlines, NDI_BLUE, noautorepeat, InfoData::scroll_info_window, server, itemlist::show_icon, sound_server, use_config, want_config, and Face_Information_struct::want_faceset.
Referenced by do_savedefaults(), get_menu_display(), on_config_button_save_clicked(), and saveconfig().
void save_winpos | ( | void | ) |
Handles saving of the window positions when the Client | Save Window Position menu item is executed.
All hpaned and vpaned widget settings have the information required, and the code automatically works for Glade XML layouts that follow the glade-2's default widget naming convention.
Definition at line 3299 of file x11.c.
References CONFIG_SPLITINFO, CONFIG_SPLITWIN, draw_info(), game_bar_vpane, get_window_coord(), gtkwin_info, gtkwin_inv, gtkwin_look, gtkwin_message, gtkwin_root, gtkwin_stats, info_vpane, inv_hpane, inv_look_vpane, MAX_BUF, NDI_BLUE, stat_game_vpane, stat_info_hpane, use_config, want_config, itemlist::win, win_game, InfoData::win_info, win_message, and win_stats.
Referenced by do_savewinpos(), get_menu_display(), and on_save_window_position_activate().
void set_autorepeat | ( | const char * | s | ) |
A stub function that does nothing.
These are callbacks used by the common code, but they are not implemented in GTK, either because it makes no sense (set_scroll for example), or because it may not be technically possible to do so if we limit ourselves to proper GTK2 code (Eg, don't mess with the internals of X or platform specific issues)
s |
Definition at line 2021 of file x11.c.
References draw_info(), FALSE, NDI_BLACK, noautorepeat, and TRUE.
void set_scroll | ( | const char * | s | ) |
A stub function that does nothing.
These are callbacks used by the common code, but they are not implemented in GTK, either because it makes no sense (set_scroll for example), or because it may not be technically possible to do so if we limit ourselves to proper GTK2 code (Eg, don't mess with the internals of X or platform specific issues)
s |
Definition at line 2005 of file x11.c.
References draw_all_info(), draw_info(), InfoData::infoline, InfoData::maxdisp, NDI_BLACK, InfoData::numlines, and InfoData::scroll_info_window.
void set_show_icon | ( | const char * | s | ) |
s |
Definition at line 1978 of file x11.c.
References itemlist::height, itemlist_set_show_icon(), resize_list_info(), itemlist::show_icon, and itemlist::width.
void set_show_weight | ( | const char * | s | ) |
s |
Definition at line 1989 of file x11.c.
References draw_list(), inv_viewers, inventory_viewer_set_show_weight(), set_show_weight_inv_one(), itemlist::show_weight, and update_list_labels().
void set_weight_limit | ( | uint32 | wlim | ) |
No reason to divide by 1000 everytime we do the display, so do it once and store it here.
wlim |
Definition at line 2000 of file x11.c.
References update_list_labels(), and itemlist::weight_limit.
Referenced by StatsCmd().
void set_window_pos | ( | void | ) |
Definition at line 3340 of file x11.c.
References CONFIG_SPLITINFO, CONFIG_SPLITWIN, display, game_bar_vpane, gtkwin_info, gtkwin_inv, gtkwin_look, gtkwin_message, gtkwin_root, gtkwin_stats, info_vpane, inv_hpane, inv_look_vpane, LOG(), LOG_ERROR, MAX_BUF, stat_game_vpane, stat_info_hpane, use_config, want_config, itemlist::win, win_game, InfoData::win_info, win_message, and win_stats.
Referenced by create_windows(), and init_windows().
static int show_object | ( | item * | ip, |
inventory_show | flags | ||
) | [static] |
Definition at line 1539 of file x11.c.
References item_struct::applied, item_struct::cursed, item_struct::damned, item_struct::locked, item_struct::magical, show_all, show_applied, show_cursed, show_locked, show_magical, show_nonmagical, show_unapplied, show_unlocked, show_unpaid, and item_struct::unpaid.
Referenced by buttonpress_in_list(), and draw_list().
static void update_icons_list | ( | itemlist * | l | ) | [static] |
Definition at line 1810 of file x11.c.
References draw_list(), itemlist::faces, and itemlist::size.
Referenced by check_x_events().
static void usage | ( | char * | progname | ) | [static] |
Definition at line 2732 of file x11.c.
Referenced by init_windows().
void write_ch | ( | char | key | ) |
Definition at line 585 of file x11.c.
References Command_Mode, complete_command(), cpl, InfoData::data, delete_ch(), discolor, display, draw_info(), FONTHEIGHT, FONTWIDTH, InfoData::gc_info, InfoLine::info, InfoData::info_chars, InfoData::infoline, InfoData::infopos, Player_Struct::input_state, Player_Struct::input_text, InfoData::lastcolor, MAX_BUF, NDI_BLACK, Player_Struct::no_echo, Playing, and InfoData::win_info.
Referenced by do_key_press().
static void xwritedown | ( | const char * | txt, |
int | x | ||
) | [static] |
Definition at line 1349 of file x11.c.
References display, itemlist::gc_text, and win_message.
Referenced by draw_all_message().
unsigned long background [static] |
Definition at line 187 of file x11.c.
Referenced by add_object_to_store(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), magic_map_flash_pos(), and update_spell_information().
Colormap colormap |
Definition at line 190 of file x11.c.
Referenced by create_and_rescale_image_from_data(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), and get_stats_display().
Window def_root [static] |
Definition at line 185 of file x11.c.
Referenced by create_status_icons(), get_game_display(), and get_root_display().
long def_screen [static] |
Definition at line 186 of file x11.c.
Referenced by get_game_display(), and get_root_display().
XColor discolor[16] [static] |
Definition at line 191 of file x11.c.
Referenced by display_mapcell(), draw_all_info(), draw_info(), draw_info_scrollbar(), draw_magic_map(), draw_prompt(), draw_stat_bar(), get_game_display(), get_root_display(), and write_ch().
Display* display |
Definition at line 184 of file x11.c.
Referenced by check_x_events(), complete_command(), create_and_rescale_image_from_data(), create_status_icons(), delete_ch(), display_map_doneupdate(), display_mapcell(), display_mapscroll(), draw_all_info(), draw_all_list(), draw_all_message(), draw_info(), draw_info_scrollbar(), draw_list(), draw_magic_map(), draw_message_window(), draw_prompt(), draw_stat_bar(), draw_stats(), draw_status_icon(), end_windows(), gen_draw_face(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), get_window_coord(), init_cache_data(), init_keys(), magic_map_flash_pos(), parse_keybind_line(), redisplay_stats(), reset_image_data(), resize_map_window(), resize_win_root(), set_window_pos(), write_ch(), and xwritedown().
XEvent event [static] |
Definition at line 193 of file x11.c.
Referenced by check_x_events(), do_key_press(), get_root_display(), and list_selection_func().
XFontStruct* font [static] |
Definition at line 192 of file x11.c.
Referenced by add_object_to_store(), bugdialog(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), message_callback(), and update_spell_information().
char* font_name = "8x13" [static] |
Definition at line 155 of file x11.c.
Referenced by get_root_display(), init_windows(), load_defaults(), and save_defaults().
int FONTHEIGHT = 13 [static] |
Definition at line 162 of file x11.c.
Referenced by buttonpress_in_info(), delete_ch(), draw_all_info(), draw_info(), draw_prompt(), get_info_display(), get_list_display(), get_root_display(), resize_list_info(), resize_win_info(), and write_ch().
int FONTWIDTH = 8 [static] |
Definition at line 161 of file x11.c.
Referenced by delete_ch(), draw_all_info(), draw_info(), draw_prompt(), get_info_display(), get_list_display(), get_root_display(), resize_list_info(), resize_win_info(), and write_ch().
unsigned long foreground [static] |
Definition at line 187 of file x11.c.
Referenced by add_object_to_store(), draw_stat_bar(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), magic_map_flash_pos(), and update_spell_information().
int gargc [static] |
Definition at line 182 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), and init_windows().
char ** gargv [static] |
Definition at line 155 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), and init_windows().
GC gc_blank [static] |
Definition at line 252 of file x11.c.
Referenced by display_mapcell(), and get_game_display().
GC gc_clear_xpm [static] |
Definition at line 252 of file x11.c.
Referenced by display_mapcell(), and get_game_display().
GC gc_copy [static] |
Definition at line 256 of file x11.c.
Referenced by display_mapscroll(), end_windows(), and get_game_display().
GC gc_floor [static] |
Definition at line 252 of file x11.c.
Referenced by display_map_doneupdate(), gen_draw_face(), and get_game_display().
GC gc_game |
Definition at line 255 of file x11.c.
Referenced by display_mapcell(), draw_magic_map(), end_windows(), get_game_display(), init_cache_data(), and magic_map_flash_pos().
GC gc_message [static] |
Definition at line 252 of file x11.c.
Referenced by end_windows(), and get_message_display().
GC gc_root [static] |
Definition at line 252 of file x11.c.
Referenced by end_windows(), and get_root_display().
GC gc_stats [static] |
Definition at line 252 of file x11.c.
Referenced by draw_stats(), end_windows(), get_stats_display(), and redisplay_stats().
Definition at line 252 of file x11.c.
Referenced by display_mapcell(), gen_draw_face(), and get_game_display().
GC gc_xpm_object [static] |
Definition at line 252 of file x11.c.
Referenced by end_windows(), and get_game_display().
Pixmap icon [static] |
Definition at line 251 of file x11.c.
Referenced by get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), and get_stats_display().
Definition at line 249 of file x11.c.
Referenced by draw_list(), and draw_status_icon().
uint8 image_size = 24 |
float info_ratio = 0 [static] |
Definition at line 240 of file x11.c.
Referenced by init_windows(), and resize_win_root().
Stats last_stats = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} [static] |
Definition at line 264 of file x11.c.
Referenced by draw_stats().
int maxfd |
Definition at line 68 of file client.c.
Referenced by do_network(), event_loop(), and main().
XSizeHints messagehint [static] |
Definition at line 194 of file x11.c.
Referenced by draw_message_window(), get_message_display(), resize_win_message(), and resize_win_root().
int newimages = 0 |
Definition at line 342 of file x11.c.
Referenced by check_x_events().
int noautorepeat = FALSE |
Definition at line 153 of file x11.c.
Referenced by check_x_events(), init_windows(), load_defaults(), save_defaults(), and set_autorepeat().
int old_mapx = 11 [static] |
Definition at line 182 of file x11.c.
Referenced by resize_map_window().
int old_mapy = 11 [static] |
Definition at line 182 of file x11.c.
Referenced by resize_map_window().
struct PixmapInfo* pixmaps[MAXPIXMAPNUM] |
const char* rcsid_x11_x11_c = "$Id: x11.c 9201 2008-06-01 17:32:45Z anmaster $" |
XSizeHints roothint [static] |
Definition at line 194 of file x11.c.
Referenced by get_info_display(), get_inv_display(), get_look_display(), get_message_display(), and get_root_display().
char stats_buff[7][600] [static] |
Definition at line 235 of file x11.c.
Referenced by redisplay_stats().
int sync_display = 0 |
Definition at line 2063 of file x11.c.
Referenced by get_root_display(), and init_windows().
Window win_game |
Definition at line 189 of file x11.c.
Referenced by check_x_events(), create_and_rescale_image_from_data(), display_mapcell(), display_mapscroll(), draw_magic_map(), end_windows(), get_game_display(), magic_map_flash_pos(), resize_map_window(), resize_win_root(), save_winpos(), and set_window_pos().
Window win_message |
Definition at line 188 of file x11.c.
Referenced by check_x_events(), draw_all_message(), draw_message_window(), draw_stat_bar(), get_message_display(), resize_win_root(), save_winpos(), set_window_pos(), and xwritedown().
Window win_root |
Definition at line 189 of file x11.c.
Referenced by check_x_events(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), get_stats_display(), init_cache_data(), and resize_map_window().
Window win_stats |
Definition at line 188 of file x11.c.
Referenced by check_x_events(), draw_stats(), get_stats_display(), redisplay_stats(), resize_win_root(), save_winpos(), and set_window_pos().
Atom wm_delete_window [static] |
Definition at line 195 of file x11.c.
Referenced by check_x_events(), get_game_display(), get_info_display(), get_list_display(), get_message_display(), get_root_display(), and get_stats_display().
Definition at line 251 of file x11.c.
Referenced by display_mapcell(), and gen_draw_face().
Pixmap xpm_pixmap [static] |
Definition at line 251 of file x11.c.
Referenced by display_mapcell(), and get_game_display().