Crossfire Client, Trunk  R20507
Go to the documentation of this file.
1 /* account.c */
2 extern void hide_all_login_windows(void);
3 extern gboolean on_window_delete_event(GtkWidget *window, gpointer *user_data);
4 extern void create_new_character_failure(char *message);
5 extern void on_button_create_new_char_clicked(GtkButton *button, gpointer user_data);
6 extern void on_entry_new_character_name(GtkEntry *entry, gpointer user_data);
7 extern void on_button_new_char_cancel_clicked(GtkButton *button, gpointer user_data);
8 extern void account_add_character_failure(char *message);
9 extern void on_button_do_add_character_clicked(GtkButton *button, gpointer user_data);
10 extern void on_button_return_character_select_clicked(GtkButton *button, gpointer user_data);
11 extern void on_kb_scope_togglebutton_character_toggled(GtkToggleButton *toggle_button, gpointer user_data);
12 extern void on_kb_scope_togglebutton_global_toggled(GtkToggleButton *toggle_button, gpointer user_data);
13 extern void on_entry_character(GtkEntry *entry, gpointer user_data);
14 extern void choose_character_init(void);
15 extern void on_button_play_character_clicked(GtkButton *button, gpointer user_data);
16 extern void on_button_create_character_clicked(GtkButton *button, gpointer user_data);
17 extern void on_button_add_character_clicked(GtkButton *button, gpointer user_data);
18 extern void on_button_return_login_clicked(GtkButton *button, gpointer user_data);
19 extern 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);
20 extern void on_treeview_choose_character_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
21 extern void account_creation_failure(char *message);
22 extern void on_button_new_create_account_clicked(GtkButton *button, gpointer user_data);
23 extern void on_button_new_cancel_clicked(GtkButton *button, gpointer user_data);
24 extern void on_entry_new_account(GtkEntry *entry, gpointer user_data);
25 extern void account_login_failure(char *message);
26 extern void on_button_create_account_clicked(GtkButton *button, gpointer user_data);
27 extern void on_button_go_metaserver_clicked(GtkButton *button, gpointer user_data);
28 extern void on_button_exit_client_clicked(GtkButton *button, gpointer user_data);
29 extern void on_button_login_clicked(GtkButton *button, gpointer user_data);
30 extern void on_entry_account_name_activate(GtkEntry *entry, gpointer user_data);
31 extern void on_entry_account_password_activate(GtkEntry *entry, gpointer user_data);
32 extern void update_login_info(int type);
33 extern void start_login(int method);
34 extern void choose_char_window_show();
35 /* config.c */
36 extern void load_theme(int reload);
37 extern void config_check();
38 extern void config_load(void);
39 extern void save_defaults(void);
40 extern void config_init(GtkWidget *window_root);
41 extern void on_config_button_save_clicked(GtkButton *button, gpointer user_data);
42 extern void on_config_button_apply_clicked(GtkButton *button, gpointer user_data);
43 extern void on_config_button_close_clicked(GtkButton *button, gpointer user_data);
44 extern void on_configure_activate(GtkWidget *menuitem, gpointer user_data);
45 extern void save_winpos(void);
46 extern void on_save_window_position_activate(GtkMenuItem *menuitem, gpointer user_data);
47 extern void load_window_positions(GtkWidget *window_root);
48 extern void init_theme();
49 /* create_char.c */
50 extern void create_character_window_show();
51 extern void create_character_window_hide();
52 extern void init_create_character_window();
53 /* image.c */
54 extern int create_and_rescale_image_from_data(Cache_Entry *ce, int pixmap_num, guint8 *rgba_data, int width, int height);
55 extern void addsmooth(guint16 face, guint16 smooth_face);
56 extern int associate_cache_entry(Cache_Entry *ce, int pixnum);
57 extern void reset_image_data(void);
58 extern void image_update_download_status(int start, int end, int total);
59 extern void get_map_image_size(int face, guint8 *w, guint8 *h);
60 extern void init_image_cache_data(void);
61 /* info.c */
62 extern void set_text_tag_from_style(GtkTextTag *tag, GtkStyle *style, GtkStyle *base_style);
63 extern void add_tags_to_textbuffer(Info_Pane *pane, GtkTextBuffer *textbuf);
64 extern void add_style_to_textbuffer(Info_Pane *pane, GtkStyle *base_style);
65 extern void info_get_styles(void);
66 extern void info_init(GtkWidget *window_root);
67 extern void add_marked_text_to_pane(Info_Pane *pane, const char *message, int type, int subtype, int orig_color);
68 extern void draw_ext_info(int orig_color, int type, int subtype, const char *message);
69 extern void info_buffer_init(void);
70 extern void info_buffer_flush(const int id);
71 extern void info_buffer_tick(void);
72 extern void menu_clear(void);
73 extern void msgctrl_init(GtkWidget *window_root);
74 extern void update_msgctrl_configuration(void);
75 extern void save_msgctrl_configuration(void);
76 extern void load_msgctrl_configuration(void);
77 extern void default_msgctrl_configuration(void);
78 extern void read_msgctrl_configuration(void);
79 extern void on_msgctrl_button_save_clicked(GtkButton *button, gpointer user_data);
80 extern void on_msgctrl_button_load_clicked(GtkButton *button, gpointer user_data);
81 extern void on_msgctrl_button_defaults_clicked(GtkButton *button, gpointer user_data);
82 extern void on_msgctrl_button_apply_clicked(GtkButton *button, gpointer user_data);
83 extern void on_msgctrl_button_close_clicked(GtkButton *button, gpointer user_data);
84 extern void on_msgctrl_activate(GtkMenuItem *menuitem, gpointer user_data);
85 /* inventory.c */
86 extern void inventory_get_styles(void);
87 extern void inventory_init(GtkWidget *window_root);
88 extern void close_container(item *op);
89 extern void open_container(item *op);
90 extern void command_show(const char *params);
91 extern void set_weight_limit(guint32 wlim);
92 extern void item_event_item_deleting(item *it);
93 extern void item_event_container_clearing(item *container);
94 extern void item_event_item_changed(item *it);
95 extern void draw_look_list(void);
96 extern void draw_lists(void);
97 extern void inventory_tick(void);
98 /* keys.c */
99 extern void keybindings_init(const char *character_name);
100 extern void keys_init(GtkWidget *window_root);
101 extern void bind_key(char *params);
102 extern void unbind_key(const char *params);
103 extern void focusoutfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window);
104 extern void keyrelfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window);
105 extern void keyfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window);
106 extern void x_set_echo(void);
107 extern void draw_prompt(const char *str);
108 extern void gtk_command_history(int direction);
109 extern void gtk_complete_command(void);
110 extern void on_entry_commands_activate(GtkEntry *entry, gpointer user_data);
111 extern void update_keybinding_list(void);
112 extern void on_keybindings_activate(GtkMenuItem *menuitem, gpointer user_data);
113 extern gboolean on_keybinding_entry_key_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data);
114 extern void on_keybinding_button_remove_clicked(GtkButton *button, gpointer user_data);
115 extern void on_keybinding_button_bind_clicked(GtkButton *button, gpointer user_data);
116 extern void on_keybinding_button_update_clicked(GtkButton *button, gpointer user_data);
117 extern void on_keybinding_button_close_clicked(GtkButton *button, gpointer user_data);
118 extern void on_keybinding_checkbutton_any_clicked(GtkCheckButton *cb, gpointer user_data);
119 extern gboolean keybinding_selection_func(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer userdata);
120 extern void reset_keybinding_status(void);
121 extern void on_keybinding_button_clear_clicked(GtkButton *button, gpointer user_data);
122 /* main.c */
123 extern void client_tick(guint32 tick);
124 extern void on_window_destroy_event(GtkObject *object, gpointer user_data);
125 extern void error_dialog(char *description, char *information);
126 extern void my_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
127 extern int main(int argc, char *argv[]);
128 extern void get_window_coord(GtkWidget *win, int *x, int *y, int *wx, int *wy, int *w, int *h);
129 /* map.c */
130 extern void map_init(GtkWidget *window_root);
131 extern int display_mapscroll(int dx, int dy);
132 extern void resize_map_window(int x, int y);
133 extern void draw_map(int redraw);
134 extern void display_map_doneupdate(int redraw, int notice);
135 /* magicmap.c */
136 extern void draw_magic_map(void);
137 extern void magic_map_flash_pos(void);
138 extern gboolean on_drawingarea_magic_map_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
139 /* menubar.c */
140 extern void init_menu_items();
141 /* metaserver.c */
142 extern void metaserver_ui_init();
143 extern void metaserver_show_prompt(void);
144 extern void on_metaserver_select_clicked(GtkButton *button, gpointer user_data);
145 extern void on_button_metaserver_quit_pressed(GtkButton *button, gpointer user_data);
146 /* opengl.c */
147 extern void init_glx_opengl(GtkWidget *drawingarea);
148 extern void init_opengl(GtkWidget *drawingarea);
149 extern void opengl_gen_map(int redraw);
150 extern void create_opengl_map_image(guint8 *data, PixmapInfo *pi);
151 extern void opengl_free_pixmap(PixmapInfo *pi);
152 extern void create_opengl_question_mark(void);
153 /* pickup.c */
154 extern void on_menu_dont_pickup_activate(GtkMenuItem *menuitem, gpointer user_data);
155 extern void on_menu_stop_before_pickup_activate(GtkMenuItem *menuitem, gpointer user_data);
156 extern void on_menu_body_armor_activate(GtkMenuItem *menuitem, gpointer user_data);
157 extern void on_menu_boots_activate(GtkMenuItem *menuitem, gpointer user_data);
158 extern void on_menu_cloaks_activate(GtkMenuItem *menuitem, gpointer user_data);
159 extern void on_menu_gloves_activate(GtkMenuItem *menuitem, gpointer user_data);
160 extern void on_menu_helmets_activate(GtkMenuItem *menuitem, gpointer user_data);
161 extern void on_menu_shields_activate(GtkMenuItem *menuitem, gpointer user_data);
162 extern void on_menu_skillscrolls_activate(GtkMenuItem *menuitem, gpointer user_data);
163 extern void on_menu_normal_book_scrolls_activate(GtkMenuItem *menuitem, gpointer user_data);
164 extern void on_menu_spellbooks_activate(GtkMenuItem *menuitem, gpointer user_data);
165 extern void on_menu_drinks_activate(GtkMenuItem *menuitem, gpointer user_data);
166 extern void on_menu_food_activate(GtkMenuItem *menuitem, gpointer user_data);
167 extern void on_menu_keys_activate(GtkMenuItem *menuitem, gpointer user_data);
168 extern void on_menu_magical_items_activate(GtkMenuItem *menuitem, gpointer user_data);
169 extern void on_menu_potions_activate(GtkMenuItem *menuitem, gpointer user_data);
170 extern void on_menu_valuables_activate(GtkMenuItem *menuitem, gpointer user_data);
171 extern void on_menu_wands_rods_horns_activate(GtkMenuItem *menuitem, gpointer user_data);
172 extern void on_menu_not_cursed_activate(GtkMenuItem *menuitem, gpointer user_data);
173 extern void on_menu_jewels_activate(GtkMenuItem *menuitem, gpointer user_data);
174 extern void on_menu_containers_activate(GtkMenuItem *menuitem, gpointer user_data);
175 extern void on_menu_flesh_activate(GtkMenuItem *menuitem, gpointer user_data);
176 extern void on_menu_all_weapons_activate(GtkMenuItem *menuitem, gpointer user_data);
177 extern void on_menu_missile_weapons_activate(GtkMenuItem *menuitem, gpointer user_data);
178 extern void on_menu_bows_activate(GtkMenuItem *menuitem, gpointer user_data);
179 extern void on_menu_arrows_activate(GtkMenuItem *menuitem, gpointer user_data);
180 extern void on_menu_ratio_pickup_off_activate(GtkMenuItem *menuitem, gpointer user_data);
181 extern void on_menu_ratio_5_activate(GtkMenuItem *menuitem, gpointer user_data);
182 extern void on_menu_ratio_10_activate(GtkMenuItem *menuitem, gpointer user_data);
183 extern void on_menu_ratio_15_activate(GtkMenuItem *menuitem, gpointer user_data);
184 extern void on_menu_ratio_20_activate(GtkMenuItem *menuitem, gpointer user_data);
185 extern void on_menu_ratio_25_activate(GtkMenuItem *menuitem, gpointer user_data);
186 extern void on_menu_ratio_30_activate(GtkMenuItem *menuitem, gpointer user_data);
187 extern void on_menu_ratio_35_activate(GtkMenuItem *menuitem, gpointer user_data);
188 extern void on_menu_ratio_40_activate(GtkMenuItem *menuitem, gpointer user_data);
189 extern void on_menu_ratio_45_activate(GtkMenuItem *menuitem, gpointer user_data);
190 extern void on_menu_ratio_50_activate(GtkMenuItem *menuitem, gpointer user_data);
191 extern void pickup_init(GtkWidget *window_root);
192 extern void client_pickup(guint32 pickup);
193 /* png.c */
194 extern guint8 *png_to_data(guint8 *data, int len, guint32 *width, guint32 *height);
195 extern guint8 *rescale_rgba_data(guint8 *data, int *width, int *height, int scale);
196 extern GdkPixbuf *rgba_to_gdkpixbuf(guint8 *data, int width, int height);
197 extern cairo_surface_t *rgba_to_cairo_surface(guint8 *data, int width, int height);
198 /* sdl.c */
199 extern void init_SDL(GtkWidget *sdl_window, int just_lightmap);
200 extern 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);
201 extern void sdl_gen_map(int redraw);
202 extern int sdl_mapscroll(int dx, int dy);
203 /* skills.c */
204 extern void update_skill_information(void);
205 extern void on_skills_activate(GtkMenuItem *menuitem, gpointer user_data);
206 extern void trigger_skill(GtkTreeIter iter, GtkTreeModel *model, int use_skill);
207 extern void on_skill_treeview_row_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
208 extern void on_skill_ready_clicked(GtkButton *button, gpointer user_data);
209 extern void on_skill_use_clicked(GtkButton *button, gpointer user_data);
210 extern void on_skill_close_clicked(GtkButton *button, gpointer user_data);
211 /* sound.c */
212 extern int init_sounds(void);
213 extern void play_sound_effect(gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, const char *sound, const char *source);
214 extern void Sound2Cmd(unsigned char *data, int len);
215 extern void MusicCmd(const char *data, int len);
216 /* spells.c */
217 extern void spell_get_styles(void);
218 extern void on_spell_window_size_allocate(GtkWidget *widget, gpointer user_data);
219 extern void update_spell_information(void);
220 extern void on_spells_activate(GtkMenuItem *menuitem, gpointer user_data);
221 extern void on_spell_treeview_row_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
222 extern void on_spell_cast_clicked(GtkButton *button, gpointer user_data);
223 extern void on_spell_invoke_clicked(GtkButton *button, gpointer user_data);
224 extern void on_spell_close_clicked(GtkButton *button, gpointer user_data);
225 /* stats.c */
226 extern void stats_get_styles(void);
227 extern void stats_init(GtkWidget *window_root);
228 extern void update_stat(int stat_no, gint64 max_stat, gint64 current_stat, gint64 statbar_max, gint64 statbar_stat, int can_alert);
229 extern void draw_message_window(int redraw);
230 extern void draw_stats(int redraw);
231 extern void clear_stat_mapping(void);
void error_dialog(char *description, char *information)
Display an error message dialog.
Definition: main.c:263
void on_menu_bows_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:301
void on_button_go_metaserver_clicked(GtkButton *button, gpointer user_data)
User hit the go to metaserver button.
Definition: account.c:938
void trigger_skill(GtkTreeIter iter, GtkTreeModel *model, int use_skill)
This is where we actually do something with the skill.
Definition: skills.c:197
void update_spell_information(void)
When spell information updates, the treeview is cleared and re-populated.
Definition: spells.c:190
void item_event_item_changed(item *it)
Definition: inventory.c:680
void set_text_tag_from_style(GtkTextTag *tag, GtkStyle *style, GtkStyle *base_style)
EndOf GTK V2 Message Control System.
Definition: info.c:334
void create_new_character_failure(char *message)
Pop up a dialog window with the error from the server.
Definition: account.c:152
int display_mapscroll(int dx, int dy)
Definition: map.c:122
guint32 width
Definition: image.c:42
void on_button_return_character_select_clicked(GtkButton *button, gpointer user_data)
User has hit the return to character selection button.
Definition: account.c:357
void on_window_destroy_event(GtkObject *object, gpointer user_data)
Handles client shutdown.
Definition: main.c:165
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.
Definition: main.c:480
void on_kb_scope_togglebutton_character_toggled(GtkToggleButton *toggle_button, gpointer user_data)
Called when "This character" is clicked.
Definition: keys.c:2134
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.
Definition: inventory.c:573
void on_button_new_create_account_clicked(GtkButton *button, gpointer user_data)
User clicked on the create account button.
Definition: account.c:771
void on_keybinding_checkbutton_any_clicked(GtkCheckButton *cb, gpointer user_data)
Deactivate the modifier checkboxes if "Any" is selected.
Definition: keys.c:2370
void info_get_styles(void)
Loads up values from the style file.
Definition: info.c:516
void on_spell_treeview_row_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
Definition: spells.c:492
void init_create_character_window()
Initializes the create character window.
Definition: create_char.c:791
void on_menu_boots_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:142
void spell_get_styles(void)
Gets the style information for the inventory windows.
Definition: spells.c:66
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.
Definition: stats.c:291
void on_menu_ratio_25_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:354
guint32 tick
Definition: client.c:61
void on_menu_ratio_5_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:326
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 redra...
Definition: spells.c:124
void on_config_button_save_clicked(GtkButton *button, gpointer user_data)
void on_metaserver_select_clicked(GtkButton *button, gpointer user_data)
Establish a connection with the server when pressing the connect button.
Definition: metaserver.c:252
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 abou...
Definition: keys.c:2394
void draw_stats(int redraw)
Draws the stats window.
Definition: stats.c:554
void inventory_init(GtkWidget *window_root)
Set up the inventory viewer.
Definition: inventory.c:452
void on_entry_account_name_activate(GtkEntry *entry, gpointer user_data)
User hit return in the name entry box.
Definition: account.c:999
guint8 * png_to_data(guint8 *data, int len, guint32 *width, guint32 *height)
Definition: png.c:49
void save_msgctrl_configuration(void)
Applies the current state of the checkboxes to the msgctrl_widgets state variables and saves the sett...
Definition: info.c:1511
void on_button_new_cancel_clicked(GtkButton *button, gpointer user_data)
Definition: account.c:792
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...
Definition: keys.c:1773
void on_keybindings_activate(GtkMenuItem *menuitem, gpointer user_data)
Menubar item to activate keybindings window.
Definition: keys.c:1912
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)...
Definition: image.c:261
void choose_character_init(void)
Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd).
Definition: account.c:439
void open_container(item *op)
Definition: inventory.c:581
void on_menu_gloves_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:156
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...
Definition: info.c:819
void gtk_command_history(int direction)
Deals with command history.
Definition: keys.c:1705
void on_keybinding_button_remove_clicked(GtkButton *button, gpointer user_data)
Implements the "Remove Binding" button function that unbinds the currently selected keybinding...
Definition: keys.c:2178
void opengl_free_pixmap(PixmapInfo *pi)
void draw_magic_map(void)
Definition: magicmap.c:24
void info_buffer_init(void)
Output count/sync message buffer initialization to set all buffers empty.
Definition: info.c:1010
void on_menu_body_armor_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:135
void on_keybinding_button_clear_clicked(GtkButton *button, gpointer user_data)
Implements the "Clear Fields" button function on the keybinding dialog.
Definition: keys.c:2502
void reset_image_data(void)
Connecting to different servers, try to clear out any old images.
Definition: image.c:428
void on_msgctrl_activate(GtkMenuItem *menuitem, gpointer user_data)
Shows the message control dialog when the menu item is activated.
Definition: info.c:1896
void keyfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
GTK Callback function used to handle client key press events.
Definition: keys.c:1556
void sdl_gen_map(int redraw)
void stats_init(GtkWidget *window_root)
Associate the XML-defined widgets with pointers by name reference.
Definition: stats.c:147
void add_tags_to_textbuffer(Info_Pane *pane, GtkTextBuffer *textbuf)
Adds the various tags to the next buffer.
Definition: info.c:372
void on_skill_ready_clicked(GtkButton *button, gpointer user_data)
Definition: skills.c:238
void save_winpos(void)
Save client window positions to a file unique to each layout.
Definition: config.c:767
void clear_stat_mapping(void)
Definition: stats.c:771
void on_skills_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: skills.c:106
void update_keybinding_list(void)
Update the keybinding dialog to reflect the current state of the keys file.
Definition: keys.c:1842
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.
Definition: keys.c:1930
void on_menu_ratio_40_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:375
void on_skill_close_clicked(GtkButton *button, gpointer user_data)
Definition: skills.c:267
void on_entry_new_account(GtkEntry *entry, gpointer user_data)
This handles cases where the user hits return in one of the entry boxes.
Definition: account.c:807
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...
Definition: info.c:1880
void pickup_init(GtkWidget *window_root)
Maps the menuitem lists into pickup values.
Definition: pickup.c:401
void on_menu_normal_book_scrolls_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:189
void on_menu_keys_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:220
void config_load(void)
Load settings from the user's configuration file into want_config.
Definition: config.c:395
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().
Definition: main.c:286
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 curre...
Definition: keys.c:2311
void client_pickup(guint32 pickup)
We get pickup information from server, update our status.
Definition: pickup.c:630
void Sound2Cmd(unsigned char *data, int len)
Parse the data contained by a sound2 command coming from the server and handle playing the specified ...
Definition: sound.c:40
void init_image_cache_data(void)
Initializes the data for image caching Create question mark to display in each supported rendering mo...
Definition: image.c:526
void on_menu_cloaks_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:149
void on_menu_containers_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:269
void on_menu_food_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:213
void on_configure_activate(GtkWidget *menuitem, gpointer user_data)
Definition: config.c:753
void on_menu_skillscrolls_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:181
void on_menu_all_weapons_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:287
void create_opengl_map_image(guint8 *data, PixmapInfo *pi)
void on_button_create_account_clicked(GtkButton *button, gpointer user_data)
User hit the create account button.
Definition: account.c:921
void on_menu_potions_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:234
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 aga...
Definition: account.c:291
void on_spell_cast_clicked(GtkButton *button, gpointer user_data)
Definition: spells.c:524
void on_menu_ratio_50_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:389
void init_menu_items()
Initialize menu bar items and connect their signals to their handlers.
Definition: menubar.c:91
void on_menu_ratio_30_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:361
void on_skill_treeview_row_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
Definition: skills.c:221
void on_spell_close_clicked(GtkButton *button, gpointer user_data)
Definition: spells.c:580
int associate_cache_entry(Cache_Entry *ce, int pixnum)
This functions associates image_data in the cache entry with the specific pixmap number.
Definition: image.c:416
void config_init(GtkWidget *window_root)
Definition: config.c:464
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.
Definition: info.c:932
void on_menu_ratio_45_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:382
void on_button_play_character_clicked(GtkButton *button, gpointer user_data)
User has hit the play character button.
Definition: account.c:482
void on_keybinding_button_bind_clicked(GtkButton *button, gpointer user_data)
Sets up a new binding when the "Add" button is clicked.
Definition: keys.c:2277
void gtk_complete_command(void)
Executes when the TAB key is pressed while the command input box has focus to give hints on what comm...
Definition: keys.c:1752
void read_msgctrl_configuration(void)
Reads the state of the message control dialog and applies the settings to the msgctrl_widgets[] state...
Definition: info.c:1782
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...
Definition: info.c:1866
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 clien...
Definition: info.c:1851
void x_set_echo(void)
Definition: keys.c:1686
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 cfsndse...
Definition: sound.c:122
static gboolean redraw(gpointer data)
Redraw the map.
Definition: main.c:128
GtkWidget * window_root
In main.c.
Definition: main.c:87
void on_menu_shields_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:170
void on_entry_character(GtkEntry *entry, gpointer user_data)
User has hit return in either name or password box.
Definition: account.c:371
void on_menu_flesh_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:276
void on_entry_new_character_name(GtkEntry *entry, gpointer user_data)
User hit return in the new character name box.
Definition: account.c:203
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...
Definition: config.c:808
void msgctrl_init(GtkWidget *window_root)
Initialize the message control panel by populating it with descriptions of each message type along wi...
Definition: info.c:1331
void init_glx_opengl(GtkWidget *drawingarea)
void on_menu_spellbooks_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:197
int sdl_mapscroll(int dx, int dy)
void create_opengl_question_mark(void)
void use_skill(int skill_id)
Maintain the last_used_skills LRU list for displaying the recently used skills first.
Definition: commands.c:1315
void command_show(const char *params)
Definition: inventory.c:589
void load_theme(int reload)
Definition: config.c:138
void get_map_image_size(int face, guint8 *w, guint8 *h)
Definition: image.c:493
void on_menu_not_cursed_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:255
void on_config_button_close_clicked(GtkButton *button, gpointer user_data)
void on_menu_stop_before_pickup_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:124
void draw_lists(void)
Redraws inventory and look windows when necessary.
Definition: inventory.c:1075
void account_login_failure(char *message)
Handles a failure from the server - pretty basic - just throw up the message and let the user try aga...
Definition: account.c:910
void init_theme()
Definition: config.c:76
void on_menu_dont_pickup_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:117
guint32 height
Definition: image.c:42
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...
Definition: account.c:522
void on_menu_helmets_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:163
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...
Definition: info.c:426
void menu_clear(void)
Clears all the message panels.
Definition: info.c:1312
void on_spells_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: spells.c:282
void info_init(GtkWidget *window_root)
Initialize the information panels in the client.
Definition: info.c:649
void on_menu_ratio_20_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:347
void info_buffer_flush(const int id)
Handles message buffer flushes, and, as needed, displays the text.
Definition: info.c:1037
gboolean on_drawingarea_magic_map_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
void draw_message_window(int redraw)
Updates the stats pane - hp, sp, etc labels.
Definition: stats.c:459
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...
Definition: inventory.c:621
void on_menu_jewels_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:262
void on_config_button_apply_clicked(GtkButton *button, gpointer user_data)
void on_button_do_add_character_clicked(GtkButton *button, gpointer user_data)
User has hit the add character button.
Definition: account.c:343
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.
Definition: image.c:461
void on_button_exit_client_clicked(GtkButton *button, gpointer user_data)
User hit the exit client button.
Definition: account.c:947
void keys_init(GtkWidget *window_root)
One-time initialization of windows and signals for the keybindings dialog.
Definition: keys.c:621
void update_login_info(int type)
This is called from ReplyInfoCmd when it gets a response from news/motd/rules.
Definition: account.c:1241
void update_msgctrl_configuration(void)
Update the state of the message control dialog so the configuration matches the currently selected se...
Definition: info.c:1481
void config_check()
Sanity check values set in want_config and copy them over to use_config when all of them are acceptab...
Definition: config.c:311
void on_button_create_new_char_clicked(GtkButton *button, gpointer user_data)
User hit the create character button.
Definition: account.c:193
void on_menu_ratio_10_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:333
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...
Definition: account.c:537
void save_defaults(void)
This function saves user settings chosen using the configuration popup dialog.
Definition: config.c:440
void on_button_create_character_clicked(GtkButton *button, gpointer user_data)
Definition: account.c:505
void create_character_window_hide()
Basically opposite as above - hide the create character windows - this is called from hide_all_login_...
Definition: create_char.c:196
void stats_get_styles(void)
Gets the style information for the stat bars (only portion of the window right now that has custom st...
Definition: stats.c:109
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 display_map_doneupdate(int redraw, int notice)
This is called after the map has been all digested.
Definition: map.c:493
int init_sounds(void)
Definition: sound.c:27
void map_init(GtkWidget *window_root)
This initializes the stuff we need for the map.
Definition: map.c:75
int main(int argc, char *argv[])
Main client entry point.
Definition: main.c:407
void on_button_metaserver_quit_pressed(GtkButton *button, gpointer user_data)
Quits the client application if the quit button is pressed.
Definition: metaserver.c:266
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.
Definition: account.c:572
void init_opengl(GtkWidget *drawingarea)
void on_menu_missile_weapons_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:294
Definition: info.h:55
cairo_surface_t * rgba_to_cairo_surface(guint8 *data, int width, int height)
Create a Cairo surface for the given RGBA data.
Definition: png.c:443
void on_menu_ratio_35_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:368
void on_spell_invoke_clicked(GtkButton *button, gpointer user_data)
Definition: spells.c:552
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 appl...
Definition: info.c:1837
void item_event_item_deleting(item *it)
Definition: inventory.c:674
void draw_look_list(void)
Draws the objects beneath the player.
Definition: inventory.c:739
void choose_char_window_show()
Basic little function - this is used because we make the choose_char_window widget private to this fi...
Definition: account.c:456
void focusoutfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
When the main window looses its focus, act as if all keys have been released.
Definition: keys.c:1513
void update_skill_information(void)
Called whenever the skill window is opened or a stats packet is received.
Definition: skills.c:62
void play_sound_effect(gint8 x, gint8 y, guint8 dir, guint8 vol, guint8 type, const char *sound, const char *source)
void item_event_container_clearing(item *container)
Definition: inventory.c:677
void default_msgctrl_configuration(void)
Setup the state of the message control dialog so the configuration matches the default settings built...
Definition: info.c:1760
void on_menu_ratio_pickup_off_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:319
Used mostly in the cache.c file, however, it can be returned to the graphic side of things so that th...
Definition: client.h:508
void on_keybinding_button_close_clicked(GtkButton *button, gpointer user_data)
Deactivates the keybinding dialog when the "Close Window" button is clicked.
Definition: keys.c:2360
void on_entry_account_password_activate(GtkEntry *entry, gpointer user_data)
void load_msgctrl_configuration(void)
Setup the state of the message control dialog so the configuration matches a previously saved configu...
Definition: info.c:1579
void opengl_gen_map(int redraw)
void on_menu_valuables_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:241
void info_buffer_tick(void)
Output count/sync buffer maintainer adds buffer time and output messages.
Definition: info.c:1086
void client_tick(guint32 tick)
X11 client doesn't care about this.
Definition: main.c:156
void metaserver_ui_init()
Initialize the metaserver user interface.
Definition: metaserver.c:71
void account_creation_failure(char *message)
Handles a failure from the server - pretty basic - just throw up the message and let the user try aga...
Definition: account.c:725
void on_menu_magical_items_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:227
void on_skill_use_clicked(GtkButton *button, gpointer user_data)
Definition: skills.c:253
void magic_map_flash_pos(void)
Flash the player's position on the magic map.
Definition: magicmap.c:77
guint8 * rescale_rgba_data(guint8 *data, int *width, int *height, int scale)
Takes png data and scales it accordingly.
Definition: png.c:235
void on_menu_ratio_15_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:340
void load_window_positions(GtkWidget *window_root)
Resize the client window and its panels using saved window positions.
Definition: config.c:822
void init_SDL(GtkWidget *sdl_window, int just_lightmap)
gboolean on_window_delete_event(GtkWidget *window, gpointer *user_data)
Prevent delete_event closure and/or hiding of account windows.
Definition: account.c:133
char * name
Definition: image.c:39
void inventory_get_styles(void)
Gets the style information for the inventory windows.
Definition: inventory.c:425
void addsmooth(guint16 face, guint16 smooth_face)
Referenced from common/commands.c.
Definition: image.c:403
void on_treeview_choose_character_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
GdkPixbuf * rgba_to_gdkpixbuf(guint8 *data, int width, int height)
Create a GdkPixbuf for the given RGBA data.
Definition: png.c:417
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...
Definition: account.c:214
void on_menu_wands_rods_horns_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:248
void bind_key(char *params)
Implements the "bind" command when entered as a text command.
Definition: keys.c:1076
void unbind_key(const char *params)
Definition: keys.c:1452
void on_menu_drinks_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:206
void on_menu_arrows_activate(GtkMenuItem *menuitem, gpointer user_data)
Definition: pickup.c:308
void on_kb_scope_togglebutton_global_toggled(GtkToggleButton *toggle_button, gpointer user_data)
Called when "All characters" is clicked.
Definition: keys.c:2156
void reset_keybinding_status(void)
Reset the state of the keybinding dialog.
Definition: keys.c:2472
void draw_prompt(const char *str)
Draws a prompt.
Definition: keys.c:1695
void hide_all_login_windows(void)
Hides all the login related windows.
Definition: account.c:102
void start_login(int method)
Starts the login process.
Definition: account.c:1330
void create_character_window_show()
This function is here so that other files, in particular account.c:on_button_create_character_clicked...
Definition: create_char.c:153
void on_button_login_clicked(GtkButton *button, gpointer user_data)
User hit the login button - just call do_account_login()
Definition: account.c:989
void draw_map(int redraw)
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 ...
Definition: info.c:1821
void keyrelfunc(GtkWidget *widget, GdkEventKey *event, GtkWidget *window)
GTK callback function used to handle client key release events.
Definition: keys.c:1542
void metaserver_show_prompt(void)
Constructs the metaserver dialog and handles metaserver selection.
Definition: metaserver.c:198
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...
Definition: map.c:371
static item * map
Definition: item.c:28
void inventory_tick(void)
This is called periodically from main.c - basically a timeout, used to animate the inventory...
Definition: inventory.c:1265
void keybindings_init(const char *character_name)
Reads in the keybindings, and initializes special values.
Definition: keys.c:534