|
Crossfire Client, Trunk
R18666
|

Go to the source code of this file.
Functions | |
| void | SoundCmd (unsigned char *data, int len) |
| void | Sound2Cmd (unsigned char *data, int len) |
| void | MusicCmd (const char *data, int len) |
| void | resize_map_window (int x, int y) |
| void | display_map_newmap (void) |
| void | display_map_addbelow (long x, long y, long face) |
| void | display_map_startupdate (void) |
| void | display_map_doneupdate (int redraw, int notice) |
| int | display_mapscroll (int dx, int dy) |
| void | draw_magic_map (void) |
| void | draw_prompt (const char *str) |
| void | draw_ext_info (int orig_color, int type, int subtype, const char *message) |
| void | x_set_echo (void) |
| void | set_scroll (const char *s) |
| void | set_autorepeat (const char *s) |
| void | menu_clear (void) |
| int | get_info_width (void) |
| void | draw_stats (int redraw) |
| void | draw_message_window (int redraw) |
| void | set_weight_limit (uint32 wlim) |
| int | display_willcache (void) |
| int | create_and_rescale_image_from_data (Cache_Entry *ce, int pixmap_num, uint8 *rgba_data, int width, int height) |
| uint8 * | png_to_data (uint8 *data, int len, uint32 *width, uint32 *height) |
| int | associate_cache_entry (Cache_Entry *ce, int pixnum) |
| void | image_update_download_status (int start, int end, int total) |
| void | get_map_image_size (int face, uint8 *w, uint8 *h) |
| void | addsmooth (uint16 face, uint16 smooth_face) |
| void | open_container (item *op) |
| void | close_container (item *op) |
| void | set_show_icon (const char *s) |
| void | set_show_weight (const char *s) |
| void | bind_key (const char *params) |
| void | unbind_key (const char *params) |
| void | save_winpos (void) |
| void | save_defaults (void) |
| void | command_show (const char *params) |
| void | client_tick (uint32 tick) |
| void | cleanup_connection (void) |
| void | client_pickup (uint32 pickup) |
| void | start_login (int method) |
| void | hide_all_login_windows (void) |
| void | account_login_failure (char *message) |
| void | account_creation_failure (char *message) |
| void | account_add_character_failure (char *message) |
| void | account_change_password_failure (char *message) |
| void | create_new_character_failure (char *message) |
| void | choose_character_init (void) |
| 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) |
| void | update_login_info (int type) |
| void | new_char_window_update_info () |
| void | starting_map_update_info () |
Contains external calls that the common area makes callbacks to. This was really a quick hack done to allow some separation. Really, these should be set via callbacks that the client can make to the library. Many of these probably should never really be callbacks in any case, or be more general.
Definition in file external.h.
| void account_add_character_failure | ( | char * | message | ) |
Handles a failure from the server - pretty basic - just throw up the message and let the user try again. This is a response to the 'failure accountaddplayer' command. Calling this account_add_character_failure may be a little bit of a misnomer, but all the other routines in this area refer to character, not player.
| message | Message to display. Unlike other messages, the first word of this message should be an integer, which denotes if using the 'force' option would allow the user to override this. |
Definition at line 320 of file account.c.

| void account_change_password_failure | ( | char * | message | ) |
| void account_creation_failure | ( | char * | message | ) |
| void account_login_failure | ( | char * | message | ) |
Referenced from common/commands.c
| face | |
| smooth_face |
Definition at line 426 of file image.c.

| int associate_cache_entry | ( | Cache_Entry * | ce, |
| int | pixnum | ||
| ) |
This functions associates image_data in the cache entry with the specific pixmap number. Currently, there is no failure condition, but there is the potential that in the future, we want to more closely look at the data and if it isn't valid, return the failure code.
Definition at line 439 of file image.c.

| void bind_key | ( | const char * | params | ) |
| void choose_character_init | ( | void | ) |
Called when we get the accountplayers command from the server (indirectly via AccountPlayersCmd). This tells us to wipe any data from the treeview, but also hide any other windows and make the choose_character_window visible.
Definition at line 471 of file account.c.

| void cleanup_connection | ( | void | ) |
| void client_pickup | ( | uint32 | pickup | ) |
| void client_tick | ( | uint32 | tick | ) |
| void close_container | ( | item * | op | ) |
Open and close_container are now no-ops - since these are now drawn inline as treestores, we don't need to update what we are drawing were. and since the activation of a container will cause the list to be redrawn, don't need to worry about making an explicit call here.
| op |
Definition at line 567 of file inventory.c.

