Crossfire Client, Trunk
external.h
Go to the documentation of this file.
1 /*
2  * static char *rcsid_common_external_h =
3  * "$Id$";
4  */
5 /*
6  Crossfire client, a client program for the crossfire program.
7 
8  Copyright (C) 2001,2006 Mark Wedel & Crossfire Development Team
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 
24  The author can be reached via e-mail to crossfire-devel@real-time.com
25 */
26 
35 /* Sound functions */
36 extern void SoundCmd(unsigned char *data, int len);
37 extern void Sound2Cmd(unsigned char *data, int len);
38 extern void MusicCmd(const char *data, int len);
39 
40 /* Map window related functions */
41 extern void resize_map_window(int x, int y);
42 extern void display_map_addbelow(long x, long y, long face);
43 extern void display_map_doneupdate(int redraw, int notice);
44 extern int display_mapscroll(int dx, int dy);
45 extern void draw_magic_map(void);
46 
47 /* Info related functions */
48 extern void draw_prompt(const char *str);
49 extern void draw_ext_info(int orig_color, int type, int subtype, const char *message);
50 extern void x_set_echo(void);
51 extern void menu_clear(void);
52 extern int get_info_width(void);
53 
54 /* Stats related commands */
55 extern void draw_stats(int redraw);
56 extern void draw_message_window(int redraw);
57 
58 /* this should really just set a field in the stats, and let the
59  * client figure the new weight limit out
60  */
61 extern void set_weight_limit(guint32 wlim);
62 
63 /* Image related functions */
64 extern int display_willcache(void);
65 extern int create_and_rescale_image_from_data(Cache_Entry *ce, int pixmap_num, guint8 *rgba_data, int width, int height);
66 extern guint8 *png_to_data(guint8 *data, int len, guint32 *width, guint32 *height);
67 extern int associate_cache_entry(Cache_Entry *ce, int pixnum);
68 extern void image_update_download_status(int start, int end, int total);
69 extern void get_map_image_size(int face, guint8 *w, guint8 *h);
70 extern void addsmooth(guint16 face, guint16 smooth_face);
71 
72 /* Item related commands */
73 extern void open_container(item *op);
74 extern void close_container(item *op);
75 
76 /* Keybinding relatated commands - this probably should not be a callback */
77 extern void bind_key(const char *params);
78 extern void unbind_key(const char *params);
79 extern void keybindings_init(const char *character_name);
80 
81 /* Misc commands */
82 extern void save_winpos(void);
83 extern void save_defaults(void);
84 extern void command_show(const char *params);
85 extern void client_tick(guint32 tick);
86 extern void client_pickup(guint32 pickup);
87 
88 /* Account Login Functions */
89 extern void start_login(int method);
90 extern void show_main_client(void);
91 extern void hide_all_login_windows(void);
92 extern void account_login_failure(char *message);
93 extern void account_creation_failure(char *message);
94 extern void account_add_character_failure(char *message);
95 extern void account_change_password_failure(char *message);
96 extern void create_new_character_failure(char *message);
97 extern void choose_character_init(void);
98 extern void update_character_choose(const char *name, const char *class,
99  const char *race, const char *face,
100  const char *party, const char *map,
101  int level, int faceno);
102 extern void update_login_info(int type);
103 
104 /* Character Creation Functions */
105 extern void new_char_window_update_info();
106 extern void starting_map_update_info();
redraw
static gboolean redraw(gpointer data)
Redraw the map.
Definition: main.c:137
client_tick
void client_tick(guint32 tick)
Called whenever the server sends a tick command.
Definition: main.c:194
keybindings_init
void keybindings_init(const char *character_name)
Reads in the keybindings, and initializes special values.
Definition: keys.c:534
Cache_Entry
Used mostly in the cache.c file, however, it can be returned to the graphic side of things so that th...
Definition: client.h:502
display_willcache
int display_willcache(void)
png_to_data
guint8 * png_to_data(guint8 *data, int len, guint32 *width, guint32 *height)
Definition: png.c:49
draw_stats
void draw_stats(int redraw)
Draws the stats window.
Definition: stats.c:554
starting_map_update_info
void starting_map_update_info()
We have gotten starting map information from the server - now update the combo boxes.
Definition: create_char.c:753
hide_all_login_windows
void hide_all_login_windows(void)
Hides all the login related windows.
Definition: account.c:96
height
static int height
Definition: mapdata.c:101
save_defaults
void save_defaults(void)
This function saves user settings chosen using the configuration popup dialog.
Definition: config.c:517
display_map_doneupdate
void display_map_doneupdate(int redraw, int notice)
This is called after the map has been all digested.
Definition: map.c:691
client_pickup
void client_pickup(guint32 pickup)
We get pickup information from server, update our status.
Definition: pickup.c:630
new_char_window_update_info
void new_char_window_update_info()
We have gotten some new information from the server, so we need to update the information - race/clas...
Definition: create_char.c:633
start_login
void start_login(int method)
Starts the login process.
Definition: account.c:1263
get_info_width
int get_info_width(void)
menu_clear
void menu_clear(void)
Clears all the message panels.
Definition: info.c:1329
associate_cache_entry
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:264
display_mapscroll
int display_mapscroll(int dx, int dy)
Definition: map.c:177
account_change_password_failure
void account_change_password_failure(char *message)
Definition: account.c:1123
open_container
void open_container(item *op)
Definition: inventory.c:643
draw_magic_map
void draw_magic_map(void)
Definition: magicmap.c:24
close_container
void close_container(item *op)
Open and close_container are now no-ops - since these are now drawn inline as treestores,...
Definition: inventory.c:636
MusicCmd
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:113
image_update_download_status
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:309
account_login_failure
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:868
bind_key
void bind_key(const char *params)
width
static int width
Definition: mapdata.c:100
create_new_character_failure
void create_new_character_failure(char *message)
Pop up a dialog window with the error from the server.
Definition: account.c:142
addsmooth
void addsmooth(guint16 face, guint16 smooth_face)
Referenced from common/commands.c.
Definition: image.c:251
draw_ext_info
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:915
update_character_choose
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:547
save_winpos
void save_winpos(void)
Save client window positions to a file unique to each layout.
Definition: config.c:809
account_add_character_failure
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:282
draw_prompt
void draw_prompt(const char *str)
Draws a prompt.
Definition: keys.c:1719
get_map_image_size
void get_map_image_size(int face, guint8 *w, guint8 *h)
Definition: image.c:341
choose_character_init
void choose_character_init(void)
Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd).
Definition: account.c:421
item_struct
Definition: item.h:50
x_set_echo
void x_set_echo(void)
Definition: keys.c:1710
SoundCmd
void SoundCmd(unsigned char *data, int len)
map
static item * map
Definition: item.c:27
resize_map_window
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:531
unbind_key
void unbind_key(const char *params)
Definition: keys.c:1471
account_creation_failure
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:692
show_main_client
void show_main_client(void)
Show main client window.
Definition: main.c:486
display_map_addbelow
void display_map_addbelow(long x, long y, long face)
draw_message_window
void draw_message_window(int redraw)
Updates the stats pane - hp, sp, etc labels.
Definition: stats.c:459
update_login_info
void update_login_info(int type)
This is called from ReplyInfoCmd when it gets a response from news/motd/rules.
Definition: account.c:1174
Sound2Cmd
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:38
create_and_rescale_image_from_data
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:142
set_weight_limit
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:682
command_show
void command_show(const char *params)
Definition: inventory.c:650