Crossfire Client, Branches
R11627
|
Go to the source code of this file.
Functions | |
void | addsmooth (uint16 face, uint16 smooth_face) |
int | associate_cache_entry (Cache_Entry *ce, int pixnum) |
void | bind_key (const char *params) |
void | cleanup_connection () |
void | client_pickup (uint32 pickup) |
void | client_tick (uint32 tick) |
void | close_container (item *op) |
void | command_show (const char *params) |
int | create_and_rescale_image_from_data (Cache_Entry *ce, int pixmap_num, uint8 *rgba_data, int width, int height) |
void | display_map_addbelow (long x, long y, long face) |
void | display_map_doneupdate (int redraw, int notice) |
void | display_map_newmap (void) |
void | display_map_startupdate (void) |
int | display_mapscroll (int dx, int dy) |
int | display_willcache (void) |
void | draw_color_info (int colr, const char *buf) |
void | draw_info (const char *str, int color) |
void | draw_magic_map (void) |
void | draw_message_window (int redraw) |
void | draw_prompt (const char *str) |
void | draw_stats (int redraw) |
int | get_info_width (void) |
void | get_map_image_size (int face, uint8 *w, uint8 *h) |
void | image_update_download_status (int start, int end, int total) |
void | menu_clear (void) |
void | MusicCmd (const char *data, int len) |
void | open_container (item *op) |
uint8 * | png_to_data (uint8 *data, int len, uint32 *width, uint32 *height) |
void | resize_map_window (int x, int y) |
void | save_defaults (void) |
void | save_winpos (void) |
void | set_autorepeat (const char *s) |
void | set_scroll (const char *s) |
void | set_show_icon (const char *s) |
void | set_show_weight (const char *s) |
void | set_weight_limit (uint32 wlim) |
void | Sound2Cmd (unsigned char *data, int len) |
void | SoundCmd (unsigned char *data, int len) |
void | unbind_key (const char *params) |
void | x_set_echo (void) |
Referenced from common/commands.c
face | |
smooth_face |
Definition at line 360 of file image.c.
Referenced by SmoothCmd().
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.
void cleanup_connection | ( | void | ) |
Called from disconnect command - that closes the socket - we just need to do the gtk cleanup.
Definition at line 329 of file gx11.c.
Referenced by do_disconnect().
void client_pickup | ( | uint32 | pickup | ) |
We get pickup information from server, update our status.
Definition at line 4524 of file gx11.c.
Referenced by PickupCmd().
void client_tick | ( | uint32 | tick | ) |
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 1342 of file inventory.c.
Referenced by item_actions().
void command_show | ( | const char * | params | ) |
params |
Definition at line 1153 of file inventory.c.
int create_and_rescale_image_from_data | ( | Cache_Entry * | ce, |
int | pixmap_num, | ||
uint8 * | rgba_data, | ||
int | width, | ||
int | height | ||
) |
void display_map_addbelow | ( | long | x, |
long | y, | ||
long | face | ||
) |
void display_map_doneupdate | ( | int | redraw, |
int | notice | ||
) |
Do the map drawing
If redraw is set, force redraw of all tiles.
If notice is set, another call will follow soon.
This is called after the map has been all digested. this should perhaps be removed, and left to being done from from the main event loop.
redraw | If set, force redraw of all tiles. |
notice | If set, another call will follow soon. |
If redraw is set, force redraw of all tiles.
If notice is set, another call will follow soon.
Definition at line 5300 of file gx11.c.
Referenced by 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 5319 of file gx11.c.
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 5428 of file gx11.c.
Referenced by Map2Cmd(), map_scrollCmd(), and MapExtendedCmd().
int display_mapscroll | ( | int | dx, |
int | dy | ||
) |
dx | |
dy |
Definition at line 88 of file map.c.
Referenced by mapdata_scroll().
int display_willcache | ( | void | ) |
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 1851 of file gx11.c.
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 1773 of file gx11.c.
Referenced by admin_callback(), bind_callback(), bind_key(), command_foodbep(), command_show(), command_take(), complete_command(), configure_keys(), do_clienthelp(), do_metaserver(), 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(), 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_command_window(), SetupCmd(), show_keys(), unbind_key(), and unbind_usage().
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 4571 of file gx11.c.
Referenced by do_magicmap(), and MagicMapCmd().
void draw_message_window | ( | int | redraw | ) |
Updates the stats pain - hp, sp, etc labels
redraw |
Definition at line 2458 of file gx11.c.
Referenced by applyconfig(), configure_keys(), load_theme(), parse_key(), parse_key_release(), and StatsCmd().
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 2015 of file gx11.c.
Referenced by load_theme(), read_config_window(), StatsCmd(), and toggle_splitwin().
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 4453 of file gx11.c.
Referenced by print_inventory().
face | |
w | |
h |
Definition at line 459 of file image.c.
Referenced by mapdata_get_image_size().
void image_update_download_status | ( | int | start, |
int | end, | ||
int | total | ||
) |
Draws a status bar showing where we our in terms of downloading all the image data. A few hacks: If start is 1, this is the first batch, so it means we need to create the appropriate status window. If start = end = total, it means were finished, so destroy the gui element.
start | The start value just sent to the server. |
end | |
total | The total number of images. |
Definition at line 419 of file image.c.
Referenced by negotiate_connection().
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 3241 of file gx11.c.
Referenced by do_clearinfo().
void open_container | ( | item * | op | ) |
op |
Definition at line 1334 of file inventory.c.
Referenced by item_actions().
*data | |
len | |
*width | |
*height |
Definition at line 63 of file png.c.
Referenced by display_newpng(), and finish_face_cmd().
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 5324 of file gx11.c.
Referenced by SetupCmd().
void save_defaults | ( | void | ) |
This function saves user settings chosen using the configuration popup dialog.
Definition at line 848 of file config.c.
Referenced by do_savedefaults(), and get_menu_display().
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 4804 of file gx11.c.
Referenced by do_savewinpos().
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 |
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 |
void set_show_icon | ( | const char * | s | ) |
s |
Definition at line 1303 of file inventory.c.
void set_show_weight | ( | const char * | s | ) |
s |
Definition at line 1258 of file inventory.c.
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 1245 of file inventory.c.
Referenced by StatsCmd().