Crossfire Client, Trunk  R20507
Functions
gtk2proto.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void account_add_character_failure (char *message)
 Handles a failure from the server - pretty basic - just throw up the message and let the user try again. More...
 
void account_creation_failure (char *message)
 Handles a failure from the server - pretty basic - just throw up the message and let the user try again. More...
 
void account_login_failure (char *message)
 Handles a failure from the server - pretty basic - just throw up the message and let the user try again. More...
 
void add_marked_text_to_pane (Info_Pane *pane, const char *message, int type, int subtype, int orig_color)
 This just does the work of taking text (which may have markup) and putting it into the target pane. More...
 
void add_style_to_textbuffer (Info_Pane *pane, GtkStyle *base_style)
 This is like add_tags_to_textbuffer above, but styles can be changed during the run of the client. More...
 
void add_tags_to_textbuffer (Info_Pane *pane, GtkTextBuffer *textbuf)
 Adds the various tags to the next buffer. More...
 
void addsmooth (guint16 face, guint16 smooth_face)
 Referenced from common/commands.c. More...
 
int associate_cache_entry (Cache_Entry *ce, int pixnum)
 This functions associates image_data in the cache entry with the specific pixmap number. More...
 
void bind_key (char *params)
 Implements the "bind" command when entered as a text command. More...
 
void choose_char_window_show ()
 Basic little function - this is used because we make the choose_char_window widget private to this file, but the create_char.c file will need to show this if the user decides to abandon creation of a new character. More...
 
void choose_character_init (void)
 Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd). More...
 
void clear_stat_mapping (void)
 
void client_pickup (guint32 pickup)
 We get pickup information from server, update our status. More...
 
void client_tick (guint32 tick)
 X11 client doesn't care about this. More...
 
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. More...
 
void command_show (const char *params)
 
void config_check ()
 Sanity check values set in want_config and copy them over to use_config when all of them are acceptable. More...
 
void config_init (GtkWidget *window_root)
 
void config_load (void)
 Load settings from the user's configuration file into want_config. More...
 
int create_and_rescale_image_from_data (Cache_Entry *ce, int pixmap_num, guint8 *rgba_data, int width, int height)
 Takes the pixmap to put the data into, as well as the rgba data (ie, already loaded with png_to_data). More...
 
void create_character_window_hide ()
 Basically opposite as above - hide the create character windows - this is called from hide_all_login_windows(), which is called when the client gets an addme success command. More...
 
void create_character_window_show ()
 This function is here so that other files, in particular account.c:on_button_create_character_clicked() can pop up this window. More...
 
void create_new_character_failure (char *message)
 Pop up a dialog window with the error from the server. More...
 
void create_opengl_map_image (guint8 *data, PixmapInfo *pi)
 
void create_opengl_question_mark (void)
 
void default_msgctrl_configuration (void)
 Setup the state of the message control dialog so the configuration matches the default settings built in to the client. More...
 
void display_map_doneupdate (int redraw, int notice)
 This is called after the map has been all digested. More...
 
int display_mapscroll (int dx, int dy)
 
void draw_ext_info (int orig_color, int type, int subtype, const char *message)
 A message processor that accepts messages along with meta information color and type. More...
 
void draw_lists (void)
 Redraws inventory and look windows when necessary. More...
 
void draw_look_list (void)
 Draws the objects beneath the player. More...
 
void draw_magic_map (void)
 
void draw_map (int redraw)
 
void draw_message_window (int redraw)
 Updates the stats pane - hp, sp, etc labels. More...
 
void draw_prompt (const char *str)
 Draws a prompt. More...
 
void draw_stats (int redraw)
 Draws the stats window. More...
 
void drawquarterlightmap_sdl (int tl, int tr, int bl, int br, int width, int height, int startx, int starty, int endx, int endy, int destx, int desty)
 
void error_dialog (char *description, char *information)
 Display an error message dialog. More...
 
void focusoutfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 When the main window looses its focus, act as if all keys have been released. More...
 
void get_map_image_size (int face, guint8 *w, guint8 *h)
 
void get_window_coord (GtkWidget *win, int *x, int *y, int *wx, int *wy, int *w, int *h)
 Gets the coordinates of a specified window. More...
 
void gtk_command_history (int direction)
 Deals with command history. More...
 
void gtk_complete_command (void)
 Executes when the TAB key is pressed while the command input box has focus to give hints on what commands begin with the text already entered to this point. More...
 
void hide_all_login_windows (void)
 Hides all the login related windows. More...
 
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. More...
 
void info_buffer_flush (const int id)
 Handles message buffer flushes, and, as needed, displays the text. More...
 
void info_buffer_init (void)
 Output count/sync message buffer initialization to set all buffers empty. More...
 
void info_buffer_tick (void)
 Output count/sync buffer maintainer adds buffer time and output messages. More...
 
void info_get_styles (void)
 Loads up values from the style file. More...
 
void info_init (GtkWidget *window_root)
 Initialize the information panels in the client. More...
 
void init_create_character_window ()
 Initializes the create character window. More...
 
void init_glx_opengl (GtkWidget *drawingarea)
 
void init_image_cache_data (void)
 Initializes the data for image caching Create question mark to display in each supported rendering mode when an image is not cached. More...
 
void init_menu_items ()
 Initialize menu bar items and connect their signals to their handlers. More...
 
void init_opengl (GtkWidget *drawingarea)
 
void init_SDL (GtkWidget *sdl_window, int just_lightmap)
 
int init_sounds (void)
 
void init_theme ()
 
void inventory_get_styles (void)
 Gets the style information for the inventory windows. More...
 
void inventory_init (GtkWidget *window_root)
 Set up the inventory viewer. More...
 
void inventory_tick (void)
 This is called periodically from main.c - basically a timeout, used to animate the inventory. More...
 
void item_event_container_clearing (item *container)
 
void item_event_item_changed (item *it)
 
void item_event_item_deleting (item *it)
 
gboolean keybinding_selection_func (GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer userdata)
 Called when the user clicks one of the entries in the list of keybindings and places information about it into the input fields on the dialog. More...
 
void keybindings_init (const char *character_name)
 Reads in the keybindings, and initializes special values. More...
 
void keyfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 GTK Callback function used to handle client key press events. More...
 
void keyrelfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
 GTK callback function used to handle client key release events. More...
 
void keys_init (GtkWidget *window_root)
 One-time initialization of windows and signals for the keybindings dialog. More...
 
void load_msgctrl_configuration (void)
 Setup the state of the message control dialog so the configuration matches a previously saved configuration. More...
 
void load_theme (int reload)
 
void load_window_positions (GtkWidget *window_root)
 Resize the client window and its panels using saved window positions. More...
 
void magic_map_flash_pos (void)
 Flash the player's position on the magic map. More...
 
int main (int argc, char *argv[])
 Main client entry point. More...
 
void map_init (GtkWidget *window_root)
 This initializes the stuff we need for the map. More...
 
void menu_clear (void)
 Clears all the message panels. More...
 
void metaserver_show_prompt (void)
 Constructs the metaserver dialog and handles metaserver selection. More...
 
void metaserver_ui_init ()
 Initialize the metaserver user interface. More...
 
void msgctrl_init (GtkWidget *window_root)
 Initialize the message control panel by populating it with descriptions of each message type along with checkboxes that are used to configure the routing and duplicate suppression system. More...
 
void MusicCmd (const char *data, int len)
 Parse the data contained by a music command coming from the server and pass the name along to cfsndserv as a quoted string. More...
 
void my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 This goes with the g_log_set_handler below in main(). More...
 
void on_button_add_character_clicked (GtkButton *button, gpointer user_data)
 User has hit the add character button, so hide this window, show the add character window. More...
 
void on_button_create_account_clicked (GtkButton *button, gpointer user_data)
 User hit the create account button. More...
 
void on_button_create_character_clicked (GtkButton *button, gpointer user_data)
 
void on_button_create_new_char_clicked (GtkButton *button, gpointer user_data)
 User hit the create character button. More...
 
void on_button_do_add_character_clicked (GtkButton *button, gpointer user_data)
 User has hit the add character button. More...
 
void on_button_exit_client_clicked (GtkButton *button, gpointer user_data)
 User hit the exit client button. More...
 
void on_button_go_metaserver_clicked (GtkButton *button, gpointer user_data)
 User hit the go to metaserver button. More...
 
void on_button_login_clicked (GtkButton *button, gpointer user_data)
 User hit the login button - just call do_account_login() More...
 
void on_button_metaserver_quit_pressed (GtkButton *button, gpointer user_data)
 Quits the client application if the quit button is pressed. More...
 
void on_button_new_cancel_clicked (GtkButton *button, gpointer user_data)
 