| void command_show | ( | const char * | params | ) |
| params |
Definition at line 585 of file inventory.c.
| int create_and_rescale_image_from_data | ( | Cache_Entry * | ce, |
| int | pixmap_num, | ||
| uint8 * | rgba_data, | ||
| int | width, | ||
| int | height | ||
| ) |
Takes the pixmap to put the data into, as well as the rgba data (ie, already loaded with png_to_data). Scales and stores the relevant data into the pixmap structure.
| ce | can be NULL |
| pixmap_num | |
| rgba_data | |
| width | |
| height |
Definition at line 297 of file image.c.

| void create_new_character_failure | ( | char * | message | ) |
Pop up a dialog window with the error from the server. Since both v1 and v2 character creation are supported, either the new_character_window or the create_character_window may be up, so we can not easily display an in window message - a pop up is probably better, but it will also work no matter what window is up.
| message | message - this comes from the server. |
Definition at line 167 of file account.c.

| void display_map_addbelow | ( | long | x, |
| long | y, | ||
| long | face | ||
| ) |
| void display_map_doneupdate | ( | int | redraw, |
| int | notice | ||
| ) |
This is called after the map has been all digested. this should perhaps be removed, and left to being done from from the main event loop.
| redraw | If set, force redraw of all tiles. |
| notice | If set, another call will follow soon. |
Definition at line 771 of file map.c.

| void display_map_newmap | ( | void | ) |
| void display_map_startupdate | ( | void | ) |
This isn't used - it is basically a prequel - we know we got a map command from the server, but have digested it all yet. This can be useful if there is info we know we need to store away or the like before it is destroyed, but there isn't anything like that for the gtk client.
Definition at line 760 of file map.c.

| int display_mapscroll | ( | int | dx, |
| int | dy | ||
| ) |
| int display_willcache | ( | void | ) |
| void draw_ext_info | ( | int | orig_color, |
| int | type, | ||
| int | subtype, | ||
| const char * | message | ||
| ) |
A message processor that accepts messages along with meta information color and type. The message type and subtype are analyzed to select font and other text attributes. All gtk-v2 client messages pass through this processor before being output. Before addition of the output buffering feature, this was the message callback function. It is a separate function so that it can be called both by the callback, and but buffer maintenance functions.
Client-sourced messages generally should be passed directly to this handler instead of to the callback. This will save some overhead as the callback implements a system that coalesces duplicate messages - a feature that is not really applicable to most messages that do not come from the server.
| orig_color | Suggested text color that type/subtype can over-ride. |
| type | Message type. See MSG_TYPE definitions in newclient.h. |
| subtype | Message subtype. See MSG_TYPE_*_* values in newclient.h. |
| message | The message text to display. |
< When 0, the type is valid and may be used to pick the panel routing, otherwise the message can only go to the main message pane.
Definition at line 894 of file info.c.

| void draw_magic_map | ( | void | ) |
Draws the magic map - basically, it is just a simple encoding of space X is color C.
Definition at line 51 of file magicmap.c.

| void draw_message_window | ( | int | redraw | ) |
| void draw_stats | ( | int | redraw | ) |
| int get_info_width | ( | void | ) |
This is used by the common help system to determine when to wrap. Should be able to get width of window, and divide by character width - however, still not perfect if we are using a variable width font. Actually, GTK can do word wrapping for us, so maybe the real fix is to have it to the word wrapping and just run a sufficiently large value.
Definition at line 1309 of file info.c.

| void get_map_image_size | ( | int | face, |
| uint8 * | w, | ||
| uint8 * | h | ||
| ) |
| void hide_all_login_windows | ( | void | ) |
Hides all the login related windows. This is needed in case the client loses the connection to the server (either through player going to client/disconnect or network failure). get_metaserver() calls this, as well as AddMeSuccess
Definition at line 116 of file account.c.

| void image_update_download_status | ( | int | start, |
| int | end, | ||
| int | total | ||
| ) |
Draws a status bar showing where we our in terms of downloading all the image data. A few hacks: If start is 1, this is the first batch, so it means we need to create the appropriate status window. If start = end = total, it means were finished, so destroy the gui element.
| start | The start value just sent to the server. |
| end | |
| total | The total number of images. |
Definition at line 486 of file image.c.

