Atrinik Client  4.0
proto.h
1 #ifndef __CPROTO__
2 /* src/client/animations.c */
3 extern void read_anims(void);
4 extern void anims_deinit(void);
5 extern void anims_reset(void);
6 /* src/client/client.c */
7 extern Client_Player cpl;
8 extern void DoClient(void);
9 extern void check_animation_status(int anum);
10 /* src/client/cmd_aliases.c */
11 extern void cmd_aliases_init(void);
12 extern void cmd_aliases_deinit(void);
13 extern int cmd_aliases_handle(const char *cmd);
14 /* src/client/commands.c */
15 extern void socket_command_book(uint8_t *data, size_t len, size_t pos);
16 extern void socket_command_setup(uint8_t *data, size_t len, size_t pos);
17 extern void socket_command_anim(uint8_t *data, size_t len, size_t pos);
18 extern void socket_command_image(uint8_t *data, size_t len, size_t pos);
19 extern void socket_command_drawinfo(uint8_t *data, size_t len, size_t pos);
20 extern void socket_command_target(uint8_t *data, size_t len, size_t pos);
21 extern void socket_command_stats(uint8_t *data, size_t len, size_t pos);
22 extern void socket_command_player(uint8_t *data, size_t len, size_t pos);
23 extern void command_item_update(uint8_t *data, size_t len, size_t *pos, uint32_t flags, object *tmp);
24 extern void socket_command_item(uint8_t *data, size_t len, size_t pos);
25 extern void socket_command_item_update(uint8_t *data, size_t len, size_t pos);
26 extern void socket_command_item_delete(uint8_t *data, size_t len, size_t pos);
27 extern void socket_command_mapstats(uint8_t *data, size_t len, size_t pos);
28 extern void socket_command_map(uint8_t *data, size_t len, size_t pos);
29 extern void socket_command_version(uint8_t *data, size_t len, size_t pos);
30 extern void socket_command_compressed(uint8_t *data, size_t len, size_t pos);
31 extern void socket_command_control(uint8_t *data, size_t len, size_t pos);
32 void
33 socket_command_crypto(uint8_t *data, size_t len, size_t pos);
34 /* src/client/image.c */
35 /* src/client/item.c */
36 extern void object_init(void);
37 extern void object_deinit(void);
38 extern void objects_free(object *op);
39 extern object *object_find_object_inv(object *op, tag_t tag);
40 extern object *object_find_object(object *op, tag_t tag);
41 extern object *object_find(tag_t tag);
42 extern void object_remove(object *op);
43 extern void object_remove_inventory(object *op);
44 extern void object_transfer_inventory(object *op, object *to);
45 extern object *object_create(object *env, tag_t tag, int bflag);
46 extern void toggle_locked(object *op);
47 extern void object_send_mark(object *op);
48 extern void object_redraw(object *op);
49 extern void objects_deinit(void);
50 extern void objects_init(void);
51 extern int object_animate(object *ob);
52 extern void animate_objects(void);
53 extern void object_show_centered(SDL_Surface *surface, object *tmp, int x, int y, int w, int h, bool fit);
54 /* src/client/keybind.c */
56 extern size_t keybindings_num;
57 extern void keybind_load(void);
58 extern void keybind_save(void);
59 extern void keybind_free(keybind_struct *keybind);
60 extern void keybind_deinit(void);
61 extern keybind_struct *keybind_add(SDLKey key, SDLMod mod, const char *command);
62 extern void keybind_edit(size_t i, SDLKey key, SDLMod mod, const char *command);
63 extern void keybind_remove(size_t i);
64 extern void keybind_repeat_toggle(size_t i);
65 extern char *keybind_get_key_shortcut(SDLKey key, SDLMod mod, char *buf, size_t len);
66 extern keybind_struct *keybind_find_by_command(const char *cmd);
67 extern int keybind_command_matches_event(const char *cmd, SDL_KeyboardEvent *event);
68 extern int keybind_command_matches_state(const char *cmd);
69 extern int keybind_process_event(SDL_KeyboardEvent *event);
70 extern void keybind_process(keybind_struct *keybind, uint8_t type);
71 extern int keybind_process_command_up(const char *cmd);
72 extern void keybind_state_ensure(void);
73 extern int keybind_process_command(const char *cmd);
74 /* src/client/main.c */
75 extern SDL_Surface *ScreenSurface;
76 extern struct sockaddr_in insock;
79 extern uint32_t LastTick;
80 extern texture_struct *cursor_texture;
81 extern int cursor_x;
82 extern int cursor_y;
83 extern int map_redraw_flag;
84 extern int minimap_redraw_flag;
85 extern _anim_table *anim_table;
86 extern Animations *animations;
87 extern size_t animations_num;
88 extern struct screensize *Screensize;
89 extern _face_struct FaceList[32767];
90 extern struct msg_anim_struct msg_anim;
92 extern void keepalive_ping_stats(void);
93 extern void socket_command_keepalive(uint8_t *data, size_t len, size_t pos);
94 extern void list_vid_modes(void);
95 extern void clioption_settings_deinit(void);
96 extern int main(int argc, char *argv[]);
97 /* src/client/menu.c */
98 extern int client_command_check(const char *cmd);
99 extern int send_command_check(const char *cmd);
100 /* src/client/metaserver.c */
101 extern void metaserver_init(void);
102 extern void metaserver_disable(void);
103 extern server_struct *server_get_id(size_t num);
104 bool
105 metaserver_cert_verify_host(server_struct *server, const char *host);
106 extern size_t server_get_count(void);
107 extern int ms_connecting(int val);
108 extern void metaserver_clear_data(void);
109 extern server_struct *metaserver_add(const char *hostname, int port, int port_crypto, const char *name, const char *version, const char *desc);
110 extern int metaserver_thread(void *dummy);
111 extern void metaserver_get_servers(void);
112 /* src/client/misc.c */
113 extern void browser_open(const char *url);
114 extern char *package_get_version_full(char *dst, size_t dstlen);
115 extern char *package_get_version_partial(char *dst, size_t dstlen);
116 extern int bmp2png(const char *path);
117 extern void screenshot_create(SDL_Surface *surface);
118 /* src/client/player.c */
119 extern const char *gender_noun[4];
120 extern const char *gender_subjective[4];
121 extern const char *gender_subjective_upper[4];
122 extern const char *gender_objective[4];
123 extern const char *gender_possessive[4];
124 extern const char *gender_reflexive[4];
125 extern void clear_player(void);
126 extern void new_player(tag_t tag, long weight, short face);
127 extern void client_send_apply(object *op);
128 extern void client_send_examine(tag_t tag);
129 extern void client_send_move(tag_t loc, tag_t tag, uint32_t nrof);
130 extern void send_command(const char *command);
131 extern void init_player_data(void);
132 extern int gender_to_id(const char *gender);
133 extern void player_draw_exp_progress(SDL_Surface *surface, int x, int y, int64_t xp, uint8_t level);
134 /* src/client/region_map.c */
135 /* src/client/server_files.c */
136 extern void server_files_init(void);
137 extern void server_files_deinit(void);
138 extern void server_files_init_all(void);
139 extern server_files_struct *server_files_create(const char *name);
140 extern server_files_struct *server_files_find(const char *name);
141 extern void server_files_load(int post_load);
142 extern void server_files_listing_retrieve(void);
143 extern int server_files_listing_processed(void);
144 extern int server_files_processed(void);
145 extern FILE *server_file_open(server_files_struct *tmp);
146 extern FILE *server_file_open_name(const char *name);
147 extern bool server_file_save(server_files_struct *tmp, unsigned char *data, size_t len);
148 /* src/client/server_settings.c */
150 extern void server_settings_init(void);
151 extern void server_settings_deinit(void);
152 /* src/client/settings.c */
154 extern size_t setting_categories_num;
155 extern void settings_init(void);
156 extern void settings_load(void);
157 extern void settings_save(void);
158 extern void settings_deinit(void);
159 extern void *setting_get(setting_struct *setting);
160 extern const char *setting_get_str(int cat, int setting);
161 extern int64_t setting_get_int(int cat, int setting);
162 extern void settings_apply(void);
163 extern void settings_apply_change(void);
164 extern void setting_set_int(int cat, int setting, int64_t val);
165 extern void setting_set_str(int cat, int setting, const char *val);
166 extern int setting_is_text(setting_struct *setting);
167 extern int64_t category_from_name(const char *name);
168 extern int64_t setting_from_name(const char *name);
169 /* src/client/socket.c */
170 extern command_buffer *command_buffer_new(size_t len, uint8_t *data);
171 extern void command_buffer_free(command_buffer *buf);
172 extern void socket_send_packet(struct packet_struct *packet);
174 extern void add_input_command(command_buffer *buf);
175 extern void socket_thread_start(void);
176 extern void socket_thread_stop(void);
177 extern int handle_socket_shutdown(void);
178 extern void client_socket_close(client_socket_t *csock);
179 extern void client_socket_deinitialize(void);
180 extern bool client_socket_open(client_socket_t *csock, const char *host, int port, bool secure);
181 /* src/client/sound.c */
182 extern void sound_background_hook_register(void *ptr);
183 extern void sound_init(void);
184 extern void sound_deinit(void);
185 extern void sound_clear_cache(void);
186 extern void sound_play_effect(const char *filename, int volume);
187 extern int sound_play_effect_loop(const char *filename, int volume, int loop);
188 extern void sound_start_bg_music(const char *filename, int volume, int loop);
189 extern void sound_stop_bg_music(void);
190 extern void sound_pause_music(void);
191 extern void sound_resume_music(void);
192 extern void update_map_bg_music(const char *bg_music);
193 extern void sound_update_volume(void);
194 extern const char *sound_get_bg_music(void);
195 extern const char *sound_get_bg_music_basename(void);
196 extern uint8_t sound_map_background(int val);
197 extern uint32_t sound_music_get_offset(void);
198 extern int sound_music_can_seek(void);
199 extern void sound_music_seek(uint32_t offset);
200 extern uint32_t sound_music_get_duration(void);
201 extern void socket_command_sound(uint8_t *data, size_t len, size_t pos);
202 extern void sound_ambient_mapcroll(int xoff, int yoff);
203 extern void sound_ambient_clear(void);
204 extern void socket_command_sound_ambient(uint8_t *data, size_t len, size_t pos);
205 extern int sound_playing_music(void);
206 /* src/client/sprite.c */
207 extern SDL_Surface *FormatHolder;
208 extern void sprite_init_system(void);
209 extern sprite_struct *sprite_load_file(char *fname, uint32_t flags);
210 extern sprite_struct *sprite_tryload_file(char *fname, uint32_t flag, SDL_RWops *rwop);
211 extern void sprite_free_sprite(sprite_struct *sprite);
212 extern void sprite_cache_free_all(void);
213 extern void sprite_cache_gc(void);
214 extern void surface_show(SDL_Surface *surface, int x, int y, SDL_Rect *srcrect, SDL_Surface *src);
215 extern void surface_show_fill(SDL_Surface *surface, int x, int y, SDL_Rect *srcsize, SDL_Surface *src, SDL_Rect *box);
216 extern void surface_show_effects(SDL_Surface *surface, int x, int y, SDL_Rect *srcrect, SDL_Surface *src, const sprite_effects_t *effects);
217 extern Uint32 getpixel(SDL_Surface *surface, int x, int y);
218 extern void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel);
219 extern int surface_borders_get(SDL_Surface *surface, int *top, int *bottom, int *left, int *right, uint32_t color);
220 extern int sprite_collision(int x, int y, int x2, int y2, sprite_struct *sprite1, sprite_struct *sprite2);
221 extern void surface_pan(SDL_Surface *surface, SDL_Rect *box);
222 extern void draw_frame(SDL_Surface *surface, int x, int y, int w, int h);
223 extern void border_create(SDL_Surface *surface, int x, int y, int w, int h, int color, int size);
224 extern void border_create_line(SDL_Surface *surface, int x, int y, int w, int h, uint32_t color);
225 extern void border_create_sdl_color(SDL_Surface *surface, SDL_Rect *coords, int thickness, SDL_Color *color);
226 extern void border_create_color(SDL_Surface *surface, SDL_Rect *coords, int thickness, const char *color_notation);
227 extern void border_create_texture(SDL_Surface *surface, SDL_Rect *coords, int thickness, SDL_Surface *texture);
228 extern void rectangle_create(SDL_Surface *surface, int x, int y, int w, int h, const char *color_notation);
229 extern void surface_set_alpha(SDL_Surface *surface, uint8_t alpha);
230 extern int polygon_check_coords(double x, double y, double corners_x[], double corners_y[], int corners_num);
231 /* src/client/texture.c */
232 extern void texture_init(void);
233 extern void texture_deinit(void);
234 extern void texture_delete(texture_struct *texture);
235 extern void texture_reload(void);
236 extern void texture_gc(void);
237 extern texture_struct *texture_get(texture_type_t type, const char *name);
238 extern SDL_Surface *texture_surface(texture_struct *texture);
239 /* src/client/tilestretcher.c */
240 extern int tilestretcher_coords_in_tile(uint32_t stretch, int x, int y);
241 extern int add_color_to_surface(SDL_Surface *dest, Uint8 red, Uint8 green, Uint8 blue);
242 extern void copy_pixel_to_pixel(SDL_Surface *src, SDL_Surface *dest, int x, int y, int x2, int y2, double brightness);
243 extern void copy_vertical_line(SDL_Surface *src, SDL_Surface *dest, int src_x, int src_sy, int src_ey, int dest_x, int dest_sy, int dest_ey, double brightness, _Bool extra);
244 extern SDL_Surface *tile_stretch(SDL_Surface *src, int n, int e, int s, int w);
245 /* src/client/updates.c */
246 extern void socket_command_file_update(uint8_t *data, size_t len, size_t pos);
247 extern int file_updates_finished(void);
248 extern void file_updates_parse(void);
249 /* src/client/upgrader.c */
250 extern void upgrader_init(void);
251 extern char *upgrader_get_version_partial(char *dst, size_t dstlen);
252 /* src/client/video.c */
253 extern x11_display_type SDL_display;
254 extern x11_window_type SDL_window;
255 extern void video_init(void);
256 extern int video_get_bpp(void);
257 extern void video_set_icon(SDL_Surface *icon);
258 extern int video_set_size(void);
259 extern uint32_t get_video_flags(void);
260 extern int video_fullscreen_toggle(SDL_Surface **surface, uint32_t *flags);
261 /* src/client/wrapper.c */
262 extern void system_start(void);
263 extern void system_end(void);
264 extern void mkdir_ensure(const char *path);
265 extern void copy_file(const char *filename, const char *filename_out);
266 extern void copy_if_exists(const char *from, const char *to, const char *src, const char *dst);
267 extern void rmrf(const char *path);
268 extern void copy_rec(const char *src, const char *dst);
269 extern const char *get_config_dir(void);
270 extern void get_data_dir_file(char *buf, size_t len, const char *fname);
271 extern char *file_path(const char *path, const char *mode);
272 extern char *file_path_player(const char *path);
273 extern char *file_path_server(const char *path);
274 extern SDL_Surface *IMG_Load_wrapper(const char *file);
275 extern TTF_Font *TTF_OpenFont_wrapper(const char *file, int ptsize);
276 /* src/events/event.c */
277 extern int event_dragging_check(void);
278 extern int event_dragging_need_redraw(void);
279 extern void event_dragging_start(tag_t tag, int mx, int my);
280 extern void event_dragging_set_callback(event_drag_cb_fnc fnc);
281 extern void event_dragging_stop(void);
282 extern void resize_window(int width, int height);
283 extern int Event_PollInputDevice(void);
284 extern void event_push_key(SDL_EventType type, SDLKey key, SDLMod mod);
285 extern void event_push_key_once(SDLKey key, SDLMod mod);
286 /* src/events/keys.c */
287 extern key_struct keys[SDLK_LAST];
288 extern void init_keys(void);
289 extern void key_handle_event(SDL_KeyboardEvent *event);
290 /* src/events/move.c */
291 extern void client_send_fire(int num, tag_t tag);
292 extern void move_keys(int num);
293 extern int dir_from_tile_coords(int tx, int ty);
294 /* src/gui/misc/effects.c */
295 extern void effects_init(void);
296 extern void effects_deinit(void);
297 extern void effects_reinit(void);
298 extern void effect_sprites_free(effect_struct *effect);
299 extern void effect_free(effect_struct *effect);
300 extern void effect_sprite_def_free(effect_sprite_def *sprite_def);
301 extern void effect_sprite_free(effect_sprite *sprite);
302 extern void effect_sprite_remove(effect_sprite *sprite);
303 extern void effect_sprites_play(void);
304 extern void effect_frames(int frames);
305 extern int effect_start(const char *name);
306 extern void effect_debug(const char *type);
307 extern void effect_stop(void);
308 extern uint8_t effect_has_overlay(void);
309 extern const char *effect_overlay_identifier(void);
310 extern SDL_Surface *effect_sprite_overlay(SDL_Surface *surface);
311 /* src/gui/misc/game_news.c */
312 extern void game_news_open(const char *title);
313 /* src/gui/misc/intro.c */
314 extern void intro_deinit(void);
315 extern void intro_show(void);
316 extern int intro_event(SDL_Event *event);
317 /* src/gui/popups/book.c */
318 extern UT_array *book_help_history;
319 extern void book_name_change(const char *name, size_t len);
320 extern void book_load(const char *data, int len);
321 extern void book_redraw(void);
322 extern void book_add_help_history(const char *name);
323 /* src/gui/popups/characters.c */
324 extern void characters_open(void);
325 extern void socket_command_characters(uint8_t *data, size_t len, size_t pos);
326 /* src/gui/popups/color_chooser.c */
328 /* src/gui/popups/credits.c */
329 extern void credits_show(void);
330 /* src/gui/popups/help.c */
331 extern void hfiles_deinit(void);
332 extern void hfiles_init(void);
333 extern hfile_struct *help_find(const char *name);
334 extern void help_show(const char *name);
336 /* src/gui/popups/interface.c */
337 extern void socket_command_interface(uint8_t *data, size_t len, size_t pos);
338 extern void interface_redraw(void);
339 extern void interface_deinit(void);
340 /* src/gui/popups/login.c */
341 extern void login_start(void);
342 /* src/gui/popups/painting.c */
343 void
344 socket_command_painting(uint8_t *data, size_t len, size_t pos);
345 /* src/gui/popups/region_map.c */
346 extern void region_map_open(void);
347 /* src/gui/popups/server_add.c */
348 extern void server_add_open(void);
349 /* src/gui/popups/settings.c */
350 extern void settings_open(void);
351 /* src/gui/popups/settings_client.c */
352 extern void settings_client_open(void);
353 /* src/gui/popups/settings_keybinding.c */
354 extern void settings_keybinding_open(void);
355 /* src/gui/popups/updater.c */
356 extern void updater_open(void);
357 /* src/gui/toolkit/SDL_gfx.c */
358 extern int fastPixelColorNolock(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color);
359 extern int fastPixelColorNolockNoclip(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color);
360 extern int fastPixelColor(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color);
361 extern int fastPixelRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
362 extern int fastPixelRGBANolock(SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
363 extern int _putPixelAlpha(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha);
364 extern int pixelColor(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color);
365 extern int pixelColorNolock(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color);
366 extern int _filledRectAlpha(SDL_Surface *dst, Sint16 xx, Sint16 yy, Sint16 x2, Sint16 y2, Uint32 color, Uint8 alpha);
367 extern int filledRectAlpha(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint32 color);
368 extern int _HLineAlpha(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
369 extern int _VLineAlpha(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 y2, Uint32 color);
370 extern int pixelColorWeight(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight);
371 extern int pixelColorWeightNolock(SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight);
372 extern int pixelRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
373 extern int hlineColorStore(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
374 extern int hlineRGBAStore(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
375 extern int hlineColor(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
376 extern int hlineRGBA(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
377 extern int vlineColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 y2, Uint32 color);
378 extern int vlineRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
379 extern int rectangleColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint32 color);
380 extern int rectangleRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
381 extern int roundedRectangleColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
382 extern int roundedRectangleRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
383 extern int roundedBoxColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
384 extern int roundedBoxRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
385 extern int boxColor(SDL_Surface *dst, Sint16 xx, Sint16 yy, Sint16 x2, Sint16 y2, Uint32 color);
386 extern int boxRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
387 extern int lineColor(SDL_Surface *dst, Sint16 xx, Sint16 yy, Sint16 x2, Sint16 y2, Uint32 color);
388 extern int lineRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
389 extern int _aalineColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint);
390 extern int aalineColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint32 color);
391 extern int aalineRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
392 extern int circleColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
393 extern int circleRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
394 extern int arcColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color);
395 extern int arcRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
396 extern int aacircleColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
397 extern int aacircleRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
398 extern int filledCircleColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
399 extern int filledCircleRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
400 extern int ellipseColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
401 extern int ellipseRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
402 extern int aaellipseColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
403 extern int aaellipseRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
404 extern int filledEllipseColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
405 extern int filledEllipseRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
406 extern int _pieColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color, Uint8 filled);
407 extern int pieColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color);
408 extern int pieRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
409 extern int filledPieColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color);
410 extern int filledPieRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
411 extern int trigonColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
412 extern int trigonRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
413 extern int aatrigonColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
414 extern int aatrigonRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
415 extern int filledTrigonColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
416 extern int filledTrigonRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
417 extern int polygonColor(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color);
418 extern int polygonRGBA(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
419 extern int aapolygonColor(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color);
420 extern int aapolygonRGBA(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
421 extern int _gfxPrimitivesCompareInt(const void *a, const void *b);
422 extern int filledPolygonColorMT(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color, int **polyInts, int *polyAllocated);
423 extern int filledPolygonRGBAMT(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated);
424 extern int filledPolygonColor(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color);
425 extern int filledPolygonRGBA(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
426 extern int _HLineTextured(SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, SDL_Surface *texture, int texture_dx, int texture_dy);
427 extern int texturedPolygonMT(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated);
428 extern int texturedPolygon(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy);
429 extern double _evaluateBezier(double *data, int ndata, double t);
430 extern int bezierColor(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color);
431 extern int bezierRGBA(SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
432 extern int thickLineColor(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color);
433 extern int thickLineRGBA(SDL_Surface *dst, Sint16 x, Sint16 y, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
434 /* src/gui/toolkit/SDL_rotozoom.c */
435 extern Uint32 _colorkey(SDL_Surface *src);
436 extern int _shrinkSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory);
437 extern int _shrinkSurfaceY(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory);
438 extern int _zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth);
439 extern int _zoomSurfaceY(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy);
440 extern void _transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth);
441 extern void transformSurfaceY(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy);
442 extern SDL_Surface *rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns);
443 extern void _rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom);
444 extern void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight);
445 extern void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight);
446 extern SDL_Surface *rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth);
447 extern SDL_Surface *rotozoomSurfaceXY(SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth);
448 extern void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight);
449 extern SDL_Surface *zoomSurface(SDL_Surface *src, double zoomx, double zoomy, int smooth);
450 extern SDL_Surface *shrinkSurface(SDL_Surface *src, int factorx, int factory);
451 /* src/gui/toolkit/button.c */
452 extern void button_init(void);
453 extern void button_create(button_struct *button);
454 extern void button_destroy(button_struct *button);
455 extern void button_set_parent(button_struct *button, int px, int py);
456 extern void button_set_font(button_struct *button, font_struct *font);
457 extern int button_need_redraw(button_struct *button);
458 extern void button_show(button_struct *button, const char *text);
459 extern int button_event(button_struct *button, SDL_Event *event);
460 /* src/gui/toolkit/color_picker.c */
461 extern void color_picker_create(color_picker_struct *color_picker, int size);
462 extern void color_picker_set_parent(color_picker_struct *color_picker, int px, int py);
463 extern void color_picker_set_notation(color_picker_struct *color_picker, const char *color_notation);
464 extern void color_picker_get_rgb(color_picker_struct *color_picker, uint8_t *r, uint8_t *g, uint8_t *b);
465 extern void color_picker_show(SDL_Surface *surface, color_picker_struct *color_picker);
466 extern int color_picker_event(color_picker_struct *color_picker, SDL_Event *event);
467 extern int color_picker_mouse_over(color_picker_struct *color_picker, int mx, int my);
468 /* src/gui/toolkit/list.c */
469 extern void list_set_parent(list_struct *list, int px, int py);
470 extern list_struct *list_create(uint32_t max_rows, uint32_t cols, int spacing);
471 extern void list_add(list_struct *list, uint32_t row, uint32_t col, const char *str);
472 extern void list_remove_row(list_struct *list, uint32_t row);
473 extern void list_set_column(list_struct *list, uint32_t col, int width, int spacing, const char *name, int centered);
474 extern void list_set_font(list_struct *list, font_struct *font);
475 extern void list_scrollbar_enable(list_struct *list);
476 extern int list_need_redraw(list_struct *list);
477 extern void list_show(list_struct *list, int x, int y);
478 extern void list_clear_rows(list_struct *list);
479 extern void list_clear(list_struct *list);
480 extern void list_offsets_ensure(list_struct *list);
481 extern void list_remove(list_struct *list);
482 extern void list_scroll(list_struct *list, int up, int scroll);
483 extern int list_handle_keyboard(list_struct *list, SDL_Event *event);
484 extern int list_handle_mouse(list_struct *list, SDL_Event *event);
485 extern int list_mouse_get_pos(list_struct *list, int mx, int my, uint32_t *row, uint32_t *col);
486 extern void list_sort(list_struct *list, int type);
487 extern int list_set_selected(list_struct *list, const char *str, uint32_t col);
488 extern const char *list_get_selected(list_struct *list, uint32_t col);
489 /* src/gui/toolkit/popup.c */
490 extern popup_struct *popup_create(texture_struct *texture);
491 extern void popup_destroy(popup_struct *popup);
492 extern void popup_destroy_all(void);
493 extern void popup_render(popup_struct *popup);
494 extern void popup_render_all(void);
495 extern int popup_handle_event(SDL_Event *event);
496 extern popup_struct *popup_get_head(void);
497 extern void popup_button_set_text(popup_button *button, const char *text);
498 extern int popup_need_redraw(void);
499 /* src/gui/toolkit/progress.c */
501 extern void progress_dots_show(progress_dots *progress, SDL_Surface *surface, int x, int y);
503 /* src/gui/toolkit/range_buttons.c */
504 extern int range_buttons_show(int x, int y, int *val, int advance);
505 /* src/gui/toolkit/scrollbar.c */
506 extern void scrollbar_init(void);
508 extern void scrollbar_create(scrollbar_struct *scrollbar, int w, int h, uint32_t *scroll_offset, uint32_t *num_lines, uint32_t max_lines);
510 extern void scrollbar_scroll_to(scrollbar_struct *scrollbar, int scroll);
511 extern void scrollbar_scroll_adjust(scrollbar_struct *scrollbar, int adjust);
512 extern void scrollbar_show(scrollbar_struct *scrollbar, SDL_Surface *surface, int x, int y);
513 extern int scrollbar_event(scrollbar_struct *scrollbar, SDL_Event *event);
515 /* src/gui/toolkit/text.c */
516 extern font_struct *font_get_weak(const char *name, uint8_t size);
517 extern font_struct *font_get(const char *name, uint8_t size);
518 extern font_struct *font_get_size(font_struct *font, int8_t size);
519 extern void font_free(font_struct *font);
520 extern void font_gc(void);
521 extern void text_init(void);
522 extern void text_deinit(void);
523 extern void text_offset_set(int x, int y);
524 extern void text_offset_reset(void);
525 extern void text_color_set(int r, int g, int b);
526 extern void text_set_selection(int64_t *start, int64_t *end, uint8_t *started);
528 extern void text_set_anchor_info(void *ptr);
529 extern char *text_strip_markup(char *buf, size_t *buf_len, uint8_t do_free);
530 extern char *text_escape_markup(const char *buf);
531 extern int text_color_parse(const char *color_notation, SDL_Color *color);
532 extern void text_anchor_execute(text_info_struct *info, void *custom_data);
533 extern void text_show_character_init(text_info_struct *info);
534 extern int text_show_character(font_struct **font, font_struct *orig_font, SDL_Surface *surface, SDL_Rect *dest, const char *cp, SDL_Color *color, SDL_Color *orig_color, uint64_t flags, SDL_Rect *box, int *x_adjust, text_info_struct *info);
535 extern int glyph_get_width(font_struct *font, char c);
536 extern int glyph_get_height(font_struct *font, char c);
537 extern void text_show(SDL_Surface *surface, font_struct *font, const char *text, int x, int y, const char *color_notation, uint64_t flags, SDL_Rect *box);
538 extern void text_show_shadow(SDL_Surface *surface, font_struct *font, const char *text, int x, int y, const char *color_notation, const char *color_shadow_notation, uint64_t flags, SDL_Rect *box);
539 extern void text_show_format(SDL_Surface *surface, font_struct *font, int x, int y, const char *color_notation, uint64_t flags, SDL_Rect *box, const char *format, ...) __attribute__((format(printf, 8, 9)));
540 extern void text_show_shadow_format(SDL_Surface *surface, font_struct *font, int x, int y, const char *color_notation, const char *color_shadow_notation, uint64_t flags, SDL_Rect *box, const char *format, ...) __attribute__((format(printf, 9, 10)));
541 extern int text_get_width(font_struct *font, const char *text, uint64_t flags);
542 extern int text_get_height(font_struct *font, const char *text, uint64_t flags);
543 extern void text_get_width_height(font_struct *font, const char *text, uint64_t flags, SDL_Rect *box, uint16_t *w, uint16_t *h);
544 extern void text_truncate_overflow(font_struct *font, char *text, int max_width);
545 extern void text_anchor_parse(text_info_struct *info, const char *text);
546 extern void text_enable_debug(void);
547 /* src/gui/toolkit/text_input.c */
548 extern text_input_history_struct *text_input_history_create(void);
549 extern void text_input_history_free(text_input_history_struct *history);
550 extern void text_input_create(text_input_struct *text_input);
551 extern void text_input_destroy(text_input_struct *text_input);
552 extern void text_input_set_font(text_input_struct *text_input, font_struct *font);
553 extern void text_input_reset(text_input_struct *text_input);
554 extern void text_input_set_history(text_input_struct *text_input, text_input_history_struct *history);
555 extern void text_input_set(text_input_struct *text_input, const char *str);
556 extern void text_input_set_parent(text_input_struct *text_input, int px, int py);
557 extern int text_input_mouse_over(text_input_struct *text_input, int mx, int my);
558 extern void text_input_show_edit_password(text_input_struct *text_input);
559 extern int text_input_number_character_check(text_input_struct *text_input, char c);
560 extern void text_input_show(text_input_struct *text_input, SDL_Surface *surface, int x, int y);
561 extern void text_input_add_char(text_input_struct *text_input, char c);
562 extern int text_input_event(text_input_struct *text_input, SDL_Event *event);
563 /* src/gui/toolkit/tooltip.c */
564 extern void tooltip_create(int mx, int my, font_struct *font, const char *text);
565 extern void tooltip_enable_delay(uint32_t delay);
566 extern void tooltip_multiline(int max_width);
567 extern void tooltip_show(void);
568 extern void tooltip_dismiss(void);
569 extern int tooltip_need_redraw(void);
570 /* src/gui/toolkit/widget.c */
573 extern int widget_id_from_name(const char *name);
574 extern void toolkit_widget_init(void);
575 extern void menu_container_move(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
576 extern void menu_container_detach(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
577 extern void menu_container_attach(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
578 extern void menu_container_background_change(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
579 extern void menu_container_background(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
580 extern void widget_menu_standard_items(widgetdata *widget, widgetdata *menu);
581 extern widgetdata *create_widget_object(int widget_subtype_id);
582 extern void remove_widget_object(widgetdata *widget);
583 extern void remove_widget_object_intern(widgetdata *widget);
584 extern void remove_widget_inv(widgetdata *widget);
585 extern void kill_widgets(void);
586 extern void widgets_reset(void);
587 extern int widget_x(const widgetdata *widget);
588 extern int widget_y(const widgetdata *widget);
589 extern int widget_w(const widgetdata *widget);
590 extern int widget_h(const widgetdata *widget);
591 extern bool widget_set_zoom(widgetdata *widget, double zoom);
592 extern void widgets_ensure_onscreen(void);
593 extern void kill_widget_tree(widgetdata *widget);
594 extern widgetdata *create_widget(int widget_id);
595 extern void remove_widget(widgetdata *widget);
596 extern void detach_widget(widgetdata *widget);
597 extern void toolkit_widget_deinit(void);
598 extern int widgets_event(SDL_Event *event);
599 extern int widget_event_start_move(widgetdata *widget);
600 extern int widget_event_move_stop(int x, int y);
601 extern int widget_event_respond(int x, int y);
602 extern widgetdata *get_widget_owner(int x, int y, widgetdata *start, widgetdata *end);
603 extern widgetdata *get_widget_owner_rec(int x, int y, widgetdata *widget, widgetdata *end);
604 extern int widgets_need_redraw(void);
605 extern void process_widgets(int draw);
606 extern void SetPriorityWidget(widgetdata *node);
607 extern void SetPriorityWidget_reverse(widgetdata *node);
608 extern void insert_widget_in_container(widgetdata *widget_container, widgetdata *widget, int absolute);
610 extern widgetdata *get_innermost_container(widgetdata *widget);
611 extern widgetdata *widget_find(widgetdata *where, int type, const char *id, SDL_Surface *surface);
612 extern widgetdata *widget_find_create_id(int type, const char *id);
613 extern void widget_switch_focus(int type, const char *id);
614 extern void move_widget(widgetdata *widget, int x, int y);
615 extern void move_widget_rec(widgetdata *widget, int x, int y);
616 extern void resize_widget(widgetdata *widget, int side, int offset);
617 extern void resize_widget_rec(widgetdata *widget, int x, int width, int y, int height);
618 extern widgetdata *add_label(const char *text, font_struct *font, const char *color);
619 extern widgetdata *add_texture(const char *texture);
620 extern widgetdata *create_menu(int x, int y, widgetdata *owner);
621 extern void add_menuitem(widgetdata *menu, const char *text, void (*menu_func_ptr)(widgetdata *, widgetdata *, SDL_Event *event), int menu_type, int val);
622 extern void add_separator(widgetdata *widget);
623 extern void menu_finalize(widgetdata *widget);
624 extern void widget_redraw_all(int widget_type_id);
625 extern void widget_redraw_type_id(int type, const char *id);
626 extern void widget_show(widgetdata *widget, int show);
627 extern void widget_show_toggle_all(int type_id);
628 extern void menu_move_widget(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
629 extern void menu_create_widget(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
630 extern void menu_remove_widget(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
631 extern void menu_detach_widget(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
632 extern void menu_inventory_submenu_quickslots(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
633 extern void widget_render_enable_debug(void);
634 /* src/gui/widgets/active_effects.c */
635 extern void widget_active_effects_update(widgetdata *widget, object *op, int32_t sec, const char *msg);
636 extern void widget_active_effects_remove(widgetdata *widget, object *op);
637 extern void widget_active_effects_init(widgetdata *widget);
638 /* src/gui/widgets/buddy.c */
639 extern void widget_buddy_add(widgetdata *widget, const char *name, uint8_t sort);
640 extern void widget_buddy_remove(widgetdata *widget, const char *name);
641 extern ssize_t widget_buddy_check(widgetdata *widget, const char *name);
642 extern void widget_buddy_init(widgetdata *widget);
643 /* src/gui/widgets/container.c */
644 extern void widget_container_init(widgetdata *widget);
645 /* src/gui/widgets/fps.c */
646 extern void widget_fps_init(widgetdata *widget);
647 /* src/gui/widgets/input.c */
648 extern void widget_input_init(widgetdata *widget);
649 /* src/gui/widgets/inventory.c */
650 extern uint64_t inventory_filter;
651 extern const char *inventory_filter_names[7];
652 extern void inventory_filter_set(uint64_t filter);
653 extern void inventory_filter_toggle(uint64_t filter);
654 extern void inventory_filter_set_names(const char *filter);
655 extern void widget_inventory_init(widgetdata *widget);
656 extern uint32_t widget_inventory_num_items(widgetdata *widget);
657 extern object *widget_inventory_get_selected(widgetdata *widget);
658 extern void widget_inventory_handle_arrow_key(widgetdata *widget, SDLKey key);
659 extern void object_show_inventory(SDL_Surface *surface, object *tmp, int x, int y);
660 extern void menu_inventory_drop(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
661 extern void menu_inventory_dropall(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
662 extern void menu_inventory_get(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
663 extern void menu_inventory_getall(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
664 extern void menu_inventory_examine(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
665 extern void menu_inventory_loadtoconsole(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
666 extern void menu_inventory_patch(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
667 extern void menu_inventory_mark(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
668 extern void menu_inventory_lock(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
669 extern void menu_inventory_drag(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
670 extern void widget_inventory_handle_apply(widgetdata *widget);
671 extern void menu_inv_filter(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
672 extern void menu_inv_filter_submenu(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
673 extern void menu_inventory_submenu_more(widgetdata *widget, widgetdata *menuitem, SDL_Event *event);
674 /* src/gui/widgets/label.c */
675 extern void widget_label_init(widgetdata *widget);
676 /* src/gui/widgets/map.c */
677 extern _mapdata MapData;
678 extern _multi_part_obj MultiArchs[16];
679 extern struct map_anim *map_anims_add(int type, int mapx, int mapy, int sub_layer, int value);
680 extern void maps_anims_remove(map_anim_t *anim);
681 extern void map_anims_mapscroll(int xoff, int yoff);
682 extern void map_anims_clear(void);
683 extern void map_anims_play(void);
684 extern int map_anims_need_redraw(void);
685 extern void load_mapdef_dat(void);
686 extern void clear_map(_Bool hard);
687 extern void map_update_size(int w, int h);
688 extern void display_mapscroll(int dx, int dy, int old_w, int old_h);
689 extern void update_map_name(const char *name);
690 extern void update_map_weather(const char *weather);
691 extern void update_map_height_diff(uint8_t height_diff);
692 extern void update_map_region_name(const char *region_name);
693 extern void update_map_region_longname(const char *region_longname);
694 extern void update_map_path(const char *map_path);
695 extern void map_update_in_building(uint8_t in_building);
696 extern int map_get_player_direction(void);
697 extern void map_get_real_coords(int *x, int *y);
698 extern void init_map_data(int xl, int yl, int px, int py);
699 extern void adjust_tile_stretch(void);
700 extern void map_set_data(int x, int y, int layer, int16_t face, uint8_t quick_pos, uint8_t obj_flags, const char *name, const char *name_color, int16_t height, uint8_t probe, int16_t zoom_x, int16_t zoom_y, int16_t align, uint8_t draw_double, uint8_t alpha, int16_t rotate, uint8_t infravision, uint32_t target_object_count, uint8_t target_is_friend, uint8_t anim_speed, uint8_t anim_facing, uint8_t anim_flags, uint8_t anim_state, uint8_t priority, uint8_t secondpass, const char *glow, uint8_t glow_speed);
701 extern void map_clear_cell(int x, int y);
702 extern void map_set_darkness(int x, int y, int sub_layer, uint8_t darkness);
703 extern void map_animate(void);
704 extern void map_draw_map(SDL_Surface *surface);
705 extern void map_draw_one(int x, int y, SDL_Surface *surface);
706 extern void map_target_handle(uint8_t is_friend);
707 extern bool mouse_to_tile_coords(int mx, int my, int *tx, int *ty);
708 extern bool map_mouse_fire(void);
709 extern void widget_map_init(widgetdata *widget);
710 /* src/gui/widgets/mapname.c */
711 extern void widget_mapname_init(widgetdata *widget);
712 /* src/gui/widgets/menu.c */
713 extern void widget_highlight_menu(widgetdata *widget);
714 /* src/gui/widgets/menu_buttons.c */
715 extern void widget_menu_buttons_init(widgetdata *widget);
716 /* src/gui/widgets/minimap.c */
717 extern void widget_minimap_init(widgetdata *widget);
718 /* src/gui/widgets/mplayer.c */
719 extern void widget_mplayer_init(widgetdata *widget);
720 /* src/gui/widgets/notification.c */
721 extern void notification_destroy(void);
722 extern int notification_keybind_check(const char *cmd);
723 extern void socket_command_notification(uint8_t *data, size_t len, size_t pos);
724 extern void widget_notification_init(widgetdata *widget);
725 /* src/gui/widgets/party.c */
726 extern void socket_command_party(uint8_t *data, size_t len, size_t pos);
727 extern void widget_party_init(widgetdata *widget);
728 /* src/gui/widgets/playerdoll.c */
729 extern object *playerdoll_get_equipment(int i, int *xpos, int *ypos);
730 extern void widget_playerdoll_init(widgetdata *widget);
731 /* src/gui/widgets/playerinfo.c */
732 extern void widget_playerinfo_init(widgetdata *widget);
733 /* src/gui/widgets/protections.c */
734 extern void widget_protections_init(widgetdata *widget);
735 /* src/gui/widgets/quickslots.c */
736 extern void quickslots_init(void);
737 extern void quickslots_scroll(widgetdata *widget, int up, int scroll);
738 extern void quickslots_cycle(widgetdata *widget);
739 extern void quickslots_handle_key(int slot);
740 extern void widget_quickslots_init(widgetdata *widget);
741 extern void socket_command_quickslots(uint8_t *data, size_t len, size_t pos);
742 /* src/gui/widgets/skills.c */
743 extern void skills_init(void);
744 extern void skills_deinit(void);
745 extern int skill_find(const char *name, size_t *id);
746 extern int skill_find_object(object *op, size_t *id);
747 extern skill_entry_struct *skill_get(size_t id);
748 extern void skills_update(object *op, uint8_t level, int64_t xp, const char *msg);
749 extern void skills_remove(object *op);
750 extern void widget_skills_init(widgetdata *widget);
751 /* src/gui/widgets/spells.c */
752 extern void spells_init(void);
753 extern void spells_deinit(void);
754 extern int spell_find(const char *name, size_t *spell_path, size_t *spell_id);
755 extern int spell_find_object(object *op, size_t *spell_path, size_t *spell_id);
756 extern spell_entry_struct *spell_get(size_t spell_path, size_t spell_id);
757 extern void spells_update(object *op, uint16_t cost, uint32_t path, uint32_t flags, const char *msg);
758 extern void spells_remove(object *op);
759 extern void widget_spells_init(widgetdata *widget);
760 /* src/gui/widgets/stat.c */
761 extern void widget_stat_init(widgetdata *widget);
762 /* src/gui/widgets/target.c */
763 extern void widget_target_init(widgetdata *widget);
764 /* src/gui/widgets/texture.c */
765 extern void widget_texture_init(widgetdata *widget);
766 /* src/gui/widgets/textwin.c */
767 extern const char *const textwin_tab_names[];
768 extern const char *const textwin_tab_commands[];
769 extern void textwin_readjust(widgetdata *widget);
770 extern size_t textwin_tab_name_to_id(const char *name);
771 extern void textwin_tab_free(textwin_tab_struct *tab);
772 extern void textwin_tab_remove(widgetdata *widget, const char *name);
773 extern void textwin_tab_add(widgetdata *widget, const char *name);
774 extern int textwin_tab_find(widgetdata *widget, uint8_t type, const char *name, size_t *id);
775 extern void textwin_tab_open(widgetdata *widget, const char *name);
776 extern void draw_info_tab(size_t type, const char *color, const char *str);
777 extern void draw_info_format(const char *color, const char *format, ...) __attribute__((format(printf, 2, 3)));
778 extern void draw_info(const char *color, const char *str);
779 extern void textwin_handle_copy(widgetdata *widget);
780 extern void textwin_show(SDL_Surface *surface, int x, int y, int w, int h);
781 extern int textwin_tabs_height(widgetdata *widget);
782 extern void textwin_create_scrollbar(widgetdata *widget);
783 extern void widget_textwin_init(widgetdata *widget);
784 extern void widget_textwin_handle_console(const char *text);
785 #endif
void sound_ambient_mapcroll(int xoff, int yoff)
Definition: sound.c:809
const char * sound_get_bg_music_basename(void)
Definition: sound.c:587
void mkdir_ensure(const char *path)
Definition: wrapper.c:130
const char * gender_subjective[GENDER_MAX]
Definition: player.c:49
void socket_command_map(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:648
void scrollbar_scroll_to(scrollbar_struct *scrollbar, int scroll)
Definition: scrollbar.c:397
uint8_t sound_map_background(int val)
Definition: sound.c:608
void system_end(void)
Definition: wrapper.c:51
void server_settings_deinit(void)
void sound_update_volume(void)
Definition: sound.c:547
int(* text_anchor_handle_func)(const char *anchor_action, const char *buf, size_t len, void *custom_data)
Definition: text.h:348
void surface_show_effects(SDL_Surface *surface, int x, int y, SDL_Rect *srcrect, SDL_Surface *src, const sprite_effects_t *effects)
Definition: sprite.c:830
void display_mapscroll(int dx, int dy, int old_w, int old_h)
Definition: map.c:220
void scrollbar_init()
Definition: scrollbar.c:44
void characters_open(void)
Definition: characters.c:501
void keybind_save(void)
Definition: keybind.c:122
void sound_music_seek(uint32_t offset)
Definition: sound.c:669
list_struct * list_create(uint32_t max_rows, uint32_t cols, int spacing)
Definition: list.c:113
void quickslots_init(void)
Definition: quickslots.c:46
server_struct * selected_server
Definition: main.c:54
void client_socket_close(client_socket_t *csock)
Definition: socket.c:429
void copy_pixel_to_pixel(SDL_Surface *src, SDL_Surface *dest, int x, int y, int x2, int y2, double brightness)
void remove_widget_object(widgetdata *widget)
Definition: widget.c:460
void hfiles_deinit(void)
Definition: help.c:70
int widget_y(const widgetdata *widget)
Definition: widget.c:633
void socket_command_mapstats(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:618
void kill_widgets(void)
Definition: widget.c:573
void textwin_show(SDL_Surface *surface, int x, int y, int w, int h)
Definition: textwin.c:523
void effects_deinit(void)
Definition: effects.c:267
void init_keys(void)
Definition: keys.c:37
object * object_find_object(object *op, tag_t tag)
Definition: item.c:116
void remove_widget(widgetdata *widget)
Definition: widget.c:899
void keybind_process(keybind_struct *keybind, uint8_t type)
Definition: keybind.c:467
void hfiles_init(void)
Definition: help.c:89
int text_color_parse(const char *color_notation, SDL_Color *color)
Definition: text.c:603
static scrollbar_struct scrollbar
Definition: book.c:50
void settings_init(void)
Definition: settings.c:96
void list_vid_modes(void)
Definition: main.c:404
void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
Definition: sprite.c:950
void rectangle_create(SDL_Surface *surface, int x, int y, int w, int h, const char *color_notation)
Definition: sprite.c:1443
void widgets_reset(void)
Definition: widget.c:590
void adjust_tile_stretch(void)
Definition: map.c:624
uint64_t inventory_filter
Definition: inventory.c:38
void book_add_help_history(const char *name)
Definition: book.c:296
void text_set_selection(int64_t *start, int64_t *end, uint8_t *started)
Definition: text.c:425
void menu_inventory_lock(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1223
int effect_start(const char *name)
Definition: effects.c:612
void read_anims(void)
Definition: animations.c:35
void object_show_inventory(SDL_Surface *surface, object *tmp, int x, int y)
Definition: inventory.c:870
void notification_destroy(void)
Definition: notification.c:51
FILE * server_file_open(server_files_struct *tmp)
Definition: server_files.c:417
void widget_inventory_init(widgetdata *widget)
Definition: inventory.c:695
void effects_init(void)
Definition: effects.c:46
void update_map_name(const char *name)
Definition: map.c:271
void widget_active_effects_init(widgetdata *widget)
void map_anims_mapscroll(int xoff, int yoff)
Definition: map.c:2568
void text_deinit(void)
Definition: text.c:347
void draw_info(const char *color, const char *str)
Definition: textwin.c:448
ssize_t widget_buddy_check(widgetdata *widget, const char *name)
Definition: buddy.c:160
const char * gender_noun[GENDER_MAX]
Definition: player.c:43
Definition: map.h:304
_anim_table * anim_table
Definition: main.c:68
void widget_stat_init(widgetdata *widget)
Definition: stat.c:282
void sound_start_bg_music(const char *filename, int volume, int loop)
Definition: sound.c:412
void copy_if_exists(const char *from, const char *to, const char *src, const char *dst)
Definition: wrapper.c:194
void metaserver_get_servers(void)
Definition: metaserver.c:801
void list_remove(list_struct *list)
Definition: list.c:522
struct map_anim * map_anims_add(int type, int mapx, int mapy, int sub_layer, int value)
Definition: map.c:2501
void load_mapdef_dat(void)
Definition: map.c:109
void menu_inventory_drop(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:938
void update_map_height_diff(uint8_t height_diff)
Definition: map.c:289
uint8_t effect_has_overlay(void)
Definition: effects.c:704
SDL_Surface * texture_surface(texture_struct *texture)
Definition: texture.c:303
void skills_deinit(void)
Definition: skills.c:76
hfile_struct * help_find(const char *name)
Definition: help.c:205
void sound_play_effect(const char *filename, int volume)
Definition: sound.c:367
void menu_inventory_drag(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1252
void menu_inventory_loadtoconsole(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1143
void cmd_aliases_deinit(void)
Definition: cmd_aliases.c:174
void new_player(tag_t tag, long weight, short face)
Definition: player.c:107
bool server_file_save(server_files_struct *tmp, unsigned char *data, size_t len)
Definition: server_files.c:455
void animate_objects(void)
Definition: item.c:510
int button_event(button_struct *button, SDL_Event *event)
Definition: button.c:222
void socket_thread_stop(void)
Definition: socket.c:385
object * object_create(object *env, tag_t tag, int bflag)
Definition: item.c:327
void check_animation_status(int anum)
Definition: client.c:150
font_struct * font_get_size(font_struct *font, int8_t size)
Definition: text.c:242
uint32_t get_video_flags(void)
Definition: video.c:365
void list_clear(list_struct *list)
Definition: list.c:486
void list_set_column(list_struct *list, uint32_t col, int width, int spacing, const char *name, int centered)
Definition: list.c:242
object * widget_inventory_get_selected(widgetdata *widget)
Definition: inventory.c:750
server_files_struct * server_files_create(const char *name)
Definition: server_files.c:116
void sound_resume_music(void)
Definition: sound.c:511
void menu_inv_filter_submenu(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1332
bool map_mouse_fire(void)
Definition: map.c:2173
void button_destroy(button_struct *button)
Definition: button.c:94
int map_anims_need_redraw(void)
Definition: map.c:2671
void socket_command_setup(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:47
void widget_notification_init(widgetdata *widget)
Definition: notification.c:287
int widgets_need_redraw(void)
Definition: widget.c:1661
void settings_apply_change(void)
Definition: settings.c:572
int video_fullscreen_toggle(SDL_Surface **surface, uint32_t *flags)
Definition: video.c:392
object * object_find_object_inv(object *op, tag_t tag)
Definition: item.c:96
int list_handle_mouse(list_struct *list, SDL_Event *event)
Definition: list.c:698
void text_show(SDL_Surface *surface, font_struct *font, const char *text, int x, int y, const char *color_notation, uint64_t flags, SDL_Rect *box)
Definition: text.c:1983
void list_add(list_struct *list, uint32_t row, uint32_t col, const char *str)
Definition: list.c:163
void credits_show(void)
Definition: credits.c:81
void text_show_character_init(text_info_struct *info)
Definition: text.c:704
void socket_command_item(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:494
void intro_show(void)
Definition: intro.c:174
void key_handle_event(SDL_KeyboardEvent *event)
Definition: keys.c:47
int tooltip_need_redraw(void)
Definition: tooltip.c:196
Uint32 getpixel(SDL_Surface *surface, int x, int y)
Definition: sprite.c:910
int sound_playing_music(void)
Definition: sound.c:903
void draw_frame(SDL_Surface *surface, int x, int y, int w, int h)
Definition: sprite.c:1185
bool metaserver_cert_verify_host(server_struct *server, const char *host)
Definition: metaserver.c:591
void sound_background_hook_register(void *ptr)
Definition: sound.c:238
void button_init()
Definition: button.c:37
void widget_buddy_remove(widgetdata *widget, const char *name)
Definition: buddy.c:126
void socket_command_crypto(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:1527
texture_type_t
Definition: texture.h:36
void DoClient(void)
Definition: client.c:89
struct sockaddr_in insock
Definition: main.c:49
SDL_Surface * FormatHolder
Definition: sprite.c:46
void setting_set_int(int cat, int setting, int64_t val)
Definition: settings.c:592
void widget_buddy_init(widgetdata *widget)
Definition: buddy.c:477
struct screensize * Screensize
Definition: main.c:74
int client_command_check(const char *cmd)
Definition: menu.c:44
int scrollbar_need_redraw(scrollbar_struct *scrollbar)
Definition: scrollbar.c:267
void cmd_aliases_init(void)
Definition: cmd_aliases.c:165
void menu_inventory_dropall(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1004
void setting_set_str(int cat, int setting, const char *val)
Definition: settings.c:616
void text_init(void)
Definition: text.c:336
void metaserver_init(void)
Definition: metaserver.c:86
server_settings * s_settings
uint32_t sound_music_get_duration()
Definition: sound.c:691
void menu_inventory_getall(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1104
bool client_socket_open(client_socket_t *csock, const char *host, int port, bool secure)
Definition: socket.c:477
int intro_event(SDL_Event *event)
Definition: intro.c:408
int widget_event_respond(int x, int y)
Definition: widget.c:1546
void map_clear_cell(int x, int y)
Definition: map.c:786
void menu_finalize(widgetdata *widget)
Definition: widget.c:2524
int64_t category_from_name(const char *name)
Definition: settings.c:654
void tooltip_create(int mx, int my, font_struct *font, const char *text)
Definition: tooltip.c:60
int spell_find_object(object *op, size_t *spell_path, size_t *spell_id)
Definition: spells.c:230
void inventory_filter_set(uint64_t filter)
Definition: inventory.c:116
void widget_texture_init(widgetdata *widget)
Definition: texture.c:50
void widget_protections_init(widgetdata *widget)
Definition: protections.c:88
void menu_inventory_patch(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1169
void keybind_state_ensure(void)
Definition: keybind.c:535
void map_set_data(int x, int y, int layer, int16_t face, uint8_t quick_pos, uint8_t obj_flags, const char *name, const char *name_color, int16_t height, uint8_t probe, int16_t zoom_x, int16_t zoom_y, int16_t align, uint8_t draw_double, uint8_t alpha, int16_t rotate, uint8_t infravision, uint32_t target_object_count, uint8_t target_is_friend, uint8_t anim_speed, uint8_t anim_facing, uint8_t anim_flags, uint8_t anim_state, uint8_t priority, uint8_t secondpass, const char *glow, uint8_t glow_speed)
Definition: map.c:675
void socket_command_file_update(uint8_t *data, size_t len, size_t pos)
Definition: updates.c:61
int skill_find(const char *name, size_t *id)
Definition: skills.c:217
void socket_command_notification(uint8_t *data, size_t len, size_t pos)
Definition: notification.c:106
void socket_command_sound_ambient(uint8_t *data, size_t len, size_t pos)
Definition: sound.c:844
void text_offset_reset(void)
Definition: text.c:391
SDL_Surface * tile_stretch(SDL_Surface *src, int n, int e, int s, int w)
static text_input_struct text_input
Definition: interface.c:59
void quickslots_handle_key(int slot)
Definition: quickslots.c:230
void textwin_readjust(widgetdata *widget)
Definition: textwin.c:53
void effect_free(effect_struct *effect)
Definition: effects.c:335
int polygon_check_coords(double x, double y, double corners_x[], double corners_y[], int corners_num)
Definition: sprite.c:1523
void sound_ambient_clear(void)
Definition: sound.c:833
texture_struct * texture_get(texture_type_t type, const char *name)
Definition: texture.c:279
void font_free(font_struct *font)
Definition: text.c:262
void sound_clear_cache(void)
Definition: sound.c:305
void object_transfer_inventory(object *op, object *to)
Definition: item.c:295
font_struct * font_get(const char *name, uint8_t size)
Definition: text.c:216
void socket_command_book(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:40
void progress_dots_create(progress_dots *progress)
Definition: progress.c:39
skill_entry_struct * skill_get(size_t id)
Definition: skills.c:246
const char * effect_overlay_identifier(void)
Definition: effects.c:718
TTF_Font * TTF_OpenFont_wrapper(const char *file, int ptsize)
Definition: wrapper.c:545
void menu_inventory_get(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1019
int range_buttons_show(int x, int y, int *val, int advance)
Definition: range_buttons.c:54
void widget_party_init(widgetdata *widget)
Definition: party.c:420
int add_color_to_surface(SDL_Surface *dest, Uint8 red, Uint8 green, Uint8 blue)
SDL_Surface * ScreenSurface
Definition: main.c:47
int object_animate(object *ob)
Definition: item.c:442
void keepalive_ping_stats(void)
Definition: main.c:148
void(* event_drag_cb_fnc)(void)
Definition: event.h:43
void SetPriorityWidget_reverse(widgetdata *node)
Definition: widget.c:1902
void texture_init(void)
Definition: texture.c:176
void send_command(const char *command)
Definition: player.c:175
int keybind_command_matches_state(const char *cmd)
Definition: keybind.c:414
void browser_open(const char *url)
Definition: misc.c:37
void copy_file(const char *filename, const char *filename_out)
Definition: wrapper.c:153
void remove_widget_inv(widgetdata *widget)
Definition: widget.c:553
void socket_command_compressed(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:931
void server_add_open(void)
Definition: server_add.c:132
void list_scroll(list_struct *list, int up, int scroll)
Definition: list.c:564
char * package_get_version_partial(char *dst, size_t dstlen)
Definition: misc.c:89
void game_news_open(const char *title)
Definition: game_news.c:231
void effect_sprite_def_free(effect_sprite_def *sprite_def)
Definition: effects.c:349
void objects_deinit(void)
Definition: item.c:418
void server_files_listing_retrieve(void)
Definition: server_files.c:207
void update_map_region_longname(const char *region_longname)
Definition: map.c:314
char * file_path_player(const char *path)
Definition: wrapper.c:452
void tooltip_show(void)
Definition: tooltip.c:116
void help_handle_tabulator(text_input_struct *text_input)
Definition: help.c:249
void socket_command_item_update(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:567
void scrollbar_show(scrollbar_struct *scrollbar, SDL_Surface *surface, int x, int y)
Definition: scrollbar.c:443
int64_t setting_from_name(const char *name)
Definition: settings.c:676
FILE * server_file_open_name(const char *name)
Definition: server_files.c:437
int notification_keybind_check(const char *cmd)
Definition: notification.c:95
void toggle_locked(object *op)
Definition: item.c:347
void text_offset_set(int x, int y)
Definition: text.c:381
void socket_command_item_delete(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:585
void widget_render_enable_debug(void)
Definition: widget.c:2660
_mapdata MapData
Definition: map.c:64
void book_load(const char *data, int len)
Definition: book.c:209
void socket_command_anim(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:76
widgetdata * widget_find(widgetdata *where, int type, const char *id, SDL_Surface *surface)
Definition: widget.c:2091
bool mouse_to_tile_coords(int mx, int my, int *tx, int *ty)
Definition: map.c:2095
keybind_struct ** keybindings
Definition: keybind.c:53
client_socket_t csocket
Definition: main.c:51
void help_show(const char *name)
Definition: help.c:219
void socket_command_sound(uint8_t *data, size_t len, size_t pos)
Definition: sound.c:701
widgetdata * get_widget_owner(int x, int y, widgetdata *start, widgetdata *end)
Definition: widget.c:1563
void object_send_mark(object *op)
Definition: item.c:366
void sprite_init_system(void)
Definition: sprite.c:62
_multi_part_obj MultiArchs[16]
Definition: map.c:69
void widget_skills_init(widgetdata *widget)
Definition: skills.c:444
int video_get_bpp(void)
Definition: video.c:334
void server_files_init_all(void)
Definition: server_files.c:95
void map_target_handle(uint8_t is_friend)
Definition: map.c:2009
uint32_t widget_inventory_num_items(widgetdata *widget)
Definition: inventory.c:713
void socket_command_image(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:101
void * setting_get(setting_struct *setting)
Definition: settings.c:373
widgetdata * create_widget_object(int widget_subtype_id)
Definition: widget.c:414
void widget_playerinfo_init(widgetdata *widget)
Definition: playerinfo.c:127
void text_get_width_height(font_struct *font, const char *text, uint64_t flags, SDL_Rect *box, uint16_t *w, uint16_t *h)
Definition: text.c:2410
void widgets_ensure_onscreen(void)
Definition: widget.c:804
int widget_h(const widgetdata *widget)
Definition: widget.c:665
void socket_command_characters(uint8_t *data, size_t len, size_t pos)
Definition: characters.c:583
char * package_get_version_full(char *dst, size_t dstlen)
Definition: misc.c:69
void maps_anims_remove(map_anim_t *anim)
Definition: map.c:2552
font_struct * font_get_weak(const char *name, uint8_t size)
Definition: text.c:186
void list_remove_row(list_struct *list, uint32_t row)
Definition: list.c:198
void list_clear_rows(list_struct *list)
Definition: list.c:457
int text_get_height(font_struct *font, const char *text, uint64_t flags)
Definition: text.c:2364
void text_show_shadow_format(SDL_Surface *surface, font_struct *font, int x, int y, const char *color_notation, const char *color_shadow_notation, uint64_t flags, SDL_Rect *box, const char *format,...)
Definition: text.c:2305
void keybind_load(void)
Definition: keybind.c:60
void widget_container_init(widgetdata *widget)
Definition: container.c:142
server_struct * metaserver_add(const char *hostname, int port, int port_crypto, const char *name, const char *version, const char *desc)
Definition: metaserver.c:731
void system_start(void)
Definition: wrapper.c:38
void update_map_path(const char *map_path)
Definition: map.c:324
int sound_play_effect_loop(const char *filename, int volume, int loop)
Definition: sound.c:390
void list_offsets_ensure(list_struct *list)
Definition: list.c:501
void socket_command_player(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:346
SDL_Surface * IMG_Load_wrapper(const char *file)
Definition: wrapper.c:524
Client_Player cpl
Definition: client.c:50
void rmrf(const char *path)
Definition: wrapper.c:248
_face_struct FaceList[MAX_FACE_TILES]
Definition: main.c:77
char * keybind_get_key_shortcut(SDLKey key, SDLMod mod, char *buf, size_t len)
Definition: keybind.c:336
void scrollbar_info_create(scrollbar_info_struct *info)
Definition: scrollbar.c:382
void text_set_anchor_handle(text_anchor_handle_func func)
Definition: text.c:437
setting_category ** setting_categories
Definition: settings.c:43
int text_show_character(font_struct **font, font_struct *orig_font, SDL_Surface *surface, SDL_Rect *dest, const char *cp, SDL_Color *color, SDL_Color *orig_color, uint64_t flags, SDL_Rect *box, int *x_adjust, text_info_struct *info)
Definition: text.c:753
int list_need_redraw(list_struct *list)
Definition: list.c:315
void button_set_font(button_struct *button, font_struct *font)
Definition: button.c:114
void widget_show(widgetdata *widget, int show)
Definition: widget.c:2582
void text_truncate_overflow(font_struct *font, char *text, int max_width)
Definition: text.c:2446
void textwin_create_scrollbar(widgetdata *widget)
Definition: textwin.c:593
void menu_inventory_mark(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1194
void command_buffer_free(command_buffer *buf)
Definition: socket.c:88
void widget_label_init(widgetdata *widget)
Definition: label.c:64
void texture_delete(texture_struct *texture)
Definition: texture.c:208
sprite_struct * sprite_tryload_file(char *fname, uint32_t flag, SDL_RWops *rwop)
Definition: sprite.c:110
void quickslots_cycle(widgetdata *widget)
Definition: quickslots.c:111
size_t setting_categories_num
Definition: settings.c:45
void intro_deinit(void)
Definition: intro.c:152
bool widget_set_zoom(widgetdata *widget, double zoom)
Definition: widget.c:681
int64_t setting_get_int(int cat, int setting)
Definition: settings.c:414
sprite_struct * sprite_load_file(char *fname, uint32_t flags)
Definition: sprite.c:86
void region_map_open(void)
Definition: region_map.c:464
int keybind_process_command_up(const char *cmd)
Definition: keybind.c:503
widgetdata * cur_widget[TOTAL_SUBWIDGETS]
Definition: widget.c:75
int gender_to_id(const char *gender)
Definition: player.c:226
void toolkit_widget_init(void)
Definition: widget.c:243
void button_create(button_struct *button)
Definition: button.c:65
void interface_deinit(void)
Definition: interface.c:664
void menu_inv_filter(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1296
void object_init(void)
Definition: item.c:42
void client_send_examine(tag_t tag)
Definition: player.c:138
int glyph_get_height(font_struct *font, char c)
Definition: text.c:1883
void widget_inventory_handle_apply(widgetdata *widget)
Definition: inventory.c:1273
const char * inventory_filter_names[INVENTORY_FILTER_MAX]
Definition: inventory.c:43
command_buffer * get_next_input_command(void)
Definition: socket.c:197
void sound_stop_bg_music(void)
Definition: sound.c:481
void menu_inventory_examine(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1119
void server_settings_init(void)
void socket_command_version(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:918
void text_set_anchor_info(void *ptr)
Definition: text.c:447
const char * gender_objective[GENDER_MAX]
Definition: player.c:61
int surface_borders_get(SDL_Surface *surface, int *top, int *bottom, int *left, int *right, uint32_t color)
Definition: sprite.c:1117
command_buffer * command_buffer_new(size_t len, uint8_t *data)
Definition: socket.c:68
void widget_show_toggle_all(int type_id)
Definition: widget.c:2617
void socket_thread_start(void)
Definition: socket.c:353
void login_start(void)
Definition: login.c:281
void copy_vertical_line(SDL_Surface *src, SDL_Surface *dest, int src_x, int src_sy, int src_ey, int dest_x, int dest_sy, int dest_ey, double brightness, bool extra)
void text_show_shadow(SDL_Surface *surface, font_struct *font, const char *text, int x, int y, const char *color_notation, const char *color_shadow_notation, uint64_t flags, SDL_Rect *box)
Definition: text.c:2278
void socket_command_party(uint8_t *data, size_t len, size_t pos)
Definition: party.c:115
void server_files_deinit(void)
Definition: server_files.c:81
int scrollbar_get_width(scrollbar_struct *scrollbar)
Definition: scrollbar.c:630
void font_gc(void)
Definition: text.c:297
Definition: main.h:158
widgetdata * add_texture(const char *texture)
Definition: widget.c:2410
const char * gender_possessive[GENDER_MAX]
Definition: player.c:67
void map_update_in_building(uint8_t in_building)
Definition: map.c:337
widgetdata * get_outermost_container(widgetdata *widget)
Definition: widget.c:2047
x11_display_type SDL_display
Definition: video.c:36
void add_separator(widgetdata *widget)
Definition: widget.c:2511
char color[COLOR_BUF]
Definition: main.h:135
void inventory_filter_toggle(uint64_t filter)
Definition: inventory.c:132
void keybind_edit(size_t i, SDLKey key, SDLMod mod, const char *command)
Definition: keybind.c:266
void anims_reset(void)
Definition: animations.c:138
void effect_sprite_free(effect_sprite *sprite)
Definition: effects.c:360
void widget_mapname_init(widgetdata *widget)
Definition: mapname.c:105
void sound_init(void)
Definition: sound.c:248
void scrollbar_scroll_adjust(scrollbar_struct *scrollbar, int adjust)
Definition: scrollbar.c:427
void scrollbar_create(scrollbar_struct *scrollbar, int w, int h, uint32_t *scroll_offset, uint32_t *num_lines, uint32_t max_lines)
Definition: scrollbar.c:350
int server_files_listing_processed(void)
Definition: server_files.c:228
int handle_socket_shutdown(void)
Definition: socket.c:402
void text_anchor_execute(text_info_struct *info, void *custom_data)
Definition: text.c:632
void sound_deinit(void)
Definition: sound.c:287
size_t animations_num
Definition: main.c:71
void tooltip_enable_delay(uint32_t delay)
Definition: tooltip.c:82
void settings_open(void)
Definition: settings.c:177
void keybind_deinit(void)
Definition: keybind.c:168
void clear_player(void)
Definition: player.c:80
int metaserver_thread(void *dummy)
Definition: metaserver.c:766
void widget_map_init(widgetdata *widget)
Definition: map.c:2471
int ms_connecting(int val)
Definition: metaserver.c:678
keybind_struct * keybind_add(SDLKey key, SDLMod mod, const char *command)
Definition: keybind.c:237
int keybind_process_event(SDL_KeyboardEvent *event)
Definition: keybind.c:436
int widgets_event(SDL_Event *event)
Definition: widget.c:1205
void socket_command_painting(uint8_t *data, size_t len, size_t pos)
Definition: painting.c:299
void effects_reinit(void)
Definition: effects.c:294
void tooltip_dismiss(void)
Definition: tooltip.c:175
void skills_init(void)
Definition: skills.c:66
void inventory_filter_set_names(const char *filter)
Definition: inventory.c:153
int progress_dots_width(progress_dots *progress)
Definition: progress.c:86
color_picker_struct * color_chooser_open(void)
Definition: color_chooser.c:75
int server_files_processed(void)
Definition: server_files.c:377
void socket_command_quickslots(uint8_t *data, size_t len, size_t pos)
Definition: quickslots.c:403
void objects_free(object *op)
Definition: item.c:64
void file_updates_parse(void)
Definition: updates.c:109
void text_anchor_parse(text_info_struct *info, const char *text)
Definition: text.c:2471
void map_get_real_coords(int *x, int *y)
Definition: map.c:393
widgetdata * create_menu(int x, int y, widgetdata *owner)
Definition: widget.c:2428
void border_create_line(SDL_Surface *surface, int x, int y, int w, int h, uint32_t color)
Definition: sprite.c:1277
void resize_window(int width, int height)
Definition: event.c:115
char * file_path_server(const char *path)
Definition: wrapper.c:476
void socket_command_keepalive(uint8_t *data, size_t len, size_t pos)
Definition: main.c:159
int widget_x(const widgetdata *widget)
Definition: widget.c:615
server_struct * server_get_id(size_t num)
Definition: metaserver.c:639
int keybind_command_matches_event(const char *cmd, SDL_KeyboardEvent *event)
Definition: keybind.c:391
const char * setting_get_str(int cat, int setting)
Definition: settings.c:400
void list_sort(list_struct *list, int type)
Definition: list.c:832
spell_entry_struct * spell_get(size_t spell_path, size_t spell_id)
Definition: spells.c:294
UT_array * book_help_history
Definition: book.c:46
void socket_command_drawinfo(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:134
int video_set_size(void)
Definition: video.c:344
void text_color_set(int r, int g, int b)
Definition: text.c:406
void texture_reload(void)
Definition: texture.c:221
int list_handle_keyboard(list_struct *list, SDL_Event *event)
Definition: list.c:622
int tilestretcher_coords_in_tile(uint32_t stretch, int x, int y)
const char * gender_subjective_upper[GENDER_MAX]
Definition: player.c:55
void settings_load(void)
Definition: settings.c:217
void quickslots_scroll(widgetdata *widget, int up, int scroll)
Definition: quickslots.c:98
struct msg_anim_struct msg_anim
Definition: main.c:80
void update_map_weather(const char *weather)
Definition: map.c:281
void update_map_bg_music(const char *bg_music)
Definition: sound.c:523
void client_send_move(tag_t loc, tag_t tag, uint32_t nrof)
Definition: player.c:156
void tooltip_multiline(int max_width)
Definition: tooltip.c:96
void sound_pause_music(void)
Definition: sound.c:500
void text_enable_debug(void)
Definition: text.c:2494
size_t server_get_count(void)
Definition: metaserver.c:661
void border_create(SDL_Surface *surface, int x, int y, int w, int h, int color, int size)
Definition: sprite.c:1226
SDL_Surface * effect_sprite_overlay(SDL_Surface *surface)
Definition: effects.c:734
void widget_spells_init(widgetdata *widget)
Definition: spells.c:598
void sprite_cache_free_all(void)
Definition: sprite.c:262
int setting_is_text(setting_struct *setting)
Definition: settings.c:636
object * object_find(tag_t tag)
Definition: item.c:139
void map_set_darkness(int x, int y, int sub_layer, uint8_t darkness)
Definition: map.c:813
void textwin_handle_copy(widgetdata *widget)
Definition: textwin.c:459
void spells_init(void)
Definition: spells.c:74
void border_create_texture(SDL_Surface *surface, SDL_Rect *coords, int thickness, SDL_Surface *texture)
Definition: sprite.c:1388
keybind_struct * keybind_find_by_command(const char *cmd)
Definition: keybind.c:371
void settings_deinit(void)
Definition: settings.c:310
void surface_show_fill(SDL_Surface *surface, int x, int y, SDL_Rect *srcsize, SDL_Surface *src, SDL_Rect *box)
Definition: sprite.c:792
uint32_t LastTick
Definition: main.c:57
void map_update_size(int w, int h)
Definition: map.c:190
void list_set_font(list_struct *list, font_struct *font)
Definition: list.c:284
void menu_inventory_submenu_more(widgetdata *widget, widgetdata *menuitem, SDL_Event *event)
Definition: inventory.c:1362
int spell_find(const char *name, size_t *spell_path, size_t *spell_id)
Definition: spells.c:198
int text_get_width(font_struct *font, const char *text, uint64_t flags)
Definition: text.c:2328
void metaserver_clear_data(void)
Definition: metaserver.c:697
void list_show(list_struct *list, int x, int y)
Definition: list.c:337
void widget_redraw_all(int widget_type_id)
Definition: widget.c:2555
void anims_deinit(void)
Definition: animations.c:107
char * file_path(const char *path, const char *mode)
Definition: wrapper.c:369
clioption_settings_struct clioption_settings
Definition: main.c:87
void effect_sprite_remove(effect_sprite *sprite)
Definition: effects.c:370
int send_command_check(const char *cmd)
Definition: menu.c:376
void surface_show(SDL_Surface *surface, int x, int y, SDL_Rect *srcrect, SDL_Surface *src)
Definition: sprite.c:761
x11_window_type SDL_window
Definition: video.c:40
const char *const textwin_tab_names[]
Definition: textwin.c:39
void server_files_load(int post_load)
Definition: server_files.c:151
const char * sound_get_bg_music(void)
Definition: sound.c:577
void video_init(void)
Definition: video.c:45
void keybind_repeat_toggle(size_t i)
Definition: keybind.c:313
int scrollbar_event(scrollbar_struct *scrollbar, SDL_Event *event)
Definition: scrollbar.c:529
int bmp2png(const char *path)
Definition: misc.c:108
void widget_quickslots_init(widgetdata *widget)
Definition: quickslots.c:376
void process_widgets(int draw)
Definition: widget.c:1770
int main(int argc, char *argv[])
Definition: main.c:614
int map_get_player_direction(void)
Definition: map.c:370
void settings_apply(void)
Definition: settings.c:557
void spells_deinit(void)
Definition: spells.c:85
void effect_sprites_play(void)
Definition: effects.c:445
void widget_fps_init(widgetdata *widget)
Definition: fps.c:107
void object_remove(object *op)
Definition: item.c:174
void socket_command_target(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:153
char * upgrader_get_version_partial(char *dst, size_t dstlen)
Definition: upgrader.c:332
int glyph_get_width(font_struct *font, char c)
Definition: text.c:1855
void list_set_parent(list_struct *list, int px, int py)
Definition: list.c:96
int dir_from_tile_coords(int tx, int ty)
Definition: move.c:89
void remove_widget_object_intern(widgetdata *widget)
Definition: widget.c:478
void metaserver_disable(void)
Definition: metaserver.c:103
void book_name_change(const char *name, size_t len)
Definition: book.c:59
void socket_command_control(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:956
char * text_strip_markup(char *buf, size_t *buf_len, uint8_t do_free)
Definition: text.c:468
int file_updates_finished(void)
Definition: updates.c:101
Definition: map.h:117
void init_player_data(void)
Definition: player.c:187
void SetPriorityWidget(widgetdata *node)
Definition: widget.c:1788
server_files_struct * server_files_find(const char *name)
Definition: server_files.c:136
void map_draw_one(int x, int y, SDL_Surface *surface)
Definition: map.c:1871
widgetevent widget_mouse_event
Definition: widget.c:82
void map_anims_clear(void)
Definition: map.c:2580
void client_send_apply(object *op)
Definition: player.c:119
void text_show_format(SDL_Surface *surface, font_struct *font, int x, int y, const char *color_notation, uint64_t flags, SDL_Rect *box, const char *format,...)
Definition: text.c:2289
void draw_info_format(const char *color, const char *format,...)
Definition: textwin.c:429
void client_socket_deinitialize(void)
Definition: socket.c:452
const char * gender_reflexive[GENDER_MAX]
Definition: player.c:73
int sound_music_can_seek(void)
Definition: sound.c:642
void effect_sprites_free(effect_struct *effect)
Definition: effects.c:311
void border_create_color(SDL_Surface *surface, SDL_Rect *coords, int thickness, const char *color_notation)
Definition: sprite.c:1359
void list_scrollbar_enable(list_struct *list)
Definition: list.c:302
int widget_event_start_move(widgetdata *widget)
Definition: widget.c:1484
void keybind_remove(size_t i)
Definition: keybind.c:285
void socket_command_interface(uint8_t *data, size_t len, size_t pos)
Definition: interface.c:391
void server_files_init(void)
Definition: server_files.c:47
void widget_buddy_add(widgetdata *widget, const char *name, uint8_t sort)
Definition: buddy.c:99
void object_show_centered(SDL_Surface *surface, object *tmp, int x, int y, int w, int h, bool fit)
Definition: item.c:545
void upgrader_init(void)
Definition: upgrader.c:268
void interface_redraw(void)
Definition: interface.c:654
void widget_inventory_handle_arrow_key(widgetdata *widget, SDLKey key)
Definition: inventory.c:795
void button_show(button_struct *button, const char *text)
Definition: button.c:161
void effect_debug(const char *type)
Definition: effects.c:654
void detach_widget(widgetdata *widget)
Definition: widget.c:995
widgetdata * add_label(const char *text, font_struct *font, const char *color)
Definition: widget.c:2387
Definition: main.h:191
void progress_dots_show(progress_dots *progress, SDL_Surface *surface, int x, int y)
Definition: progress.c:57
static progress_dots progress
Definition: characters.c:49
void border_create_sdl_color(SDL_Surface *surface, SDL_Rect *coords, int thickness, SDL_Color *color)
Definition: sprite.c:1306
size_t keybindings_num
Definition: keybind.c:55
void copy_rec(const char *src, const char *dst)
Definition: wrapper.c:269
uint32_t sound_music_get_offset(void)
Definition: sound.c:623
int list_set_selected(list_struct *list, const char *str, uint32_t col)
Definition: list.c:855
void get_data_dir_file(char *buf, size_t len, const char *fname)
Definition: wrapper.c:331
int keybind_process_command(const char *cmd)
Definition: keybind.c:553
void map_draw_map(SDL_Surface *surface)
Definition: map.c:1520
void update_map_region_name(const char *region_name)
Definition: map.c:299
void surface_pan(SDL_Surface *surface, SDL_Rect *box)
Definition: sprite.c:1151
void keybind_free(keybind_struct *keybind)
Definition: keybind.c:159
int widget_w(const widgetdata *widget)
Definition: widget.c:651
void map_anims_play(void)
Definition: map.c:2591
const char * list_get_selected(list_struct *list, uint32_t col)
Definition: list.c:879
void add_menuitem(widgetdata *menu, const char *text, void(*menu_func_ptr)(widgetdata *, widgetdata *, SDL_Event *event), int menu_type, int val)
Definition: widget.c:2451
void video_set_icon(SDL_Surface *icon)
Definition: video.c:306
void texture_deinit(void)
Definition: texture.c:190
void objects_init(void)
Definition: item.c:427
void object_deinit(void)
Definition: item.c:54
void widget_target_init(widgetdata *widget)
Definition: target.c:192
const char * get_config_dir(void)
Definition: wrapper.c:303
void socket_command_stats(uint8_t *data, size_t len, size_t pos)
Definition: commands.c:166
void texture_gc(void)
Definition: texture.c:238
void updater_open(void)
Definition: updater.c:568
static effect_struct * effects
Definition: effects.c:36
void widget_switch_focus(int type, const char *id)
Definition: widget.c:2165
void text_input_destroy(text_input_struct *text_input)
Definition: text_input.c:96
void widget_mplayer_init(widgetdata *widget)
Definition: mplayer.c:595
void sprite_cache_gc(void)
Definition: sprite.c:274
widgetdata * create_widget(int widget_id)
Definition: widget.c:845
void kill_widget_tree(widgetdata *widget)
Definition: widget.c:814
int cmd_aliases_handle(const char *cmd)
Definition: cmd_aliases.c:317
void effect_stop(void)
Definition: effects.c:689
void book_redraw(void)
Definition: book.c:286
void sprite_free_sprite(sprite_struct *sprite)
Definition: sprite.c:164
int Event_PollInputDevice(void)
Definition: event.c:130
void widget_highlight_menu(widgetdata *widget)
Definition: menu.c:36
void surface_set_alpha(SDL_Surface *surface, uint8_t alpha)
Definition: sprite.c:1476
void settings_save(void)
Definition: settings.c:273
void object_remove_inventory(object *op)
Definition: item.c:217
char * text_escape_markup(const char *buf)
Definition: text.c:532
void init_map_data(int xl, int yl, int px, int py)
Definition: map.c:410
void clear_map(bool hard)
Definition: map.c:154
void screenshot_create(SDL_Surface *surface)
Definition: misc.c:132