void on_button_new_char_cancel_clicked (GtkButton *button, gpointer user_data)
 User his hit the cancel button in the new character window, so hide the new character window, show the choose character window. More...
 
void on_button_new_create_account_clicked (GtkButton *button, gpointer user_data)
 User clicked on the create account button. More...
 
void on_button_play_character_clicked (GtkButton *button, gpointer user_data)
 User has hit the play character button. More...
 
void on_button_return_character_select_clicked (GtkButton *button, gpointer user_data)
 User has hit the return to character selection button. More...
 
void on_button_return_login_clicked (GtkButton *button, gpointer user_data)
 User has hit the return to login window, so hide this window, show the account login window. More...
 
void on_config_button_apply_clicked (GtkButton *button, gpointer user_data)
 
void on_config_button_close_clicked (GtkButton *button, gpointer user_data)
 
void on_config_button_save_clicked (GtkButton *button, gpointer user_data)
 
void on_configure_activate (GtkWidget *menuitem, gpointer user_data)
 
gboolean on_drawingarea_magic_map_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 
void on_entry_account_name_activate (GtkEntry *entry, gpointer user_data)
 User hit return in the name entry box. More...
 
void on_entry_account_password_activate (GtkEntry *entry, gpointer user_data)
 
void on_entry_character (GtkEntry *entry, gpointer user_data)
 User has hit return in either name or password box. More...
 
void on_entry_commands_activate (GtkEntry *entry, gpointer user_data)
 Used to process keyboard input whenever the player types commands into the command entry box. More...
 
void on_entry_new_account (GtkEntry *entry, gpointer user_data)
 This handles cases where the user hits return in one of the entry boxes. More...
 
void on_entry_new_character_name (GtkEntry *entry, gpointer user_data)
 User hit return in the new character name box. More...
 
void on_kb_scope_togglebutton_character_toggled (GtkToggleButton *toggle_button, gpointer user_data)
 Called when "This character" is clicked. More...
 
void on_kb_scope_togglebutton_global_toggled (GtkToggleButton *toggle_button, gpointer user_data)
 Called when "All characters" is clicked. More...
 
void on_keybinding_button_bind_clicked (GtkButton *button, gpointer user_data)
 Sets up a new binding when the "Add" button is clicked. More...
 
void on_keybinding_button_clear_clicked (GtkButton *button, gpointer user_data)
 Implements the "Clear Fields" button function on the keybinding dialog. More...
 
void on_keybinding_button_close_clicked (GtkButton *button, gpointer user_data)
 Deactivates the keybinding dialog when the "Close Window" button is clicked. More...
 
void on_keybinding_button_remove_clicked (GtkButton *button, gpointer user_data)
 Implements the "Remove Binding" button function that unbinds the currently selected keybinding. More...
 
void on_keybinding_button_update_clicked (GtkButton *button, gpointer user_data)
 Implements the "Update Binding" button to update the currently selected keybinding to match the currently shown identifiers, key, or command input fields. More...
 
void on_keybinding_checkbutton_any_clicked (GtkCheckButton *cb, gpointer user_data)
 Deactivate the modifier checkboxes if "Any" is selected. More...
 
gboolean on_keybinding_entry_key_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 Respond to a key press in the "Key" input box. More...
 
void on_keybindings_activate (GtkMenuItem *menuitem, gpointer user_data)
 Menubar item to activate keybindings window. More...
 
void on_menu_all_weapons_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_arrows_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_body_armor_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_boots_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_bows_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_cloaks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_containers_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_dont_pickup_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_drinks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_flesh_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_food_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_gloves_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_helmets_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_jewels_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_keys_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_magical_items_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_missile_weapons_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_normal_book_scrolls_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_not_cursed_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_potions_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_10_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_15_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_20_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_25_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_30_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_35_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_40_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_45_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_50_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_5_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_ratio_pickup_off_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_shields_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_skillscrolls_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_spellbooks_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_stop_before_pickup_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_valuables_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_menu_wands_rods_horns_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_metaserver_select_clicked (GtkButton *button, gpointer user_data)
 Establish a connection with the server when pressing the connect button. More...
 
void on_msgctrl_activate (GtkMenuItem *menuitem, gpointer user_data)
 Shows the message control dialog when the menu item is activated. More...
 
void on_msgctrl_button_apply_clicked (GtkButton *button, gpointer user_data)
 When the message control dialog apply button is pressed, the currently displayed settings are applied. More...
 
void on_msgctrl_button_close_clicked (GtkButton *button, gpointer user_data)
 When the message control dialog close button is pressed, the currently displayed settings are applied and the dialog is dismissed. More...
 
void on_msgctrl_button_defaults_clicked (GtkButton *button, gpointer user_data)
 When the message control dialog defaults button is pressed, the default settings built into the client are restored and applied. More...
 
void on_msgctrl_button_load_clicked (GtkButton *button, gpointer user_data)
 When the message control dialog load button is pressed, the settings last saved are restored and applied. More...
 
void on_msgctrl_button_save_clicked (GtkButton *button, gpointer user_data)
 When the message control dialog save button is pressed, the currently shown settings are applied for immediate use and they are saved to disk so the settings persist across client sessions. More...
 
void on_save_window_position_activate (GtkMenuItem *menuitem, gpointer user_data)
 Handles saving of the window positions when the Client | Save Window Position menu item is activated. More...
 
void on_skill_close_clicked (GtkButton *button, gpointer user_data)
 
void on_skill_ready_clicked (GtkButton *button, gpointer user_data)
 
void on_skill_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
void on_skill_use_clicked (GtkButton *button, gpointer user_data)
 
void on_skills_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_spell_cast_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_close_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_invoke_clicked (GtkButton *button, gpointer user_data)
 
void on_spell_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
void on_spell_window_size_allocate (GtkWidget *widget, gpointer user_data)
 Adjust the line wrap width used by the spells dialog Description column text renderer and force redraw of the rows to cause row height adjustment. More...
 
void on_spells_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_treeview_choose_character_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
 
gboolean on_window_delete_event (GtkWidget *window, gpointer *user_data)
 Prevent delete_event closure and/or hiding of account windows. More...
 
void on_window_destroy_event (GtkObject *object, gpointer user_data)
 Handles client shutdown. More...
 
void open_container (item *op)
 
void opengl_free_pixmap (PixmapInfo *pi)
 
void opengl_gen_map (int redraw)
 
void pickup_init (GtkWidget *window_root)
 Maps the menuitem lists into pickup values. More...
 
void play_sound_effect (gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, const char *sound, const char *source)
 
guint8 * png_to_data (guint8 *data, int len, guint32 *width, guint32 *height)
 
void read_msgctrl_configuration (void)
 Reads the state of the message control dialog and applies the settings to the msgctrl_widgets[] state variables that control the message routing and duplicate suppression system. More...
 
guint8 * rescale_rgba_data (guint8 *data, int *width, int *height, int scale)
 Takes png data and scales it accordingly. More...
 
void reset_image_data (void)
 Connecting to different servers, try to clear out any old images. More...
 
void reset_keybinding_status (void)
 Reset the state of the keybinding dialog. More...
 
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. More...
 
cairo_surface_t * rgba_to_cairo_surface (guint8 *data, int width, int height)
 Create a Cairo surface for the given RGBA data. More...
 
GdkPixbuf * rgba_to_gdkpixbuf (guint8 *data, int width, int height)
 Create a GdkPixbuf for the given RGBA data. More...
 
void save_defaults (void)
 This function saves user settings chosen using the configuration popup dialog. More...
 
void save_msgctrl_configuration (void)
 Applies the current state of the checkboxes to the msgctrl_widgets state variables and saves the settings to disk so the configuration persists across client sessions. More...
 
void save_winpos (void)
 Save client window positions to a file unique to each layout. More...
 
void sdl_gen_map (int redraw)
 
int sdl_mapscroll (int dx, int dy)
 
void set_text_tag_from_style (GtkTextTag *tag, GtkStyle *style, GtkStyle *base_style)
 EndOf GTK V2 Message Control System. More...
 
void set_weight_limit (guint32 wlim)
 No reason to divide by 1000 everytime we do the display, so do it once and store it here. More...
 
void Sound2Cmd (unsigned char *data, int len)
 Parse the data contained by a sound2 command coming from the server and handle playing the specified sound. More...
 
void spell_get_styles (void)
 Gets the style information for the inventory windows. More...
 
void start_login (int method)
 Starts the login process. More...
 