| void menu_clear | ( | void | ) |
| void MusicCmd | ( | const char * | data, |
| int | len | ||
| ) |
Parse the data contained by a music command coming from the server and pass the name along to cfsndserv as a quoted string.
| data | Data provided following the music command from the server that hints what kind of music should play. NONE is an indication that music should stop playing. |
| len | Length of the string describing the music to play. |
Format of the music command received in data:
music {string}
cfsndserv recognizes music commands by seeing the quoted string as the first item on the command line.
| void new_char_window_update_info | ( | ) |
We have gotten some new information from the server, so we need to update the information - race/class choices or stat points/min stat/max stat information.
Definition at line 646 of file create_char.c.

| void open_container | ( | item * | op | ) |
| op |
Definition at line 576 of file inventory.c.

| uint8* png_to_data | ( | uint8 * | data, |
| int | len, | ||
| uint32 * | width, | ||
| uint32 * | height | ||
| ) |
| void resize_map_window | ( | int | x, |
| int | y | ||
| ) |
Resize_map_window is a NOOP for the time being - not sure if it will in fact need to do something, since there are scrollbars for the map window now. Note - this is note a window resize request, but rather process the size (in spaces) of the map - is received from server.
Definition at line 574 of file map.c.

| void save_defaults | ( | void | ) |
| void save_winpos | ( | void | ) |
Handles saving of the window positions when the Client | Save Window Position menu item is executed. All hpaned and vpaned widget settings have the information required, and the code automatically works for Glade XML layouts that follow the glade-2's default widget naming convention.
Definition at line 1069 of file config.c.

| void set_autorepeat | ( | const char * | s | ) |
A stub function that does nothing. These are callbacks used by the common code, but they are not implemented in GTK, either because it makes no sense (set_scroll for example), or because it may not be technically possible to do so if we limit ourselves to proper GTK2 code (Eg, don't mess with the internals of X or platform specific issues)
| s |
| void set_scroll | ( | const char * | s | ) |
A stub function that does nothing. These are callbacks used by the common code, but they are not implemented in GTK, either because it makes no sense (set_scroll for example), or because it may not be technically possible to do so if we limit ourselves to proper GTK2 code (Eg, don't mess with the internals of X or platform specific issues)
| s |
| void set_show_icon | ( | const char * | s | ) |
| s |
Definition at line 547 of file inventory.c.
| void set_show_weight | ( | const char * | s | ) |
| s |
Definition at line 555 of file inventory.c.
| void set_weight_limit | ( | uint32 | wlim | ) |
No reason to divide by 1000 everytime we do the display, so do it once and store it here.
| wlim |
Definition at line 617 of file inventory.c.

| void Sound2Cmd | ( | unsigned char * | data, |
| int | len | ||
| ) |
Parse the data contained by a sound2 command coming from the server and handle playing the specified sound. See server doc/Developers/sound for details.
| data | Data provided following the sound2 command from the server. |
| len | Length of the sound2 command data. |
Format of the sound2 command recieved in data:
sound2 {x}{y}{dir}{volume}{type}{len_sound}{sound}{len_source}{source}
b b b b b b str b str
| void SoundCmd | ( | unsigned char * | data, |
| int | len | ||
| ) |
| void start_login | ( | int | method | ) |
Starts the login process. If not already done, gets widgets, sets up callboacks, etc. This is at the end of the file so all the callbacks are defined before this function - in that way, we do not need forward declarations. This is called from SetupCmd in common/commands.c
| method | Login method that the server suppots. |
Definition at line 1457 of file account.c.

| void starting_map_update_info | ( | ) |
We have gotten starting map information from the server - now update the combo boxes.
Definition at line 767 of file create_char.c.

| void update_character_choose | ( | const char * | name, |
| const char * | class, | ||
| const char * | race, | ||
| const char * | face, | ||
| const char * | party, | ||
| const char * | map, | ||
| int | level, | ||
| int | faceno | ||
| ) |
This gets data and adds it to the list store. This is called from AccountPlayersCmd and data is from the accountplayers protocol command. The parameters are data to add to the list store.
| name | |
| class | |
| race | |
| face | |
| party | |
| map | |
| level | |
| faceno |
Definition at line 610 of file account.c.

| void update_login_info | ( | int | type | ) |
This is called from ReplyInfoCmd when it gets a response from news/motd/rules. It is very possible that the window will get displayed before we got a reply response, so this tells the client to update it.
| type | What data just got updated - text string of motd/news/rules |
Definition at line 1372 of file account.c.

1.7.6.1