void stats_get_styles (void)
 Gets the style information for the stat bars (only portion of the window right now that has custom style support. More...
 
void stats_init (GtkWidget *window_root)
 Associate the XML-defined widgets with pointers by name reference. More...
 
void trigger_skill (GtkTreeIter iter, GtkTreeModel *model, int use_skill)
 This is where we actually do something with the skill. More...
 
void unbind_key (const char *params)
 
void update_character_choose (const char *name, const char *class, const char *race, const char *face, const char *party, const char *map, int level, int faceno)
 This gets data and adds it to the list store. More...
 
void update_keybinding_list (void)
 Update the keybinding dialog to reflect the current state of the keys file. More...
 
void update_login_info (int type)
 This is called from ReplyInfoCmd when it gets a response from news/motd/rules. More...
 
void update_msgctrl_configuration (void)
 Update the state of the message control dialog so the configuration matches the currently selected settings. More...
 
void update_skill_information (void)
 Called whenever the skill window is opened or a stats packet is received. More...
 
void update_spell_information (void)
 When spell information updates, the treeview is cleared and re-populated. More...
 
void update_stat (int stat_no, gint64 max_stat, gint64 current_stat, gint64 statbar_max, gint64 statbar_stat, int can_alert)
 Updates the stat bar and text display as it pertains to a specific stat. More...
 
void x_set_echo (void)
 

Function Documentation

void account_add_character_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again.

This is a response to the 'failure accountaddplayer' command. Calling this account_add_character_failure may be a little bit of a misnomer, but all the other routines in this area refer to character, not player.

Parameters
messageMessage to display. Unlike other messages, the first word of this message should be an integer, which denotes if using the 'force' option would allow the user to override this.

Definition at line 291 of file account.c.

References add_character_to_account(), entry_character_name, entry_character_password, label_add_status, and name.

Here is the call graph for this function:

void account_creation_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again.

Parameters
message

Definition at line 725 of file account.c.

References label_create_account_status.

void account_login_failure ( char *  message)

Handles a failure from the server - pretty basic - just throw up the message and let the user try again.

Parameters
message

Definition at line 910 of file account.c.

References label_account_login_status.

void add_marked_text_to_pane ( Info_Pane pane,
const char *  message,
int  type,
int  subtype,
int  orig_color 
)

This just does the work of taking text (which may have markup) and putting it into the target pane.

This is a lower level than the draw_ext_info() below, as it does not do message routing. This is called from draw_ext_info() below, as well as account.c to update news/motd/rules.

Parameters
panePointer to the pane info to draw info.
messageMessage that is parsed and displayed.
typeType of the message - for default coloring information.
subtypeSubtype of message - used for default coloring information.
orig_colorLegacy color hint not based on type that is used when a theme does not define a style for the message.
Note
Note both type and subtype are the values passed to draw_ext_info().

< Only if we get a [color] tag should we care, otherwise, the type/subtype should dictate color (unless no style set!)

Definition at line 819 of file info.c.

References add_to_textbuf(), CONFIG_TIMESTAMP, draw_ext_info(), FONT_ARCANE, FONT_FIXED, FONT_HAND, FONT_NORMAL, FONT_STRANGE, LOG(), LOG_ERROR, LOG_INFO, usercolorname, and want_config.

Referenced by add_to_textbuf(), draw_ext_info(), on_combobox_starting_map_changed(), and update_login_info().

Here is the call graph for this function:

Here is the caller graph for this function:

void add_style_to_textbuffer ( Info_Pane pane,
GtkStyle *  base_style 
)

This is like add_tags_to_textbuffer above, but styles can be changed during the run of the client.

So this has to be separate to note it it might be a reload.

Parameters
paneMessage panel number to update.
base_styleBase style if retrieved - may be null.

Definition at line 426 of file info.c.

Referenced by init_choose_char_window(), init_create_account_window(), init_create_character_window(), and init_login_window().

Here is the caller graph for this function:

void add_tags_to_textbuffer ( Info_Pane pane,
GtkTextBuffer *  textbuf 
)

Adds the various tags to the next buffer.

If textbuf is non-null, then it also sets the text buffer for that pane to textbuf. This is called right now by info_get_styles() below and from within the account code.

Parameters
paneMessage panel number to add buffer to.
textbufText buffer to apply tags to. It is allowed to be null if info_pane[pane].textbuffer has already been set.

Definition at line 372 of file info.c.

Referenced by init_choose_char_window(), init_create_account_window(), init_create_character_window(), init_login_window(), and set_text_tag_from_style().

Here is the caller graph for this function:

void addsmooth ( guint16  face,
guint16  smooth_face 
)

Referenced from common/commands.c.

Parameters
face
smooth_face

Definition at line 403 of file image.c.

References PixmapInfo::smooth_face.

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.

Returns
0 on success, -1 on failure.

Definition at line 416 of file image.c.

References Cache_Entry::image_data.

Referenced by finish_face_cmd().

Here is the caller graph for this function:

void choose_char_window_show ( )

Basic little function - this is used because we make the choose_char_window widget private to this file, but the create_char.c file will need to show this if the user decides to abandon creation of a new character.

Definition at line 456 of file account.c.

References choose_char_window.

Referenced by on_button_cc_cancel().

Here is the caller graph for this function:

void choose_character_init ( void  )

Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd).

This tells us to wipe any data from the treeview, but also hide any other windows and make the choose_character_window visible.

Definition at line 439 of file account.c.

References add_character_window, character_store, choose_char_window, create_account_window, and login_window.

void clear_stat_mapping ( void  )

Definition at line 771 of file stats.c.

References need_mapping_update.

Referenced by main().

Here is the caller graph for this function:

void client_pickup ( guint32  pickup)

We get pickup information from server, update our status.

Definition at line 630 of file pickup.c.

References no_recurse, num_pickups, pmode, and PU_RATIO.

void client_tick ( guint32  tick)

X11 client doesn't care about this.

Definition at line 156 of file main.c.

References info_buffer_tick(), inventory_tick(), mapdata_animation(), and next_tick.

Here is the call graph for this function:

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.

Parameters
op

Definition at line 573 of file inventory.c.

References draw_lists().

Here is the call graph for this function:

void command_show ( const char *  params)
Parameters
params

Definition at line 589 of file inventory.c.

References draw_ext_info(), inv_notebook, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_ERROR, name, NDI_RED, NUM_INV_LISTS, and num_inv_notebook_pages.

Here is the call graph for this function:

void config_check ( )

Sanity check values set in want_config and copy them over to use_config when all of them are acceptable.

This function should be called after config_load() and parse_args().

Definition at line 311 of file config.c.

References CFG_DM_OPENGL, CFG_DM_PIXMAP, CFG_DM_SDL, CONFIG_CACHE, CONFIG_DARKNESS, CONFIG_DISPLAYMODE, CONFIG_DOWNLOAD, CONFIG_ICONSCALE, CONFIG_LIGHTING, CONFIG_MAPHEIGHT, CONFIG_MAPSCALE, CONFIG_MAPWIDTH, CONFIG_RESISTS, DEFAULT_IMAGE_SIZE, image_size, LOG(), LOG_ERROR, LOG_WARNING, map_image_half_size, map_image_size, MAP_MAX_SIZE, mapdata_init(), use_config, and want_config.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void config_init ( GtkWidget *  window_root)
void config_load ( void  )

Load settings from the user's configuration file into want_config.

Definition at line 395 of file config.c.

References config, config_dir, config_load_legacy(), config_names, CONFIG_NUMS, config_path, face_info, theme, use_config, want_config, Face_Information_struct::want_faceset, and window_xml_file.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int create_and_rescale_image_from_data ( Cache_Entry ce,
int  pixmap_num,
guint8 *  rgba_data,
int  width,
int  height 
)

Takes the pixmap to put the data into, as well as the rgba data (ie, already loaded with png_to_data).

Scales and stores the relevant data into the pixmap structure.

Parameters
cecan be NULL
pixmap_num
rgba_data
width
height
Returns
1 on failure.

Definition at line 261 of file image.c.

References BPP, CFG_DM_OPENGL, CFG_DM_PIXMAP, CFG_DM_SDL, CONFIG_CACHE, CONFIG_DISPLAYMODE, CONFIG_ICONSCALE, CONFIG_MAPSCALE, create_icon_image(), create_map_image(), DEFAULT_IMAGE_SIZE, free_pixmap(), have_new_image, height, PixmapInfo::icon_height, PixmapInfo::icon_image, icon_rescale_factor, PixmapInfo::icon_width, Cache_Entry::image_data, PixmapInfo::map_height, PixmapInfo::map_image, PixmapInfo::map_width, MAX_ICON_SPACES, MAXPIXMAPNUM, rescale_rgba_data(), use_config, and width.

Referenced by display_newpng(), and finish_face_cmd().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_character_window_hide ( )

Basically opposite as above - hide the create character windows - this is called from hide_all_login_windows(), which is called when the client gets an addme success command.

Definition at line 196 of file create_char.c.

References show_window(), and WINDOW_NONE.

Referenced by hide_all_login_windows().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_character_window_show ( )

This function is here so that other files, in particular account.c:on_button_create_character_clicked() can pop up this window.

This function also requests necessary data from server if we don't already have it.

Definition at line 153 of file create_char.c.

References classes, create_character_set_sensitive(), create_character_window, cs_print_string(), csocket, ClientSocket::fd, label_cc_status_update, races, and stat_points.

Referenced by on_button_create_character_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void create_new_character_failure ( char *  message)

Pop up a dialog window with the error from the server.

Since both v1 and v2 character creation are supported, either the new_character_window or the create_character_window may be up, so we can not easily display an in window message - a pop up is probably better, but it will also work no matter what window is up.

Parameters
messagemessage - this comes from the server.

Definition at line 152 of file account.c.

void create_opengl_map_image ( guint8 *  data,
PixmapInfo pi 
)

Referenced by create_map_image().

Here is the caller graph for this function:

void create_opengl_question_mark ( void  )

Referenced by init_image_cache_data().

Here is the caller graph for this function:

void default_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches the default settings built in to the client.

Iterate through each message type. For each, copy the built-in client default to the Message Control dialog state variables. All supported defaults are copied, not just the ones supported by the layout.

Definition at line 1760 of file info.c.

void display_map_doneupdate ( int  redraw,
int  notice 
)

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.

Parameters
redrawIf set, force redraw of all tiles.
noticeIf set, another call will follow soon.

Definition at line 493 of file map.c.

References map_updated.

int display_mapscroll ( int  dx,
int  dy 
)

Definition at line 122 of file map.c.

References CFG_DM_SDL, CONFIG_DISPLAYMODE, sdl_mapscroll(), and use_config.

Here is the call graph for this function:

void draw_ext_info ( int  orig_color,
int  type,
int  subtype,
const char *  message 
)

A message processor that accepts messages along with meta information color and type.

The message type and subtype are analyzed to select font and other text attributes. All gtk-v2 client messages pass through this processor before being output. Before addition of the output buffering feature, this was the message callback function. It is a separate function so that it can be called both by the callback, and but buffer maintenance functions.

Client-sourced messages generally should be passed directly to this handler instead of to the callback. This will save some overhead as the callback implements a system that coalesces duplicate messages - a feature that is not really applicable to most messages that do not come from the server.

Parameters
orig_colorSuggested text color that type/subtype can over-ride.
typeMessage type. See MSG_TYPE definitions in newclient.h.
subtypeMessage subtype. See MSG_TYPE_*_* values in newclient.h.
messageThe message text to display.

< When 0, the type is valid and may be used to pick the panel routing, otherwise the message can only go to the main message pane.

Definition at line 932 of file info.c.

References add_marked_text_to_pane(), info_buffer_t::age, info_buffer_t::count, buffer_control_t::count, COUNT_BUFFER_SIZE, info_buffer, info_buffer_flush(), info_buffer_init(), LOG(), LOG_ERROR, info_buffer_t::message, MESSAGE_BUFFER_COUNT, MESSAGE_BUFFER_SIZE, msgctrl_widgets, NUM_TEXT_VIEWS, info_buffer_t::orig_color, info_buffer_t::subtype, info_buffer_t::type, and want_config.

Referenced by add_marked_text_to_pane(), message_callback(), and save_msgctrl_configuration().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_lists ( void  )

Redraws inventory and look windows when necessary.

Definition at line 1075 of file inventory.c.

References Player_Struct::below, Player_Struct::container, cpl, draw_inv(), draw_look_list(), item_struct::env, inv_notebook, item_struct::inv_updated, and Player_Struct::ob.

Referenced by close_container(), do_network(), load_theme(), open_container(), and redraw().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_look_list ( void  )

Draws the objects beneath the player.

Definition at line 739 of file inventory.c.

References add_object_to_store(), Player_Struct::below, Player_Struct::container, cpl, item_struct::inv, item_struct::next, item_struct::open, store_look, and treeview_look.

Referenced by draw_lists(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_magic_map ( void  )

Definition at line 24 of file magicmap.c.

References cpl, FACE_COLOR_MASK, LOG(), LOG_WARNING, magic_map, MAGIC_MAP_PAGE, Player_Struct::magicmap, map_notebook, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::mmapx, Player_Struct::mmapy, root_color, and Player_Struct::showmagic.

Referenced by on_drawingarea_magic_map_expose_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void draw_map ( int  redraw)

Referenced by redraw().

Here is the caller graph for this function:

void draw_message_window ( int  redraw)
void draw_stats ( int  redraw)
void drawquarterlightmap_sdl ( int  tl,
int  tr,
int  bl,
int  br,
int  width,
int  height,
int  startx,
int  starty,
int  endx,
int  endy,
int  destx,
int  desty 
)
void error_dialog ( char *  error,
char *  message 
)

Display an error message dialog.

The dialog contains a multi-line, bolded heading that includes the client version information, an error description, and information relevant to the error condition.

Definition at line 263 of file main.c.

Referenced by init_login_window(), and init_ui().

Here is the caller graph for this function:

void get_map_image_size ( int  face,
guint8 *  w,
guint8 *  h 
)
Parameters
face
w
h

Definition at line 493 of file image.c.

References PixmapInfo::map_height, map_image_size, PixmapInfo::map_width, and MAXPIXMAPNUM.

void get_window_coord ( GtkWidget *  win,
int *  x,
int *  y,
int *  wx,
int *  wy,
int *  w,
int *  h 
)

Gets the coordinates of a specified window.

Parameters
winPass in a GtkWidget pointer to get its coordinates.
xParent-relative window x coordinate
yParent-relative window y coordinate
wx?
wy?
wWindow width
hWindow height

Definition at line 480 of file main.c.

Referenced by image_update_download_status(), and save_winpos().

Here is the caller graph for this function:

void hide_all_login_windows ( void  )

Hides all the login related windows.

This is needed in case the client loses the connection to the server (either through player going to client/disconnect or network failure). get_metaserver() calls this, as well as AddMeSuccess

Definition at line 102 of file account.c.

References account_password_window, add_character_window, choose_char_window, create_account_window, create_character_window_hide(), has_init, login_window, new_character_window, and treeview_look.

Referenced by on_button_play_character_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
startThe start value just sent to the server.
end
totalThe total number of images.

Definition at line 461 of file image.c.

References get_window_coord(), pbar, pbar_window, and window_root.

Here is the call graph for this function:

void info_get_styles ( void  )

Loads up values from the style file.

Note that the actual name of the style file is set elsewhere.

This function is designed so that it should be possible to call it multiple times - it will release old style data and load up new values. In this way, a user should be able to change styles on the fly and have things work.

Definition at line 516 of file info.c.

Referenced by load_theme().

Here is the caller graph for this function:

void info_init ( GtkWidget *  window_root)

Initialize the information panels in the client.

These panels are the client areas where text is drawn.

Parameters
window_rootPointer to the parent (root) application window.

Definition at line 649 of file info.c.

Referenced by init_ui().

Here is the caller graph for this function:

void init_create_character_window ( )
void init_glx_opengl ( GtkWidget *  drawingarea)
void init_image_cache_data ( void  )

Initializes the data for image caching Create question mark to display in each supported rendering mode when an image is not cached.

When image caching is enabled, if a needed image is not yet in the cache, a question mark image is displayed instead. The image displayed is unique to the display mode. This function creates the image to use when OpenGL mode is in effect.

Definition at line 526 of file image.c.

References CFG_DM_OPENGL, CFG_DM_PIXMAP, CFG_DM_SDL, CONFIG_DISPLAYMODE, create_opengl_question_mark(), PixmapInfo::fog_image, PixmapInfo::icon_height, PixmapInfo::icon_image, PixmapInfo::icon_mask, PixmapInfo::icon_width, init_common_cache_data(), LOG(), LOG_DEBUG, PixmapInfo::map_height, PixmapInfo::map_image, map_image_size, PixmapInfo::map_mask, PixmapInfo::map_width, MAXPIXMAPNUM, PixmapInfo::smooth_face, use_config, and window_root.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_menu_items ( )

Initialize menu bar items and connect their signals to their handlers.

Definition at line 91 of file menubar.c.

References menu_about(), menu_quit_character(), menu_quit_program(), on_configure_activate(), on_disconnect_activate(), on_keybindings_activate(), on_menu_all_weapons_activate(), on_menu_arrows_activate(), on_menu_body_armor_activate(), on_menu_boots_activate(), on_menu_bows_activate(), on_menu_cloaks_activate(), on_menu_containers_activate(), on_menu_dont_pickup_activate(), on_menu_drinks_activate(), on_menu_flesh_activate(), on_menu_food_activate(), on_menu_gloves_activate(), on_menu_helmets_activate(), on_menu_jewels_activate(), on_menu_keys_activate(), on_menu_magical_items_activate(), on_menu_missile_weapons_activate(), on_menu_normal_book_scrolls_activate(), on_menu_not_cursed_activate(), on_menu_potions_activate(), on_menu_ratio_10_activate(), on_menu_ratio_15_activate(), on_menu_ratio_20_activate(), on_menu_ratio_25_activate(), on_menu_ratio_35_activate(), on_menu_ratio_40_activate(), on_menu_ratio_45_activate(), on_menu_ratio_50_activate(), on_menu_ratio_5_activate(), on_menu_ratio_pickup_off_activate(), on_menu_shields_activate(), on_menu_skillscrolls_activate(), on_menu_spellbooks_activate(), on_menu_stop_before_pickup_activate(), on_menu_valuables_activate(), on_menu_wands_rods_horns_activate(), on_msgctrl_activate(), on_save_window_position_activate(), on_skills_activate(), on_spells_activate(), and window_xml.

Referenced by init_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_opengl ( GtkWidget *  drawingarea)

Referenced by map_init().

Here is the caller graph for this function:

void init_SDL ( GtkWidget *  sdl_window,
int  just_lightmap 
)

Referenced by map_init(), and read_config_dialog().

Here is the caller graph for this function:

int init_sounds ( void  )

Definition at line 27 of file sound.c.

References server, and sound_server.

Referenced by main(), and read_config_dialog().

Here is the caller graph for this function:

void init_theme ( )

Definition at line 76 of file config.c.

References config_dir, default_files, MAX_BUF, and ui_name().

Referenced by init_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void inventory_get_styles ( void  )

Gets the style information for the inventory windows.

This is a separate function because if the user changes styles, it can be nice to re-load the configuration. The style for the inventory/look is a bit special. That is because with gtk, styles are widget wide - all rows in the widget would use the same style. We want to adjust the styles based on other attributes.

Definition at line 425 of file inventory.c.

References has_init, inv_styles, LOG(), LOG_INFO, Style_Last, and Style_Names.

Referenced by load_theme().

Here is the call graph for this function:

Here is the caller graph for this function:

void inventory_init ( GtkWidget *  window_root)

Set up the inventory viewer.

Parameters
window_rootThe client main window.

Definition at line 452 of file inventory.c.

References encumbrance_current, encumbrance_max, inv_notebook, inv_table, inv_table_children, INV_TREE, LIST_NUM_COLUMNS, list_row_collapse(), LOG(), LOG_ERROR, MAX_INV_COLUMNS, MAX_INV_ROWS, NUM_INV_LISTS, num_inv_notebook_pages, on_inv_table_expose_event(), on_switch_page(), setup_list_columns(), store_look, Notebook_Info::treestore, Notebook_Info::treeview, treeview_look, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void inventory_tick ( void  )

This is called periodically from main.c - basically a timeout, used to animate the inventory.

Definition at line 1265 of file inventory.c.

References animate_inventory(), and animate_look().

Referenced by client_tick(), and do_timeout().

Here is the call graph for this function:

Here is the caller graph for this function:

void item_event_container_clearing ( item container)

Definition at line 677 of file inventory.c.

void item_event_item_changed ( item it)

Definition at line 680 of file inventory.c.

void item_event_item_deleting ( item it)

Definition at line 674 of file inventory.c.

void load_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches a previously saved configuration.

Definition at line 1579 of file info.c.

Referenced by save_msgctrl_configuration().

Here is the caller graph for this function:

void load_theme ( int  reload)
void load_window_positions ( GtkWidget *  window_root)

Resize the client window and its panels using saved window positions.

Parameters
window_rootThe client's main window.

Definition at line 822 of file config.c.

References config, ui_name(), and window_xml.

Referenced by init_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void magic_map_flash_pos ( void  )

Flash the player's position on the magic map.

Definition at line 77 of file magicmap.c.

References cpl, magic_map, Player_Struct::mapxres, Player_Struct::mapyres, Player_Struct::pmapx, Player_Struct::pmapy, root_color, and Player_Struct::showmagic.

Referenced by do_timeout().

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)
void map_init ( GtkWidget *  window_root)

This initializes the stuff we need for the map.

Parameters
window_rootThe client's main playing window.

Definition at line 75 of file map.c.

References CFG_DM_OPENGL, CFG_DM_SDL, CONFIG_DISPLAYMODE, init_opengl(), init_SDL(), map_button_event(), map_check_resize(), map_drawing_area, map_expose_event(), map_notebook, use_config, and window_xml.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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 1312 of file info.c.

References dialog_xml, and msgctrl_window.

Referenced by message_callback().

Here is the caller graph for this function:

void metaserver_show_prompt ( void  )

Constructs the metaserver dialog and handles metaserver selection.

If the player has a servers.cache file in their .crossfire folder, the cached server list is added to the contents of the metaserver dialog.

Definition at line 198 of file metaserver.c.

References cpl, hide_all_login_windows(), Player_Struct::input_state, Metaserver_Select, metaserver_status, metaserver_window, on_server_entry_changed(), server_fetch(), store_metaserver, and treeview_metaserver.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void metaserver_ui_init ( )
void msgctrl_init ( GtkWidget *  window_root)

Initialize the message control panel by populating it with descriptions of each message type along with checkboxes that are used to configure the routing and duplicate suppression system.

If previously saved settings are found on disk, they are loaded and applied, otherwise the built in client defaults are loaded and applied. This initialization must occur after the info_init() function runs.

Parameters
window_rootThe client main window
Todo:
Panes that are unsupported in the current layout should always have their routing disabled, and should disallow user interaction with the control but this logic is not yet implemented.

Definition at line 1331 of file info.c.

Referenced by init_ui().

Here is the caller graph for this function:

void MusicCmd ( const char *  data,
int  len 
)

Parse the data contained by a music command coming from the server and pass the name along to cfsndserv as a quoted string.

Parameters
dataData provided following the music command from the server that hints what kind of music should play. NONE is an indication that music should stop playing.
lenLength of the string describing the music to play.

Format of the music command received in data:

music {string}

Definition at line 122 of file sound.c.

References CONFIG_SOUND, LOG(), LOG_DEBUG, LOG_ERROR, server, and use_config.

Here is the call graph for this function:

void my_log_handler ( const gchar *  log_domain,
GLogLevelFlags  log_level,
const gchar *  message,
gpointer  user_data 
)

This goes with the g_log_set_handler below in main().

I leave it here since it may be useful - basically, it can prove handy to try and track down error messages like:

file gtklabel.c: line 1845: assertion `GTK_IS_LABEL (label)' failed

In the debugger, you can set a breakpoint in this function, and then see the stacktrace on what is trying to access a widget that isn't set or otherwise having issues.

Definition at line 286 of file main.c.

void on_button_add_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the add character button, so hide this window, show the add character window.

Parameters
button
user_data

Definition at line 522 of file account.c.

References add_character_window, choose_char_window, entry_character_name, and entry_character_password.

Referenced by init_choose_char_window().

Here is the caller graph for this function:

void on_button_create_account_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the create account button.

So we need to hide the login window and bring up the create login window.

Parameters
button
user_data

Definition at line 921 of file account.c.

References create_account_window, entry_new_account_name, entry_new_account_password, entry_new_confirm_password, label_create_account_status, and login_window.

Referenced by init_login_window().

Here is the caller graph for this function:

void on_button_create_character_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 505 of file account.c.

References choose_char_window, create_character_window_show(), entry_new_character_name, new_character_window, and serverloginmethod.

Referenced by init_choose_char_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_create_new_char_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the create character button.

Get data, send to server.

Parameters
button
user_data

Definition at line 193 of file account.c.

References create_new_character().

Referenced by init_new_character_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_do_add_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the add character button.

Let add_character_to_account() do all the work.

Parameters
button
user_data

Definition at line 343 of file account.c.

References add_character_to_account(), entry_character_name, and entry_character_password.

Referenced by init_add_character_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_exit_client_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the exit client button.

Pretty simple in this case.

Parameters
button
user_data

Definition at line 947 of file account.c.

Referenced by init_login_window().

Here is the caller graph for this function:

void on_button_go_metaserver_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the go to metaserver button.

Need to disconnect from The server, and by clearing the csocket_fd, the main loop routine will bring up the metaserver window.

Parameters
button
user_data

Definition at line 938 of file account.c.

References client_disconnect().

Referenced by init_login_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_login_clicked ( GtkButton *  button,
gpointer  user_data 
)

User hit the login button - just call do_account_login()

Parameters
button
user_data

Definition at line 989 of file account.c.

References do_account_login(), entry_account_name, and entry_account_password.

Referenced by init_login_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_metaserver_quit_pressed ( GtkButton *  button,
gpointer  user_data 
)

Quits the client application if the quit button is pressed.

This is also used to quit the client if the button's accelerator is pressed.

Parameters
button
user_data

Definition at line 266 of file metaserver.c.

References on_window_destroy_event().

Referenced by metaserver_ui_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_new_cancel_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 792 of file account.c.

References create_account_window, and login_window.

Referenced by init_create_account_window().

Here is the caller graph for this function:

void on_button_new_char_cancel_clicked ( GtkButton *  button,
gpointer  user_data 
)

User his hit the cancel button in the new character window, so hide the new character window, show the choose character window.

Parameters
button
user_data

Definition at line 214 of file account.c.

References choose_char_window, and new_character_window.

Referenced by init_new_character_window().

Here is the caller graph for this function:

void on_button_new_create_account_clicked ( GtkButton *  button,
gpointer  user_data 
)

User clicked on the create account button.

In this case, we just process the data and call do_account_create();

Parameters
button
user_data

Definition at line 771 of file account.c.

References do_account_create(), entry_new_account_name, entry_new_account_password, entry_new_confirm_password, label_create_account_status, and name.

Referenced by init_create_account_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_play_character_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the play character button.

Grab the selected entry, if there is one.

Parameters
button
user_data

Definition at line 482 of file account.c.

References CHAR_NAME, hide_all_login_windows(), name, play_character(), and treeview_choose_character.

Referenced by init_choose_char_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_button_return_character_select_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the return to character selection button.

Pretty simple - just hide this window, activate the other window.

Parameters
button
user_data

Definition at line 357 of file account.c.

References add_character_window, and choose_char_window.

Referenced by init_add_character_window().

Here is the caller graph for this function:

void on_button_return_login_clicked ( GtkButton *  button,
gpointer  user_data 
)

User has hit the return to login window, so hide this window, show the account login window.

Parameters
button
user_data

Definition at line 537 of file account.c.

References choose_char_window, and login_window.

Referenced by init_choose_char_window().

Here is the caller graph for this function:

void on_config_button_apply_clicked ( GtkButton *  button,
gpointer  user_data 
)
void on_config_button_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
void on_config_button_save_clicked ( GtkButton *  button,
gpointer  user_data 
)
void on_configure_activate ( GtkWidget *  menuitem,
gpointer  user_data 
)

Definition at line 753 of file config.c.

References config_dialog, and setup_config_dialog().

Referenced by init_menu_items(), and metaserver_ui_init().

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean on_drawingarea_magic_map_expose_event ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  user_data 
)

Referenced by init_ui().

Here is the caller graph for this function:

void on_entry_account_name_activate ( GtkEntry *  entry,
gpointer  user_data 
)

User hit return in the name entry box.

Parameters
entry
user_data

Definition at line 999 of file account.c.

References entry_account_password.

Referenced by init_login_window().

Here is the caller graph for this function:

void on_entry_account_password_activate ( GtkEntry *  entry,
gpointer  user_data 
)
void on_entry_character ( GtkEntry *  entry,
gpointer  user_data 
)

User has hit return in either name or password box.

If both boxes have non empty data, process request. Otherwise, either stay in same box if this box is empty, or move to the other box.

Parameters
entryEntry widget which generated this callback.
user_data

Definition at line 371 of file account.c.

References add_character_to_account(), entry_character_name, entry_character_password, and name.

Referenced by init_add_character_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_entry_new_account ( GtkEntry *  entry,
gpointer  user_data 
)

This handles cases where the user hits return in one of the entry boxes.

We use the same callback for all 3 entry boxes, since the processing is basically the same - if there is valid data in all of them, we try to create an account - otherwise, we move to the next box.

Parameters
entryEntry box used to figure out what the next box is.
user_dataNot used.

Definition at line 807 of file account.c.

References do_account_create(), entry_new_account_name, entry_new_account_password, entry_new_confirm_password, and name.

Referenced by init_create_account_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_entry_new_character_name ( GtkEntry *  entry,
gpointer  user_data 
)

User hit return in the new character name box.

Like above, get data and send to server.

Parameters
entry
user_data

Definition at line 203 of file account.c.

References create_new_character().

Referenced by init_new_character_window().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_all_weapons_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 287 of file pickup.c.

References new_menu_pickup(), and PU_ALLWEAPON.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_arrows_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 308 of file pickup.c.

References new_menu_pickup(), and PU_ARROW.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_body_armor_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 135 of file pickup.c.

References new_menu_pickup(), and PU_ARMOUR.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_boots_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 142 of file pickup.c.

References new_menu_pickup(), and PU_BOOTS.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_bows_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 301 of file pickup.c.

References new_menu_pickup(), and PU_BOW.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_cloaks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 149 of file pickup.c.

References new_menu_pickup(), and PU_CLOAK.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_containers_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 269 of file pickup.c.

References new_menu_pickup(), and PU_CONTAINERS.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_dont_pickup_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 117 of file pickup.c.

References new_menu_pickup(), and PU_INHIBIT.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_drinks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 206 of file pickup.c.

References new_menu_pickup(), and PU_DRINK.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_flesh_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 276 of file pickup.c.

References new_menu_pickup(), and PU_FLESH.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_food_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 213 of file pickup.c.

References new_menu_pickup(), and PU_FOOD.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_gloves_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 156 of file pickup.c.

References new_menu_pickup(), and PU_GLOVES.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_helmets_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 163 of file pickup.c.

References new_menu_pickup(), and PU_HELMET.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_jewels_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 262 of file pickup.c.

References new_menu_pickup(), and PU_JEWELS.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_keys_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 220 of file pickup.c.

References new_menu_pickup(), and PU_KEY.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_magical_items_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 227 of file pickup.c.

References new_menu_pickup(), and PU_MAGICAL.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_missile_weapons_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 294 of file pickup.c.

References new_menu_pickup(), and PU_MISSILEWEAPON.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_normal_book_scrolls_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 189 of file pickup.c.

References new_menu_pickup(), and PU_READABLES.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_not_cursed_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 255 of file pickup.c.

References new_menu_pickup(), and PU_NOT_CURSED.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_potions_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 234 of file pickup.c.

References new_menu_pickup(), and PU_POTION.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_10_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 333 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_15_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 340 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_20_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 347 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_25_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 354 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_30_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 361 of file pickup.c.

References new_menu_pickup().

Here is the call graph for this function:

void on_menu_ratio_35_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 368 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_40_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 375 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_45_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 382 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_50_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 389 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_5_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 326 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_ratio_pickup_off_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 319 of file pickup.c.

References new_menu_pickup().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_shields_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 170 of file pickup.c.

References new_menu_pickup(), and PU_SHIELD.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_skillscrolls_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 181 of file pickup.c.

References new_menu_pickup(), and PU_SKILLSCROLL.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_spellbooks_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 197 of file pickup.c.

References new_menu_pickup(), and PU_SPELLBOOK.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_stop_before_pickup_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 124 of file pickup.c.

References new_menu_pickup(), and PU_STOP.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_valuables_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 241 of file pickup.c.

References new_menu_pickup(), and PU_VALUABLES.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_menu_wands_rods_horns_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Definition at line 248 of file pickup.c.

References new_menu_pickup(), and PU_MAGIC_DEVICE.

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_metaserver_select_clicked ( GtkButton *  button,
gpointer  user_data 
)

Establish a connection with the server when pressing the connect button.

Parameters
button
user_data

Definition at line 252 of file metaserver.c.

References metaserver_connect_to(), and metaserver_entry.

Referenced by metaserver_ui_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_msgctrl_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Shows the message control dialog when the menu item is activated.

The settings shown on the dialog when it is activated are the settings currently in use.

Parameters
menuitem
user_data

Definition at line 1896 of file info.c.

Referenced by init_menu_items().

Here is the caller graph for this function:

void on_msgctrl_button_apply_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog apply button is pressed, the currently displayed settings are applied.

The dialog is not dismissed, but remains open for further adjustments to be made.

Parameters
button
user_data

Definition at line 1866 of file info.c.

void on_msgctrl_button_close_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog close button is pressed, the currently displayed settings are applied and the dialog is dismissed.

Parameters
button
user_data

Definition at line 1880 of file info.c.

void on_msgctrl_button_defaults_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog defaults button is pressed, the default settings built into the client are restored and applied.

Parameters
button
user_data

Definition at line 1851 of file info.c.

References read_msgctrl_configuration().

Here is the call graph for this function:

void on_msgctrl_button_load_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog load button is pressed, the settings last saved are restored and applied.

It may be used to "undo" both applied and unapplied setting changes.

Parameters
button
user_data

Definition at line 1837 of file info.c.

References read_msgctrl_configuration().

Here is the call graph for this function:

void on_msgctrl_button_save_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog save button is pressed, the currently shown settings are applied for immediate use and they are saved to disk so the settings persist across client sessions.

Saved settings automatically load and apply when the client is started.

Parameters
button
user_data

Definition at line 1821 of file info.c.

void on_save_window_position_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Handles saving of the window positions when the Client | Save Window Position menu item is activated.

Parameters
menuitem
user_data

Definition at line 808 of file config.c.

References save_winpos().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_skill_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 267 of file skills.c.

References skill_window.

Referenced by on_skills_activate().

Here is the caller graph for this function:

void on_skill_ready_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 238 of file skills.c.

References skill_selection, skill_window, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_skill_treeview_row_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
Parameters
treeview
path
column
user_data

Definition at line 221 of file skills.c.

References skill_window, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_skill_use_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 253 of file skills.c.

References skill_selection, and trigger_skill().

Referenced by on_skills_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_skills_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
Parameters
menuitem
user_data

Definition at line 106 of file skills.c.

References dialog_xml, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, on_skill_close_clicked(), on_skill_ready_clicked(), on_skill_treeview_row_activated(), on_skill_use_clicked(), skill_ready, skill_selection, skill_selection_func(), skill_store, skill_treeview, skill_use, skill_window, and update_skill_information().

Referenced by init_menu_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_cast_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 524 of file spells.c.

References LIST_TAG, LOG(), LOG_ERROR, MAX_BUF, options, send_command(), spell_options, and spell_selection.

Referenced by on_spells_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_close_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 580 of file spells.c.

References spell_window.

Referenced by on_spells_activate().

Here is the caller graph for this function:

void on_spell_invoke_clicked ( GtkButton *  button,
gpointer  user_data 
)
Parameters
button
user_data

Definition at line 552 of file spells.c.

References LIST_TAG, LOG(), LOG_ERROR, MAX_BUF, options, send_command(), spell_options, and spell_selection.

Referenced by on_spells_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_treeview_row_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
Parameters
treeview
path
column
user_data

Definition at line 492 of file spells.c.

References LIST_TAG, LOG(), LOG_ERROR, MAX_BUF, options, and send_command().

Referenced by on_spells_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void on_spell_window_size_allocate ( GtkWidget *  widget,
gpointer  user_data 
)

Adjust the line wrap width used by the spells dialog Description column text renderer and force redraw of the rows to cause row height adjustment.

To compute the new wrap width, the widths of all other columns are subtracted from the width of the spells window to determine the available width for the description column. The remaining space is then configured as the new wrap width. Once the new wrap is computed, mark all the rows changed so that the renderer adjusts the row height to expand or contract to fit the reformatted description.

Parameters
widget
user_data

Definition at line 124 of file spells.c.

References description_renderer, has_init, spell_store, spell_treeview, and width.

Referenced by on_spells_activate().

Here is the caller graph for this function:

void on_spells_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
void on_treeview_choose_character_activated ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
gpointer  user_data 
)
gboolean on_window_delete_event ( GtkWidget *  window,
gpointer *  user_data 
)

Prevent delete_event closure and/or hiding of account windows.

All account system windows ignore delete events and remain visible unless the user clicks an appropriate button.

Parameters
windowPointer to an account window that received a delete_event.
user_dataUnused.

Definition at line 133 of file account.c.

Referenced by init_account_password_window(), init_add_character_window(), init_choose_char_window(), init_create_account_window(), init_login_window(), and init_new_character_window().

Here is the caller graph for this function:

void on_window_destroy_event ( GtkObject *  object,
gpointer  user_data 
)

Handles client shutdown.

Definition at line 165 of file main.c.

References LOG(), and LOG_DEBUG.

Referenced by init_ui(), metaserver_ui_init(), and on_button_metaserver_quit_pressed().

Here is the call graph for this function:

Here is the caller graph for this function:

void open_container ( item op)
Parameters
op

Definition at line 581 of file inventory.c.

References draw_lists().

Here is the call graph for this function:

void opengl_free_pixmap ( PixmapInfo pi)

Referenced by free_pixmap().

Here is the caller graph for this function:

void opengl_gen_map ( int  redraw)

Referenced by draw_map().

Here is the caller graph for this function:

void pickup_init ( GtkWidget *  window_root)

Maps the menuitem lists into pickup values.

In this way, client_pickup knows what values to change.

Parameters
window_root

Definition at line 401 of file pickup.c.

References has_init, LOG(), LOG_ERROR, MAX_PICKUPS, PickupMapping::menuitem, num_pickups, PickupMapping::pickup_mode, PU_ALLWEAPON, PU_ARMOUR, PU_ARROW, PU_BOOTS, PU_BOW, PU_CLOAK, PU_CONTAINERS, PU_DRINK, PU_FLESH, PU_FOOD, PU_GLOVES, PU_HELMET, PU_INHIBIT, PU_JEWELS, PU_KEY, PU_MAGIC_DEVICE, PU_MAGICAL, PU_MISSILEWEAPON, PU_NOT_CURSED, PU_POTION, PU_RATIO, PU_READABLES, PU_SHIELD, PU_SKILLSCROLL, PU_SPELLBOOK, PU_STOP, PU_VALUABLES, and window_xml.

Referenced by init_ui().

Here is the call graph for this function:

Here is the caller graph for this function:

void play_sound_effect ( gint8  x,
gint8  y,
guint8  dir,
guint8  vol,
guint8  type,
const char *  sound,
const char *  source 
)
guint8* png_to_data ( guint8 *  data,
int  len,
guint32 *  width,
guint32 *  height 
)

Definition at line 49 of file png.c.

References data_cp, data_len, data_start, height, LOG(), LOG_CRITICAL, LOG_ERROR, and user_read_data().

Here is the call graph for this function:

void read_msgctrl_configuration ( void  )

Reads the state of the message control dialog and applies the settings to the msgctrl_widgets[] state variables that control the message routing and duplicate suppression system.

Definition at line 1782 of file info.c.

Referenced by on_msgctrl_button_defaults_clicked(), and on_msgctrl_button_load_clicked().

Here is the caller graph for this function:

guint8* rescale_rgba_data ( guint8 *  data,
int *  width,
int *  height,
int  scale 
)

Takes png data and scales it accordingly.

This function is based on pnmscale, but has been modified to support alpha channel - instead of blending the alpha channel, it takes the most opaque value - blending it is not likely to give sane results IMO - for any image that has transparent information, if we blended the alpha, the result would be the edges of that region being partially transparent. This function has also been re-written to use more static data - in the case of the client, it will be called thousands of times, so it doesn't make sense to free the data and then re-allocate it.

For pixels that are fully transparent, the end result after scaling is they will be tranparent black. This is a needed effect for blending to work properly.

This function returns a new pointer to the scaled image data. This is g_malloc'd data, so should be freed at some point to prevent leaks. This function does not modify the data passed to it - the caller is responsible for freeing it if it is no longer needed.

function arguments:

Parameters
*dataPNG data - this is any 4 byte per pixel data, in RGBA format.
*widthSource width modified to contain the new image size.
*heightSource height modified to contain the new image size.
scalePercentage size that new image should be. 100 is a same size image - values larger than 100 will result in zoom, values less than 100 will result in a shrinkage.

Definition at line 235 of file png.c.

References BPP, LOG(), LOG_CRITICAL, MAX_IMAGE_HEIGHT, MAX_IMAGE_WIDTH, RATIO, and width.

Referenced by create_and_rescale_image_from_data().

Here is the call graph for this function:

Here is the caller graph for this function:

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 428 of file image.c.

References CONFIG_CACHE, free_pixmap(), MAXPIXMAPNUM, reset_image_cache_data(), and want_config.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

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 371 of file map.c.

References draw_map(), and map_drawing_area.

Here is the call graph for this function:

cairo_surface_t* rgba_to_cairo_surface ( guint8 *  data,
int  width,
int  height 
)

Create a Cairo surface for the given RGBA data.

Definition at line 443 of file png.c.

References height, and width.

Referenced by create_map_image().

Here is the caller graph for this function:

GdkPixbuf* rgba_to_gdkpixbuf ( guint8 *  data,
int  width,
int  height 
)

Create a GdkPixbuf for the given RGBA data.

Definition at line 417 of file png.c.

References height, and width.

Referenced by create_icon_image().

Here is the caller graph for this function:

void save_defaults ( void  )

This function saves user settings chosen using the configuration popup dialog.

Definition at line 440 of file config.c.

References config, config_names, CONFIG_NUMS, config_path, draw_ext_info(), face_info, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, NDI_RED, theme, want_config, Face_Information_struct::want_faceset, and window_xml_file.

Referenced by on_config_close(), and save_winpos().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_msgctrl_configuration ( void  )

Applies the current state of the checkboxes to the msgctrl_widgets state variables and saves the settings to disk so the configuration persists across client sessions.

Definition at line 1511 of file info.c.

References buffer_control, config_dir, buffer_control_t::count, draw_ext_info(), load_msgctrl_configuration(), LOG(), LOG_DEBUG, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, MSG_TYPE_CLIENT_ERROR, msgctrl_widgets, NDI_BLUE, NDI_RED, NUM_TEXT_VIEWS, buffer_parameter_t::state, and buffer_control_t::timer.

Here is the call graph for this function:

void save_winpos ( void  )

Save client window positions to a file unique to each layout.

Definition at line 767 of file config.c.

References config, draw_ext_info(), get_window_coord(), MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, NDI_BLUE, save_defaults(), ui_name(), window_root, and window_xml.

Referenced by on_save_window_position_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void sdl_gen_map ( int  redraw)

Referenced by draw_map().

Here is the caller graph for this function:

int sdl_mapscroll ( int  dx,
int  dy 
)

Referenced by display_mapscroll().

Here is the caller graph for this function:

void set_text_tag_from_style ( GtkTextTag *  tag,
GtkStyle *  style,
GtkStyle *  base_style 
)

EndOf GTK V2 Message Control System.

Sets attributes in the text tag from a style. Best I can gather, there is no way to take all of the attributes from a style and apply them directly to a text tag, hence this function to do the work. GtkTextTags also know what attributes are set and which are not set - thus, you can apply multiple tags to the same text, and get all of the effects. For styles, that isn't the case - a style contains all of the information. So this function also compares the loaded style from the base style, and only sets the attributes that are different.

Parameters
tagText tag to set values on.
styleStyle name to get values from.
base_styleBase style for the widget to compare against.

Definition at line 334 of file info.c.

References add_tags_to_textbuffer(), Info_Pane::color_tags, Info_Pane::font_tags, max_subtype, MSG_TYPE_LAST, Info_Pane::msg_type_tags, NUM_COLORS, NUM_FONTS, and Info_Pane::textbuffer.

Here is the call graph for this function:

void set_weight_limit ( guint32  wlim)

No reason to divide by 1000 everytime we do the display, so do it once and store it here.

Parameters
wlim

Definition at line 621 of file inventory.c.

References weight_limit.

void Sound2Cmd ( unsigned char *  data,
int  len 
)

Parse the data contained by a sound2 command coming from the server and handle playing the specified sound.

See server doc/Developers/sound for details.

Parameters
dataData provided following the sound2 command from the server.
lenLength of the sound2 command data.

Format of the sound2 command recieved in data:

sound2 {x}{y}{dir}{volume}{type}{len_sound}{sound}{len_source}{source}
        b  b  b    b       b     b          str    b           str

Definition at line 40 of file sound.c.

References CONFIG_SOUND, LOG(), LOG_DEBUG, LOG_WARNING, server, and use_config.

Here is the call graph for this function:

void spell_get_styles ( void  )

Gets the style information for the inventory windows.

This is a separate function because if the user changes styles, it can be nice to re-load the configuration. The style for the inventory/look is a bit special. That is because with gtk, styles are widget wide - all rows in the widget would use the same style. We want to adjust the styles based on other attributes.

Definition at line 66 of file spells.c.

References LOG(), LOG_INFO, spell_styles, Style_Last, and Style_Names.

Referenced by load_theme(), and on_spells_activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void start_login ( int  method)

Starts the login process.

If not already done, gets widgets, sets up callboacks, etc. This is at the end of the file so all the callbacks are defined before this function - in that way, we do not need forward declarations. This is called from SetupCmd in common/commands.c

Parameters
methodLogin method that the server suppots.

Definition at line 1330 of file account.c.

References entry_account_name, entry_account_password, has_init, INFO_MOTD, INFO_NEWS, INFO_RULES, init_account_password_window(), init_add_character_window(), init_choose_char_window(), init_create_account_window(), init_login_window(), init_new_character_window(), login_window, serverloginmethod, and update_login_info().

Here is the call graph for this function:

void stats_get_styles ( void  )

Gets the style information for the stat bars (only portion of the window right now that has custom style support.

Definition at line 109 of file stats.c.

References bar_colors, has_init, LOG(), LOG_INFO, MAX_BUF, MAX_STAT_BARS, NUM_STYLES, stat_bar, stat_bar_names, and stat_style_names.

Referenced by load_theme().

Here is the call graph for this function:

Here is the caller graph for this function:

void stats_init ( GtkWidget *  window_root)
void trigger_skill ( GtkTreeIter  iter,
GtkTreeModel *  model,
int  use_skill 
)

This is where we actually do something with the skill.

model and iter tell us which skill we want to trigger, use_skill is 1 to use the skill, 0 to ready it.

Parameters
iter
model
use_skill

Definition at line 197 of file skills.c.

References LIST_NAME, LOG(), LOG_ERROR, MAX_BUF, and send_command().

Referenced by on_skill_ready_clicked(), on_skill_treeview_row_activated(), and on_skill_use_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_character_choose ( const char *  name,
const char *  class,
const char *  race,
const char *  face,
const char *  party,
const char *  map,
int  level,
int  faceno 
)

This gets data and adds it to the list store.

This is called from AccountPlayersCmd and data is from the accountplayers protocol command. The parameters are data to add to the list store.

Parameters
name
class
race
face
party
map
level
faceno

Definition at line 572 of file account.c.

References CHAR_CLASS, CHAR_ICON, CHAR_IMAGE, CHAR_LEVEL, CHAR_MAP, CHAR_NAME, CHAR_PARTY, CHAR_RACE, character_store, and pixmaps.

void update_login_info ( int  type)

This is called from ReplyInfoCmd when it gets a response from news/motd/rules.

It is very possible that the window will get displayed before we got a reply response, so this tells the client to update it.

Parameters
typeWhat data just got updated - text string of motd/news/rules

Definition at line 1241 of file account.c.

References add_marked_text_to_pane(), BIG_BUF, has_init, INFO_MOTD, INFO_NEWS, INFO_RULES, motd, news, rules, textbuf_motd, textbuf_news, textbuf_rules_account, textbuf_rules_char, TEXTVIEW_MOTD, TEXTVIEW_NEWS, TEXTVIEW_RULES_ACCOUNT, and TEXTVIEW_RULES_CHAR.

Referenced by start_login().

Here is the call graph for this function:

Here is the caller graph for this function:

void update_msgctrl_configuration ( void  )

Update the state of the message control dialog so the configuration matches the currently selected settings.

Do not call this before msgctrl_widgets[] is initialized. It also really only makes sense to call it if changes have been made to msgctrl_widgets[].

Definition at line 1481 of file info.c.

void update_skill_information ( void  )

Called whenever the skill window is opened or a stats packet is received.

If the skills window has been created and is currently visible, it rebuilds the list store otherwise nothing happens, because it will be called again next time the window is opened anyway.

Definition at line 62 of file skills.c.

References cpl, dialog_xml, exp_table, exp_table_max, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, MAX_BUF, MAX_SKILL, name, Stat_struct::skill_exp, Stat_struct::skill_level, skill_mapping, skill_store, Player_Struct::stats, and NameMapping::value.

Referenced by draw_stats(), and on_skills_activate().

Here is the caller graph for this function:

void update_spell_information ( void  )
void update_stat ( int  stat_no,
gint64  max_stat,
gint64  current_stat,
gint64  statbar_max,
gint64  statbar_stat,
int  can_alert 
)

Updates the stat bar and text display as it pertains to a specific stat.

Parameters
stat_noThe stat number to update.
max_statThe normal maximum value this stat can have. Note that within game terms, the actual value can go above this via supercharging stats.
current_statcurrent value of the stat.
statbar_max
statbar_statthis is the stat value to use for drawing the statbar. For most stats, this is same as current stat, but for the exp bar, we basically want it to be a graph relative to amount for next level.
can_alertWhether this stat can go on alert when it gets low. It doesn't make sense for this to happen on exp (not really an alert if you gain a level). Note: This is no longer used with the new style code - if a stat shouldn't ever change color when it is low, the style should dictate that.

Definition at line 291 of file stats.c.

References bar_colors, CONFIG_GRAD_COLOR, format_si_number(), lastmax, lastval, stat_bar, STAT_BAR_EXP, STYLE_GRAD_LOW, STYLE_GRAD_NORMAL, STYLE_GRAD_SUPER, STYLE_LOW, STYLE_NORMAL, STYLE_SUPER, and use_config.

Referenced by draw_message_window().

Here is the call graph for this function:

Here is the caller graph for this function: