"$Id: ChangeLog,v 1.32 2005/08/11 06:51:18 mwedel Exp $" Top of CVS tree: ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Changes for 1.8.0: Makefile.am, Makefile.in: Add missing pixmaps, change CHANGES to ChangeLog, update archive directive so it works. aclocal.m4: updated configure, configure.in: Updated for 1.8.0 release. Remove gnome/Makefile from list of Makefiles to create. gtk-v2/Makefile.am, gtk-v2/Makefile.in: Add archive directive. gtk-v2/src/Makefile.{am|in}: Add missing soruces to list so that archive works correctly. Add archive directive. MSW 2005-08-10 gtk/keys.c: don't select text in widget under Windows. Ryo 2005-07-30 gtk/gx11.c: fix a crash if closing login window. Weird behaviour, but no crash. Ryo 2005-07-29 gtk/image.c: Remove stray '+' at beginning of line. Andreas Kirschbaum 2005-07-21 x11/x11.c: Fix crash if display cannot be opened. common/script.c: Properly terminate string with '\0' in script_init(). Andreas Kirschbaum 2005-07-18 gtk/sdl.c, gtk-v2/src/sdl.c: Fix printf like format specifiers. Andreas Kirschbaum 2005-07-16 common/init.c: Win32 should use %APPDATA% instead of . for home directory. Ryo 2005-07-10 Bulk of this change is the addition of a pop up window in the gtk-v2 client for metaserver selection, as well as other updates. The files to the common area was really to pull the metaserver defines and data structures from the C file to a header file so that the gtk-v2 code can access them: -- AUTHORS: New file, required by automake, data pulled README file. NEWS: New file, required by automake. Makefile.in, aclocal.m4: Rebuilt README: Remove author info from this file, move it to AUTHORS. common/Makefile.in: add metaserver.h file common/metaserver.h: New file containing metaserver defines and structures. common/metaserver.c: Pull out defines/structures from this file, moved to metaserver.h. Have it strip packets/byte count info from comment section that metaserver reports. gtk-v2/Makefile.in: Rebuilt. gtk-v2/gtk-v2.glade: Added new metaserver window. gtk-v2/src/Makefile.am: Add metaserver.c as a standalone file that gets compiled gtk-v2/src/Makefile.in: Rebuilt gtk-v2/src/callbacks.h, gtk-v2/src/interface.c, gtk-v2/src/interface.h: Updated by glade2 gtk-v2/src/main.c: Remove metaserver.c inclusion. Initialize cached_server_file. Change metaserver selection/display code. gtk-v2/src/metaserver.c: Lots of new code - have it display window, handle selections, connect to server, etc. MSW 2005-07-04 gtk-v2/src/info.c: Remove extra lines of code for scrolling. Have newlines be inserted in the correct place for the color info tab. gtk-v2/src/inventory.c: Remove call to check to display object in inventory tab for container objects - if we show the container object, so all objects within the container (bug 1226968) gtk-v2/src/keys.c: Move initialization of global widges to before loading keybindings - otherwise, they can end up not being initialized. MSW 2005-06-29 Add inventory animation to the gtk2 client. gtk2proto.h: rebuilt inventory.c: Add new function that animates inventory. Have draw_table() take a second param that determines if it is doing an animation run or just a normal draw. main.c: Move PACKAGE_DATA_DIR to be within WIN32 defines. Add call to inventory_tick() in do_timeout() MSW 2005-06-26 common/metaserver.c: wrong number displayed for cached servers. Ryo 2005-06-25 configure.in, configure: Turn of the use of dmalloc as the default - if dmalloc is disabled, it has to be intentionally set. gtkv2 client runs dog slow if dmalloc is used, so that isn't a good default common/item.c: Fix bug that resulted in the item names not being updated properly - bug introduced in patch 1197437. MSW 2005-06-04 crossfire-client.spec, gnome/Makefile.in, x11/Makefile.in: Patch from Kari Pahula to fix manpage paths. gtk/gx11.h: Patch from Kari Pahula to remove incorrect variable declaration. Andreas Kirschbaum 2005-06-01 Committed patch #1197437 courtesy Kevin Rudat (krudat). This patch moves inventory-related functions in GTK client to one specific file. Also makes inventory refresh less often. Affected files: * common: client.h item.c item.h p_cmd.c proto.h * gtk: config.c gtkproto.h gx11.c gx11.h inventory.c Makefile.in * x11: x11.c x11proto.h common/metaserver.c: add server cache. gtk/gx11.c: initialize server cache filename. Ryo 2005-05-23 gtk/gx11.c: Windows has player-specific keys, get'em (was broken with new login window) Ryo 2005-05-12 Add newpickup support to the gtkv2 client. Didn't add old support (still available by specific commands) as I think the interface gets confusing to have them both - would be better to extend newpickup logic if necessary to support anything old pickup does that newpickup doesn't. -- gtk-v2/Makefile.in: Rebuilt gtk-v2/gtk-v2.glade: Add menu options for newpickup gtk-v2/src/Makefile.am, gtk-v2/src/Makefile.in: Add pickup.c file gtk-v2/src/callbacks.h, gtk-v2/src/interface.c: Rebuilt by glade-2 gtk-v2/src/pickup.c: New file - handles pickup logic. MSW 2005-04-17 gtk/image.c: Apply patch from bug 1120881 that fixes pointer operations on netbsd/macppc. Changed code still works on linux/x86. MSW 2005-04-16 Improve behaviour of information windows on gtkv2 client - before this patch, they would always scroll to bottom when getting new output, making it difficult to look at shop listings or other long listings that require going back in the scroll buffer. With this change, if the buffer isn't at the end, the scroll position isn't changed. IF it it at the end, it keeps it at the end. -- gtk-v2/gtk-v2.glade: Chane scrolledwindows used by the textbuffers to have a meaningful name. gtk-v2/src/info.c: Add code that gets position of scroll bar (adjustment) and compares it with maximum, and if not at end, don't scroll window. gtk-v2/src/interface.c: Rebuilt. MSW 2005-04-11 Fix so that magic map works properly on the gtkv2 client. gtk-v2/gtk-v2.glade: change name of map notebook to map_notebook. Add signal to handle expose events of the magic map area. gtk-v2/src/callbacks.h: Rebuilt with addition of expose callback. gtk-v2/src/interface.c: Rebuilt with addition of expose, change of name. gtk-v2/src/magicmap.c: Have magic map switch the notebook page to the magic map page to ensure widget is realized - also good for expected behaviour. Add some checks for null values so if user switches before getting magic map data, doesn't crash. Add check in magic_map_flash_pos() to see if still on the magic map notebook page. Add expose callback. gtk-v2/src/main.h: Add MAGIC_MAP_PAGE which defines which notebook page is the magic map one. gtk-v2/src/map.c: Have it look up the map_notebook widget. MSW 2005-04-05 Various minor bugfixes: configure.in, configure: Add warning message if we can't find gtk+ 2.0 or later, but continue configure process instead of exiting. common/misc.c: Fix code so that it compiles with older C compilers. gtk-v2/src/map.c: Change code on need_recenter_map() - use MAX_MAP_OFFSET instead of hard coded value of 2 - found a crash here when running around the world map - could have been caused by a big image and/or the fact my character moved 2 spaces in one tick. either way, this change shouldn't impact things, as it is seldom the virtual map needs to be recentered. MSW 2005-03-27 This patch fixes a few memory leaks related to image caching in all clients. common/image.c: Declare facetoname[] as static. Add all code accessing this array. Print warning if image cannot be created. gtk/gx11.c, gtk/image.c, gtk-v2/src/image.c, x11/x11.c, x11/xutil.c: Remove code accessing facetoname[]. gtk/gx11.c, gtk-v2/src/main.c, x11/x11.c: Always call init_cache_data() to initialize pixmaps[] array. gtk/image.c, gtk-v2/src/image.c, x11/png.c: Reject invalid face numbers and fix resource leak in create_and_rescale_image_from_data(). gtk/image.c, gtk-v2/src/image.c, get_map_image_size: Pretend invalid faces to be of size 1x1 in get_map_image_size(). gtk-v2/src/image.c: Properly free opengl resources in free_pixmap(). Fix resource leak when freeing old pixmaps in reset_image_data(). x11/png.c: Properly free resources if an error occurs. x11/x11.c: Ignore invalid face numbers. x11/x11.h Remove duplicate definition of MAXPIXMAPNUM and facetoname[]. x11/xutil.c: Initialize size of pixmaps[0]. Andreas Kirschbaum 2005-03-27 gtk-v2/src/map.c: Fix typo to make it compile without opengl. Andreas Kirschbaum 2005-03-26 Main change of this is addition of opengl drawing for the map in the gtk-v2 client. On my system, the opengl code is about 10 times faster than the sdl code was, making it so I can turn on all the bells and whistles (smoothing, best lighting) and still use less than 10% cpu time. As part of this, I redid the smoothing logic, so the client now requires a new server for smoothing to work (needs push logic, as client won't request smoothing info as that adds a lot of complication). This change was done because the old smoothing code wasn't that efficient - now, we store the smoothing face along with the face it smooths, so finding the smoothing info is much faster. -- configure.in, configure: Add check for -lglut - indication we have opengl libraries available. common/client.h: Remove Smooths struct. Change CONFIG_SDL to CONFIG_DISPLAY, and add CFG_DM_... to denote different display modes, since there is more than just sdl and not sdl now. common/commands.c: Don't have SmoothCmd try to update what spaces need to be redrawn - for opengl, it doesn't care about that, and for most other maps, it will figure it out when it needs to redraw anyways. common/config.h.in: Addition of HAVE_OPENGL line. common/image.c: Remove getsmooth() - rely on push logic. common/init.c: Update want_config[CONFIG_SDL] to want_config[CONFIG_DISPLAYMODE] gtk/config.c: Change access to CONFIG_DISPLAYMODE gtk/gx11.c: Change access to CONFIG_DISPLAYMODE. Add -smooth command line option. gtk/gx11.h: Add smooth_face to PixmapInfo struct. gtk/image.c: Change access to CONFIG_DISPLAYMODE. When getting new PixmapInfo struct, use calloc so we are sure all fields are initialized to zero. Add addsmooth(). gtk/map.c: Change access to CONFIG_DISPLAYMODE. Change how we access smooth face info. gtk/sdl.c: Change how we access smooth face info. gtk-v2/src/Makefile.am, gtk-v2/src/Makefile.in: Add addition of OPENGL_LIBS to link libs. Add opengl.c file. gtk-v2/src/config.c: Add image.h include. gtk-v2/src/gtk2proto.h: Rebuilt. gtk-v2/src/image.c: Change access to CONFIG_DISPLAYMODE. Add hooks for opengl image generation. Change call for pixmap creation from malloc to calloc. Add addsmooth(). gtk-v2/src/image.h. If we have opengl, include GL/gl.h. Add fields for opengl texture maps. gtk-v2/src/info.c: Update so text line wraps if it is too long. gtk-v2/src/inventory.c: Add checks to make sure object face is valid before trying to draw. In icon mode, add code to cleanup old fields (if you drop an item, it wouldn't erase the list item in the list). Also, free callbacks, as they effectively stack, and we were using incorrect object pointers (pointer from first callback, which didn't match current one). gtk-v2/src/keys.c: Add image.h to includes. gtk-v2/src/main.c: Add image.h to includes. Change access to CONFIG_DISPLAYMODE. Add -opengl command switch. Remove +sdl and popups command line options. Relocate setup of cache call setup to after we know all windows have been created. gtk-v2/src/map.c: Change access to CONFIG_DISPLAYMODE. Add opengl drawing hooks. Change access for smooth info. Implement button press code for map window (basically grabbed from gtk/map.c) gtk-v2/src/opengl.c: New file containing opengl draw code. gtk-v2/src/png.c: Remove some unused code resulting in compile warnings. gtk-v2/src/sdl.c: Remove some commented out code. Change access method for smoothing code. x11/xutil.c: Change access to CONFIG_DISPLAYMODE. Add addsmooth() function. MSW 2005-03-20 Applied patch #1161817 (cowboyatheart): Add wands/staves/rods/horns to new pickup (client). gtk/gx11.c: add new 'magic devices' menu option. Ryo 2005-03-13 More improvements for the gtkv2 client, mostly adding SDL support: gtk-v2/TODO: updated gtk-v2/src/logfile: Removed - don't need dmalloc logfile. gtk-v2/src/Makefile.am, gtk-v2/src/Makefile.in: Change program name from 'gtk-v2' to 'gcfclient2'. Add sdl.c to list of files. gtk-v2/src/gtk2proto.h: Rebuilt gtk-v2/src/inventory.c: Fix bug in show_nonmagical() (which corresponds to inventory tab) - was showing unpaid objects, not nonmagical objects. gtk-v2/src/main.c: Remove time_map_redraw declaration from function, since it is declared in map.c. Change map logic to draw when we finish processing network data. Change client naem as it reports itself to server to GTK2 ... Client. gtk-v2/src/map.c: Add map_updated variable which is set by display_map_doneupdate - used by map draw function to know if anything has changed. Clean up some formatting, remove unused code. gtk-v2/src/sdl.c: New file containing sdl support. MSW 2005-03-07 Commit for GTKv2 client - please read gtk-v2/README before using this client. The bulk of the changes are limited to the gtk-v2 directory (addition), but some changes elsewhere as related to using automake. You will need to run configure for the gtk-v2 client to be built (it should be built automatically if you have the needed libraries) -- Changelog: Replaces CHANGES file to meet automake standards. Makefile.am: New file for use with automake. Makefile.in: rebult from Makefile.am aclocal.m4: Updated with macros to check for gtk-v2. configure.in: checks for gtk-v2 added. Chane SUBDIRS to CF_SUBDIRS as using SUBDIRS causes conflicts. utils/config.guess, utils/config.sub, utils/missing: Updated as part of automake changes. gtk-v2/*, gtk-v2/src/*: Files related to gtk-v2 client. MSW 2005-03-01 crossfire-client.spec: Update for 1.7.1 release, make some other changes that better match my system since I don't think anyone else is using it. gtk/Makefile.in: Add crossfire-client.desktop to list of files to add to distribution. README.rpm: removed - had info that didn't really apply to me making RPM files configure.in, configure: Add --disable-dmalloc option to configure. MSW 2005-02-28 ------------------------------------------------------------------------------ Changes for 1.7.1: configure, configure.in: Rev for 1.7.1 release sound-src/Makefile.in: Add files to EXTRA_DIST, fix typo so that make arhive works. MSW 2005-02-27 Add 'show' command back in to list of commands. common/external.h: Change prototype of command_show() to match p_cmd.c prototype. common/p_cmd.c: Add 'show' to command dispatch table. gtk/gtkproto.h: rebuilt gtk/gx11.c: change declaration of command_show() to take const char *. gtk/sdl.c: Make drawsmooth_sdl() static so it won't be put into gtkproto.h file, which causes compilations to fail. x11/x11.c: change declaration of command_show() to take const char *. x11/x11proto.h: rebuilt MSW 2005-02-26 common/metaserver.c: Once we have read in limit of number of metaservers, don't do anymore processing - otherwise, client just crashes. MSW 2005-02-19 Sound cleanup and redo for ALSA9. The bulk of this is to break out the alsa9 code from the cfsndser.c and compile its own seperate cfsndserv-alsa9 executable. Add options to config file/gtk client to support setting which sound daemon to use. Note that ALSA9 sound now works all properly - significant changes had to get made to the code for this to happen. -- configure, configure.in: The existence of ALSA9 sound does not preclude compilation of OSS sound support (or others for that matter), so change the logic accordingly to set variables only used for ALSA9. Add SOUND_TARGETS that can be used by the makefile, change logic of setting SUBDIRS so we don't put sound-src in multiple times. common/client.c, common/client.h: Add sound_server variable. gtk/config.c: Add support for loading/saving sound_server line in gdefaults file. gtk/gcfclient.man: Update about -sound_server option. gtk/gx11.c: Update help and command line processing to support -sound_server option. gtk/sound.c: Change initialization of sound pipe to use sound_server variable (set by options above) instead of hard coded cfsndserv. Path can be either be absolute or relative to to bindir. Also change code so that pipe is set for non blocking output, so if the sound daemon gets hung up, won't effect rest of the client. sound-src/Makefile.in: Redone to handle cfsnserv-alsa9 binary. uses SOUND_TARGETS to know what to build. sound-src/cfsndserv.c: Remove all ALSA9 code, since that is now in alsa9.c file. sound-src/alsa9.c, sound-src/common.c: Nwe files - alsa9.c contains logic for playing sound. common.c is common routines. Idea being that other code could get pulled from cfsndserv.c and use the common.c routines for parsing sound file, etc. MSW 2005-02-13 common/script.c: fix broken script with a parameter change. gtk/help.c: use 'const gchar' instead of 'gchar' as widget text. gtk/win32/config.h: snprintf => _snprintf Ryo 2005-02-12 Makefile.in, common/Makefile.in, gnome/Makefile.in, gtk/Makefile.in, sound-src/Makefile.in, x11/Makefile.in: Add ${DESTDIR} prefix for installation into other directories. Patch from sourcefore #1061895 MSW 2005-02-09 common/external.h, common/init.c, common/player.c, common/proto.h, common/script.c, common/script.h, common/p_cmd.c (new file), common/p_cmd.h (new file), gtk/gtkproto.h, gtk/gx11.c, gtk/help.c (new file), gtk/keys.c, help/chelp.h, x11/x11.c, x11/x11proto.h, x11/xutil.c: Install command table for client side commands - makes adding commands a little easier, but also makes it easier to have better help. Bulk of the changes are in p_cmd.c file, which pulled some code out of player.c. Other source files modified to clean up function parameters (all now take const char * as the command options). Patch from sourceforge 1022245, with some work done by me. Addition fix in gtk/keys.c unbind - buffer overflow would result if unbinding very long binding. MSW 2005-02-09 common/client-types.h: use char instead of __int8 under Windows. common/commands.c: use 'const' for strings when possible. common/misc.c: use 'const' for strings when possible. common/newsocket.c: use 'const' for strings when possible. common/player.c: use 'const' for strings when possible. common/proto.h: use 'const' for strings when possible. gtk/gx11.c: use 'const' for strings when possible. gtk/keys.c: fix a buffer overflow in 'unbind' when displaying keys. Use 'const' for strings when possible. gtk/win32/config.h: don't define 'G_DISABLE_CONST_RETURNS' anymore, strings are now correctly const. Ryo 2005-02-05 Makefile.in: Fix up distclean directive to go into all directories. configure.in, configure: Fix configure so the --enable-feature and --disable-feature flags follow proper standard (from patch on sourceforge). Add check for -lossaudio. Modify check for -lSDL_image library - don't require it for SDL support (if we have it, we'll use it, but for newer versions of SDL, it doesn't seem to exist anymore) common/client-types.h: Minor formatting change. common/script.h: add defines for PF_LOCAL and AF_LOCAL if they are missing. gtk/Makefile.in: Install man page into section 6. sound-src/Makefile.in: Fix up depend command - had wrong variable. Fix up distclean to remove automatically generated files. x11/Makefile.in: Install man page into section 6. MSW 2005-02-04 gtk/gx11.c: send text first, then close popup. Else won't work under some circumstances, text is empty. Fix party password dialog containing only ':' (missing case in dialog handling). Ryo 2005-01-07 common/script.c: add 'signal.h' header, needed for NetBSD. gtk/keys.c: fix buffer overflow when binding a very long command. This fixes bug #1085729. gtk/win32/config.h: fix S_ISDIR macro, even if not used. Ryo 2004-12-21 gtk/win32/config.h: Add parentheses around arguments of sleep and usleep macros. Andreas Kirschbaum 2004-09-19 common/script.c: warn when script start failure (Linux), patch courtesy Kevin Rudat. Check there actually is a parameter to 'script', else that'd crash nicely. Ryo 2004-08-16 gnome/gnome.c, gtk/gx11.c: Fix improper access to history buffer variable. Andreas Kirschbaum 2004-05-24 gtk/gx11.c: Comment out printing of size when we receive config event. gtk/image.c: Remove some superfluos LIL_ENDIAN code that would never be used because it was already in an #ifdef LIL_ENDIAN/#else block. Fix up freeing of data - need to free the pixel info before freeing the surface, don't free the fog pixels since SDL will do that for us. MSW 2004-05-15 gtk/image.c: Patch from bug list to fix compilation on big endian machines. MSW 2004-05-11 gtk/gx11.c: Fix configure_event() to only allocate new data structures if the size of the map area has in fact change. This fixes a major memory leak, as it seems gtk erroneously generates configure events. gtk/map.c: Clean out some commented out code, clean up the formatting of the draw_map function - no actual code change. MSW 2004-05-08 ------------------------------------------------------------------------------ Changes for 1.7.0: common/client.h: synced client version to 1023. gtk/win32/config.h: changed version numbers. gtk/win32/gtkclient.nsi: added scripting documentation. Checks for GTK. gtk/win32/Win32Changes.txt: updated. Ryo 2004-04-25 gtk/win32/porting.c: tweaked SDL's sound support to use panning information. Added missing header files. Ryo 2004-04-11 gtk/win32/porting.c: implemented basic sound with PlaySound. gtk/win32/gtkclient.dsp: added winmm.lib to link list. Ryo 2004-04-11 This is related to Win32 scripting. It now works correctly thanks to archaios's patch. I tweaked it some, so if it doesn't work, my mistake :) common/metaserver.c: call 'script_killall' under Win32 when exiting. common/script.c: some Win32-specific magic to make it work. common/script.h: add Win32-specific function. gtk/gtkproto.h: Win32-specific function. gtk/gx11.c: call the scripting functions for Win32, not like other platforms. Ryo 2004-04-04 common/metaserver.c: use 'draw_info' to report being unable to connect to metaserver. Also changed failure color from red to black, so it appears after the 'trying to connect' even in split window mode. gtk/gx11.c: correctly refresh text windows so failure messages appear. Ryo 2004-03-12 gtk/keys.c: Windows now uses default 'keys' file if player file not found for key loading. Ryo 2004-03-04 configure.in: Remove checks for gnome libraries, since we no longer use gnome/build a gnome client. aclocal.m4: downgrade requirement for needed autoconf version. MSW 2004-02-05 common/init.c: changed 'printf' to 'LOG' for HOME Win32-warning Ryo 2004-02-01 common/image.c: fix stupid crashing mistake. common/rcs-id.h: remove ; after #define gtk/rcs-id.h: remove ; after #define gtk/sound.c: #ifndef WIN32 for cfsndserv specific parts Ryo 2004-01-30 all .c files: all Makefile.in: all rcs-id.h: Basic logging is now complete. All console messages sent by client are now sent to LOG(). All source files versions have are sent to LOG() at startup too (except for the still non compilable gnome client!). Gtk client can show the Logs in 'Help -> Report a Bug' along with a small doc on how to bug report Tchize 2004-01-30 Documentation/ Have added a Documentation directory. It contains a first basic how-to related to client side scripting with two examples. Tchize 2004-01-29 Those fixes are all Win32-specific, except the last one on keys.c common/commands.c: Use correct Win32 function for closing socket. common/image.c: Added missing headers, use correct mkdir syntax. Change a call to 'read', to be on the safe side. common/misc.c: Added missing headers, use correct mkdir syntax, stub functions not yet ported. common/player.c: Use correct Win32 function for closing socket. gtk/gx11.c: Disabled bug window font setting, as GTK2 apparently doesn't use the same fonts. Use correct function for closing socket. gtk/keys.c: Don't display 'Key unused' for left-alt & windows key (as they are often used to switch away from CF). Also fix a potential use of a variable not initialized (rare line corruption case) Ryo 2004-01-29 common/client.c: Win32-specific fixes. common/metaserver.c: small Win32 fixes, explicitely cast meta_sort in qsort. gtk/config.c: Win32-specific fixes. gtk/map.c: added Win32-specific header. Ryo 2004-01-27 common/item.c: check supplied argument to remove_item_inventory is not NULL. Ryo 2004-01-25 gtk/map.c, gnome/map.c: Apply patch by kirschbaum@myrealbox.com which fixes improper coordinate comparision. gtk/gx11.c: Remove some unused declarations. gtk/map.c: always set the cleared flag as spaces come into view. MSW 2003-11-28 gtk/gx11.c: fixed invalid level display for skills under Win32 (int64 issue, %lld doesn't work under Win32) Also removed dumb Win-newlines from previous commits. Ryo 2003-11-22 common/client.h: readded (Win32 only) player's name. Used for specific key bindings file loading/saving. common/script.c: made dummy functions to correctly compile under Win32. Actual implementation will come someday :) Ryo 2003-11-10 x11/x11.c: Fix button pressing in the game window so it properly deals with non standard size maps. MSW 2003-10-26 Those fixes are for Windows compilation ('for Windows' is implicit everywhere). Most code was borrowed from Philip aka Somebdy's previous GTK port. Note: the changed code is embedded in #if(n)def WIN32 / #endif. --- Win32-Readme.txt: added to tell about supported clients under Windows. common/client-types.h: Windows-specific typedefs. common/client.c: missing include fixed, changed fcntl for ioctlsocket. common/image.c: forced opening of files in binary mode to avoid bad troubles. common/init.c: make sure HOME is set, to correctly find paths. common/metaserver.c: made it work, with a specific function (fgets can't work). common/newsocket.c: fix GetInt64_String. Make write_socket and SockList_ReadPacket work. gtk/config.c: use correct header file gtk/gx11.c: fix bad header files. Fix g_free() / free() issue. Catch player's name to load specific keys. Fix score display issue. Other specific stuff. gtk/gx11.h: fix undefined X-Window specific type (Window). gtk/image.c: fix headers. gtk/keys.c: fix headers. Key file uses player's name, when known. Fix input issue with 'entrytext'. Fix missing KeyCode type. gtk/map.c: fix headers. gtk/png.c: fix headers. gtk/win32: Windows specific files. Ryo 2003-10-26 common/client.h, common/newsocket.c: Remove 'extern in errno' lines - errno.h is included, which takes care of the problem. MSW 2003-10-25 ------------------------------------------------------------------------------ Changes for 1.6.0: common/commands.c: Clean up some formatting. common/item.c: Add num_free_items() to try and help see some memory laakage. common/player.c: Add num_free_items command which calls above routine. gtk/gx11.c: Fix movement/firing by using mouse pointer. Map size was hard coded in, so didn't work correct if non standard map size was used. MSW 2003-10-09 Add an option to the gtk client which controls what happens when you use apply to cycle through containers. It used to be closed->applied->open->applied. Now, if you select the config option, it goes closed->applied->open->close->.. common/client.h: Add new config variable. common/commands.c: Remove some dead commented out code. common/init.c: Update save name for config value. gtk/config.c: Update to have menu option in config window. gtk/gx11.c: Change close_container() to send/not send apply based on setting. Add close_container_callback() which is used for the 'close' button, which has to always send the apply command. MSW 2003-10-08 common/commands.c: improve expand_face() - there was the problem if multipart object that overlapped not always being drawn properly. This is because expand_face would basicaly put the first one it received on the lower stack - this is fine if you came from above, but was incorrect if you approached from the south. expand_face() now checks to see which one should overlap the other, based on where the coordinates would put it. MSW 2003-10-07 Bulk of this commit is to fix big image support for the X11 client. common/client.h: Add a couple new defines to denote how big the largest image may be, minimum reasonable map size for the_map structure, and how far off the map a head could be. x11/png.c: Remove hard coded values of images being 32 pixels wide/high. Also, store away actual size of images, needed for big image stuff to get filled in properly. x11/x11.c: Add an error handler to make it easier to catch bugs (gets real stack trace instead of the program exiting). Fix up the gen_draw_face to properly draw big images, change call to allocate map to pass in new larger values. x11/x11.h: Add width, height values to Pixmap data structure. x11/xutil.c: Change the routine to recenter virtual map some - we need to take into account that there can be big images, so include that value in when seeing if we are too close to the map edge. MSW 2003-10-05 common/commands.c: Add call to reset_player_data() - necessarily for data to be sanely displayed for next time player logs in. common/init.c: add reset_player_data - clears out skill data. gtk/gx11.c: Add code to erase skills that current player doesn't know. Some alternative map drawing code also in place, but disabled. gtk/gx11.h: Add ALTERNATE_MAP_REDRAW define. gtk/sdl.c: Add check for ALTERNATE_MAP_REDRAW. MSW 2003-09-12 common and gtk: Client understand the smoothing protocol and the gtk client is able to draw the smoothing information. Tchize 2003-07-08 gtk/gx11.c: Change skill experience display - instead of skill name and exp/level being the same string and same table element, add additional columns, so the skill name is in one, the exp/level in another. IMO, this makes for cleaner display, as the exp totals for the different skills then line up better. Also, fix some display bug when new skills need to be displayed. x11/x11.c: Fix bug where stipple patterns where being improperly displayed/retained in fog of war and darkness modes. x11/xutil.c: always set cleared and need_update flag for map scrolls - fixes bug of big objects (griffons for example) not being drawn properly. MSW 2003-05-25 x11/x11.c: Add darkness and fog of war tiling stipling, so it is now clearer what spaces are dark and which spaces are fog of war spaces. Add -fogofwar and -nofogofwar command line options. MSW 2003-05-18 Bulk of this change is to support the upcoming split skill experience system. skill names are now sent to the client. Backwards compatibility with older servers is in place - however, the client will now only show those skills which the player has a non zero exp total in the stat window. -- configure, configure.in: Add checks for size of long and long long - needed to have 64 bit types. common/Makefile.in: modify proto to define CPROTO so we can avoid including proto.h when cproto runs. common/client-types.h: Add checks to define uint64/sint64 types. common/client.c: Modify setup command to send 'exp64' request. Change definition of skill_names. common/client.h: Make MAX skilled tied in with CS_NUM_SKILLS. update exp and skill_exp to 64 bit types. Don't include proto.h if CPROTO is defined. common/commands.c: Add get_skill_info() which gets skill number->name mapping. Add code to handle exp64 setup request/failure. Update StatsCmd to support 64 bit exp for new skill mapping, as well as 64 bit overall exp for player. common/config.h.in: Add SIZEOF_LONG and SIZEOF_LONG_LONG for autoconf. common/external.h: Add menu_clear() protoype. common/init.c: Add code to init skill values/names. common/newclient.h: Resync from server code. common/newsocket.c: Add GetInt64_String() function. common/proto.h: rebuilt. gtk/gx11.c: always include errno.h. Modify layout of skill exp table (properly set up rows/columns). Add some padding to the entries, and don't pre-set the names. Modify draw logic to handle 64 bit values. Modify draw to only draw skills which player has exp in. x11/x11.c: update draw logic to handle 64 bit exp values, only draw skill exp when player has exp in the category. MSW 2003-05-17 common/client.c: Add some usleeps() in negotiate_connection() - this reduces cpu load when negotiating the connection (given 10 ms for data to actually come in before checking for new data). Also, add a count and if we don't get a response back from the server in the time frame, bail out. MSW 2003-03-24 configure.in, configure: checks added for alsa9 sound - update for cfsndserv.c should come shortly. common/client.c: Fix setup problem - it was using FOGWAR setting when determining if client wanted darkness - should have been using darkness setting. This was resulting in darkness not being used if fog of war was turned off. x11/x11.c: Modify handling of mouse button press logic - rather than only modifier being shift, do appropriate logic if the shift mask is set, but does not have to be only modifier set. -- The following bits changes how fog of war looks in SDL mode. Now, fog of war spaces are drawn in greyscale, instead of half darkness. This makes it clearer what the status of the space is (fog of war/darkness). This change probably uses less cpu to draw, but uses more memory for the images (as it now has to store a rendered greyscale image). If not using SDL, you'll still have the old behaviour (dimmed spaces for fog of war), and no significant amount of extra memory will be used. -- gtk/gx11.h: Add fog_image pointer to PixmapInfo structure. gtk/image.c: Add code to render greyscale image. Also add code to free greyscale image. gtk/sdl.c: Modify map draw code to use grey fog image if space is fog of war space. Disable dimming of fog spaces - no longer necessary as space now looks different. MSW 2003-03-24 ------------------------------------------------------------------------------ Changes for 1.5.0: gtk/png.c, x11/png.c: Fix bug in rescale_rgba_data() that was potentially causing a 1 byte overrun of malloc'd data, that could result in crashes or other odd problems. MSW 2003-02-19 common/init.c: Make sure we initalize all the config values. gtk/gx11.c: fix foodbeep - now only beep when food is low, and continue to beep when food reaches 0. sound-src/Makefile.in: Remove gx11.c in depend statement. MSW 2003-02-04 gtk/config.c, gtk/gx11.c: remove including some files which we don't need included. gtk/keys.c: Modify to not use X11 for keybinding - instead, uses gdk functionality - this should make it more portable. MSW 2003-01-22 Patch by scachi@gmx.de to add different display options for the players resistances. common/client.h: increase CONFIG_NUMS and add CONFIG_RESISTS common/init.c: extend resists_table, initialize resist value to proper value. gtk/config.c: Add config option for selecting different options for resistance displays. Add comment about radio button usage. Increase size of config window. gtk/gtkproto.h: rebuilt. gtk/gx11.c: Update get_message_display to support different resistance display options. Add resisze_resistance_table function. Disable code the causes the message window to get relocated next to the stats display on wide displays. MSW 2003-01-12 x11/x11.c: Patch by Jochen Suckfuell that fixes problem of lines printed out while entering extended commands causes the extended command line to get overwritten - the extended command line is now copied to the next line. common/client.c: Add handling of client if it loses its connection to server during setup phase. common/newsocket.c: Have SockList_ReadPacket return -1 if it gets a real error on read - in this way, callers can tell if error is terminal or retryable (return code 0) MSW 2003-01-03 common/player.c: Break out some of the extended commands into there own function to make the extended_command function more readable. Alphabetize strcmps in extended_command. Add special processing for the 'take' command so that it handles open containers properly. gtk/gx11.c: Add version information to the About dialogue box. gtk/key.c: Fix bug in that extended commands (') didn't work right and would crash the client if not entered in info window. Entering these now works properly, and crashes are removed. Clean up formatting of affected function keyfunc(). help/about.h: Add extra newline to text to make it look better with the version string above. MSW 2002-11-30 gtk/gx11.c: Add patch by jshelley@ictransnet.com that fixes save window positions. MSW 2002-10-03 ------------------------------------------------------------------------------ Changes for 1.4.0: common/image.c: Fix bug of not fulling clearing the cache entry data after allocation. This resulted in various random crashes when using cached image mode. x11/x11.c: Add note about -facset. CHANGES, Makefile.in, configure, configure.in: Update for 1.4 release MSW 2002-09-14 common/item.c: Update comment about possible sorting improvements. gtk/gx11.c: Add missing foodbeep functionality to GTK client. MSW 2002-08-13 gtk/config.c: Fix crash when trying to apply config changes when compiled with SDL support but user is not using it. Fix bug where settings were not being properly updated. gtk/sound.c: initialize sound_pipe to NULL, and have init_sounds close the sound pipe if there is currently one open - fixes bug when switching sound control many times in that multiple cfsndserv processes could get started. MSW 2002-07-25 Makefile.in: if no makedepend, don't run make depend directive. README: Add not about ALSA revisions and possible problems compiling. MSW 2002-07-10 This commit adds graduated colored statbars to the gtk client. What this means is that the color of the statbar goes smoothly from red to yellow to green depending on what percentage of your hp/sp/grace/food is compared to your maximum. To use this, you need to go to the config pane and hit the 'gradually change stat bar color' button. common/client.h: Add CONFIG_ value for this, increase CONFIG_NUMS. common/init.c: Add "grad_color_bars" to config_names array. gtk/config.c: Add button to select this behaviour. Move all the special config checks to beyond the for loop that checks the values in apply_config(). There is no need to check all the values on each loop. gtk/gtkproto.h: Rebuilt for inclusion of reset_stat_bars() gtk/gx11.c: Add two styles to the Vitals (stat bar) structure so we can alternate between them. Default is to initialize one for green and the other for red (in non graduated color mode). This should be more efficient then allocating a new one each time we need to change the value. add reset_stat_bars() to reset the colors of the styles to red and green - needed because the graduated color code will change the colors of these. Remove code that freed these styles. Modify draw_stat_bar() to draw them in color or simple mode, in simple mode, we now just need to use the appropriate style and not allocated a new one. Modify draw_message_window() to pass bar values greater than 1 to the draw_stat_bar() function - in graduated color mode, we draw such values with a blue tinting (more blue the more over it is). draw_stat_bar() knows how to properly deal with these higher values. MSW 2002-07-04 gtk/config.c: Fix setting of radio button set state - it was always setting the same (last) radio button as the active button, which did not match state - now it sets the proper button active - this is for the lighting control toggle. gtk/map.c: Add/subtract 2 to the need_recenter_map function - in this way, code that checks known display position +/-1 will still be within map array. gtk/sdl.c: Fix per pixel (fastest and best) lighting code - this got broken quite a while - it was looking to see if the coordinates for the map structure where within range, and not the real coordinates. Since the map coordinates would almost never be within range, the effect was that the per pixel effects more ore less looked like the per tile effects. MSW 2002-07-03 ------------------------------------------------------------------------------ Changes for 1.3.0: Add support for the 'item2' command. This lets us get the item type from the server so that we don't need to figure it out for ourselves. Also, remove support for the 'item' command - that has long since been obseleted by the 'item1' command. -- common/client.c: Remove 'item' from dispatch table, add 'item2'. Add 'itemcmd 2' as part of setup command we send to server. common/commands.c: Add handling for response of 'itemcmd' setup command from server. Remove ItemCmd() function. Add type to calls to update_item(). Change Item1Cmd() function to be called common_item_command() since both item1 and item2 use almost exactly the same logic. Add Item1Cmd() and Item2Cmd() which just call common_item_command() common/item.c: Init item types to 'NO_ITEM_TYPE'. Remove get_nrof() as it was no longer being used. Add type argument to set_item_values() and update_item(). Simplify code in case of name handling, since we know that we will be using at least the 'itemcmd'. Don't worry about getting proper nrof for the player object - its nrof isn't really meaningful anyways. common/item.h: Add #define NO_ITEM_TYPE. Update type field in item to be 16 bits. common/proto.h: rebuilt. MSW 2002-05-30 The bulk of this checkin adds support in the client for the map1a protocol command and the display of big images properly in the map window. A lot of code cleanup was also done however, including removal for the support of the 'map' (original) command. The map1 has been in the server code for quite a while. TODO: Update what needs to be done for the x11 client. common/client.c: Remove map command, add map1a command to dispatch table. Modify setup we send to server to always try to use the map1a command - there is no reason not to use it. common/client.h: Change some of the CONFIG_ values - basically, change it so that there is just one entry for lighting configuration, but it can have any number of values. Modify MapCell so that instead of having multiple arrays for the different values (faces, sizes), add a MapCellLayer structure that contains the specific face information for that layer. Move the PlayerPosition struct and value to this function so that more of the map decompress logic can be handled in the common code. Remove count value from MapCell since it wasn't really being used. common/commands.c: Add code to set the use_config[CONFIG_CACHE] value based on what we get back from the server. Add code to check the setup response for the for the map1a and map1 options. Add code to deal with expanding big images into appropriate spaces. Move some functions from the gui portion to (display_map_clearcell, set_map_face). Add code for map1_common function to deal with map1a extensions. common/external.h: Remove display_map_clearcell and set_map_face from list of external functions. Add get_map_image_size function. common/init.c: change some values of the config values. Update initialization of config values for lighting. common/proto.h: rebuilt. gtk/config.c: Add new button for lighting - best per pixel. Modify code to properly deal with how lighting preference is now stored. Add legacy support for loading of per_tile_lighting and per_pixel_lighting values from config file. Add diagnostic of bad value if selected map/width is out of range. gtk/gtkproto.h: rebuilt. gtk/gx11.c: Change formatting of draw_list. Modify it so that it adjusts the column/row width based on the largest image it needs to display - In this way, if a player stands on a big building, the entire building is displayed in the look list. add row_height and column_width values so we only need to call the function to change them if they are in fact different. Add +sdl command line option to disable sdl code. Modify gtk_draw_map to include redraw parameter. gtk/gx11.h: remove PlayerPosition structure. add row_height, column_width elements to itemlist structure. gtk/image.c: Add table that is used to determine the scaling used for big images in the look list - in this way, big images still appear big, but not necessary 2 or 3 times bigger. Modify create_and_rescale_image_from_data to use this logic. Add get_map_image_size which the common code uses to determine the number of spaces an image may be. gtk/map.c: remove display_map_clearcell and set_map_face functions - now in common code. Modify the dump map/darkness routines to use the new format of the MapCell structure. Modify set_darkness to only set adjoining spaces for needing an update if lighting type is set that needs this. Remove display_map_addbelow - only used for 'map' command. Modify logic of fog of war code to have it done all at display time - not when setting/clearing a cells contents. Modify gtk_draw_map - this basically follows the same logic of sdl_draw_map - it is now better optimized to only draw the spaces that have changed, and not the entire map - this should improve performance considerably. gtk/sdl.c: Remove #if 0 around putpixel - used for best lighting. Change indention of init_SDL - modify it so that if just_lightmap is true, that really is the only thing that is changed. Modify per_pixel_light code to use both methods of per pixel lighting depending on player prefernce. Modify sdl_gen_map to properly handle draw portion of big images. x11/png.c: Add get_map_image_size function. x11/x11.c: modify display_mapcell_pixmap to use new format of MapCell structure. Remove reference to count in MapCell structure. x11/x11.h: Remove PlayerPosition information - now in common code. x11/x11proto.h: rebuilt. x11/xutil.c: Remove display_map_clearcell and set_map_face functions. Modify dump map code for new MapCell structure layout. Remove display_map_addbelow funtion. MSW 2002-05-21 ------------------------------------------------------------------------------ Changes for 1.2.1: Makefile.in: Add pixmaps/question.sdl to archive list. configure, configure.in: Update for 1.2.1 release. MSW 2002-04-28 gtk/config.c: Allocate string data for want_faceset - data returned by gtk_entry_get_text is non persistent. MSW 2002-04-28 gtk/gx11.c: Fix bug in that the wrong variable was being passed to negotiate_connection, resulting in the sound not being properly communicated to the client. MSW 2002-04-19 Main change is to make all the configuration options now available in the configure window in the gtk client. The way all the various values was stored was changed around, so it is now pretty trivial to add any future options. For the most part, most of the logic of the other code is unchanged - one thing that is different is that the clients use the larger virtual maps that are normally used for fog of map - this means that fog of war can be turned on and off. There are probably some bugs in this, but it seems to basically work - no horrendous bugs that I noticed that prevent it from working at all. - common/client.c: replaced config values with new system. Always send setup mapredraw 1 to server to make toggling for fog of war easier, and it doesn't use any significant bandwidth. common/client.h: Add new value configuration system/defines. remove the old values. common/commands.c, common/image.c,common/metaserver.c,common/player.c : update for new configuration value system common/init.c: Add config_names which is used for the load/save logic. update the init and clear functions to set up new values. gtk/Makefile.in: add config.c file. gtk/gtkproto.h: rebuilt. gtk/config.c: New file - holds the config creating code, as well as the load and save for the gdefaults file. gtk/gx11.c: Remove some widgets now in config.c, move itemlist to gx11.h, remove some other values that are in the new configuration scheme. gtk/gx11.h: Moved several structures and externs from gx11.c to gx11.h so they are available to config.c. Remove several values that are done with the new config arrays. gtk/image.c, gtk/keys.c, gtk/sdl.c, gtk/sound.c: : update for new configuration value system gtk/map.c: update for new configuration value system, modified so that fog of war map logic is used all the time. Change allocate_map to no longer refer to map_size global - use the x and y values in the map structure. x11/x11.c: update for new configuration value system - the x11 portion still uses the old load/save method - this should get converted. Many of the options available in the gtk client have no corresponding use in the x11 client. x11/x11.h: update for new configuration value system x11/xutil.c: update for new configuration value system. Most of the map logic is now synced up with the gtk/map.c MSW 2002-04-03 configure.in, configure: Fix the --disable-sound configure option (when used, it won't look for sound support, and will not build the sound-src directory). Likewise, if that option is not used but configure does not find any supported sound systems, it also will not build the sound-src directory. MSW 2002-03-31 Various fixes/enhancements: 1) For the files stored in the players cache, include the image set suffix (eg, base, clsc) when saving the file. 2) Add a gui update element to the gtk client when running with -download_all_faces. For the cfclient, print the updates to the window. 3) Apply patch by 'Alfie' that shows skill experience in the cfclientp 4) Fix caching bugs with the cfclient that caused it to not work right. common/client.c: Add callbacks to image_update_download_status from the download all image routine. It is this callback that provides whatever update mechanism for the player. common/external.h: add image_update_download_status common/image.c: Modify display_newpng to put in the image set name of the saved cache files if that information is available. gtk/gtkproto.h: rebuilt. gtk/gx11.c: Make get_window_coord non static so other files can use it. gtk/image.c: Add image_update_download_status that draws a progress bar. Convenient side effect is that other GUI elements are now updated as part of this, so player can access other menu items. x11/png.c: Fix some bugs when using cached images - rgba_to_xpixmap was using initialized bpp value - we now know this is always 4. create_and_rescale_image_from_data did not match the parameters as the common routines use. Also missing some logic for allocating the data and linking it back to the cache entry. x11/x11.c: Add display for skill experience. This necessitated making some of the windows bigger. x11/x11.h: Remove now unused fields from PixmapInfo structure (fg, bg, bitmap) x11/x11proto.h: rebuilt x11/xutil.c: Remove code that was storing data into the unusued fields in the PixmapInfo structure. Add missing call to init_common_cache_data. Add image_update_download_status function that just does a draw info. MSW 2002-03-26 Many changes to image handling. The most noteworthy are: 1) Ability to use different image sets. 2) Ability to get checksums of all images and download missing images before play starts. 3) Storing cache information for images in a bmaps.client file so that it can know if it has a match without needing to load the image and checksum it. 4) Can use crossfire-image archives to bootstrap the client with a large number of images to save the time of downloading them later. README: Update some out of data information about sounds, add section describing the image handling. configure,configure.in: Make the SOUNDDIR be based and datadir and not an absolute path - this means using a different -prefix changes the location of where it will find the sound file. Moved some of the defines into the config.h file so that we don't need to pass them as -D compiler options. Add code to properly substitute DATADIR and BINDIR values. common/Makefile.in: Add image.c to list of files. Fix depend directive. common/cconfig.h: Remove some options that no longer did anything. common/client.c: clean up some unused global variables, add a few new ones. and support for replyinfo protocol command. Modify negotiate connection to issue requestinfo requests, set up face set to use, use setup command to set caching behaviour, and support for it to download all image sums and missing images before play starts. common/client.h: Update VERSION_SC to 1027. Remove some unused global externs. Add FaceSets structure, Face_Information structure, the later which holds some user preferences. Add Cache_Entry structure, as well as some state when negotiating the connection. common/commands.c: Add ReplyInfoCmd function. Move FaceCmd to common/image.c. Add handling of received setup command for faceache and faceset information. Remove some dead code. common/config.h.in: Add BINDIR and DATADIR defines so we don't need to pass them on the command line. common/external.h: Add some more functions that are called back from the common area. common/image.c: New file - cache logic, png image load code, and protocol image related commands in this file. This removes some of the code that was previously in the GUI area of the client into a common area. common/init.c: Add TEST_FREE_AND_CLEAR macro. Add code to clear some of the newly added structures. common/proto.h: rebuilt. gnome/gnome-cf.h: remove cache_images extern. gtk/gcfclient.man: Update man page for new options (-download_all_faces, -faceset) gtk/gtkproto.h: rebuilt. gtk/gx11.c: add redraw_needed flag so the map window is properly redrawn when caching images and new images show up. Change some other variables to deal with new image code. pixmaps changed to a pointer so that a copy can be held in the common cache structure. Add support for new options. Remove some code that is now in the common/image.c file. gtk/gx11.h: Remove keepcache, change cache_images, add redraw_needed, and change type of pixmaps to be a pointer. gtk/image.c: Move requestface to the common/image.c, change pixmaps to pointer type. remove finish_face_cmd and ReadImages command. gtk/map.c: Change pixmaps to pointer types. gtk/sdl.c: add redraw paramter to sdl_gen_map. change pixmaps type to pointer. gtk/sound.c: Add missing / when running cfsndserv. x11/png.c: Remove gdk related code from the file. Add rgba_to_xpixmap data so tha the common area can load the png file. x11/sound.c: Add missing / when running cfsndserv. x11/x11.c: change pixmap type to pointer. Add new options (-faceset and -download_all_faces). Remove -keepcache option. change cache_images to face_info.cache_images. Change how the pixmaps are generated x11/x11.h: remove keepcache and cache_images variables. Change pixmaps to pointer type. x11/x11proto.h: rebuilt. x11/xutil.c: remove keepcache option. Change pixmap type to pointer. Move requestface and finish_face_cmd to common/image.c MSW 2002-03-25 ------------------------------------------------------------------------------ Changes for 1.2.0: Makefile.in: add missing pixmaps file for archive. crossfire-client.spec, configure.in: Update for 1.2.0 release. MSW 2002-03-19 Most of the changes are by Edgar Toernig - I've just applied them and checked them in. The stripping out of the display_mode variable is my doing however. configure.in, configure: Add check for zlib before png lib check, as on some systems, png requires -lz. common/client-types.h: Add #ifdef check for SOL_TCP common/client.c: Add fast_tcp_send variable, comment out printing of error from socket EOF. Use TCP_NODELAY for sending data to the server if TCP_NODELAY is available. cs_write_string modified to use cs_print_string. common/client.h: Remove display_mode enum, add fast_tcp_send extern. common/commands.c, common/init.c,gtk/image.c, gtk/map.c cs_write_sting modified to use cs_print_string common/external.h: set_autorepeat extern added. common/newsocket.c: Modified to be better optimized for using TCP_NODELAY - cs_print_string function added. common/player.c: modified to use cs_print_string , autorepeat client side command added. common/proto.h, gtk/gtkproto.h: updated with new functions gnome/gnome.c: display_mode variable removed, cs_write_string replaced with cs_print_string gtk/gx11.c: display_mode variable removed, cs_write_string replaced with cs_print_string, -nofog option added pixmaps/question.111: Resized to be 32x32 pixmaps/*.xbm - used for inventory icons in X11 client, replacing xpm files sound-src/cfsndserv.c: Better error handling, include time.h x11/cfclient.man: -font and -noautorepeat options added. x11/png.c: better error checking for rescaling images x11/x11.c: noautorepeat variable added, display_mode removed, image icon functionality re-enabled, images now created from xbm files, set_autorepeat function added, add ability to set font, add mouse wheel support x11/x11.h: remove screen_num extern. x11/x11proto.h: Updated with new functions. x11/xutil.c: Modified to use image_size instead of hardcoded 24x24 value for the status icons. cs_write_replaced with cs_print_string, no auto repeat functionality added. MSW 2001-01-14 ------------------------------------------------------------------------------ Changes for 1.1.0: README: Update notes on needing png (and not xpm) library. Update mailing alias. configure.in, configure: As the seperate sound program (cfsndserv) is the only supported sound configuration, remove new_sound_system defines and ability to use the old (now non existant) sound system. Have configure exit with error message if png library is not found, as it is critical to the build process. Change it so that gnome/Makefile is always built so that making of releases works. gnome/gnome-cfclient.man, help/about.h, x11/cfclient.man: Update mail address. gtk/gtkproto.h, x11/x11proto.h: Rebuilt, prototypes for some changed for signed to unsigned characters. gtk/gx11.c, gtk/png.c, pixmaps/stipple.111, x11/png.c, x11/x11.c, x11/xutil.c, pixmaps/stipple.111 pixmaps/stipple.112: Mostly changes to fix compile warnings and make sure we are passing the right types to the various image creation functions (8 bit data). sound-src/Makefile.in: Add soundsdef.h to list of things to build. x11/x11.h: Remove extra semicolon. MSW 2001-12-28 common/config.h, gnome/gnome-cfclient.soundlist, sound-src/sounds, sound-src/soundsdef.h: Remove from CVS as it gets automatically generated as part of configure/build process. common/player.c, gtk/keys.c: Send valid count values when sending a fire command. Some spells use the count value (eg dimension door). gtk/gx11.c: Minor change to the trim_info_window code - still causes periodic crashes in the gtk code however. Modify style code so that if we don't get a valid style, we don't crash the client. MSW 2001-11-25 gtk/gx11.c: Made the inventory lists respect the user's GTK font settings, and made the various window parts use the font size to decide what size to make the displays and the window. TSB 2001-11-21 configure.in, configure: Modified so that if not compiling the gnome client, we don't create the gnome Makefile. MSW 2001-11-05 gtk/gcfclient.man: Add -timemapredraw documentation to man page. gtk/gx11.c: Update size of buffers to 100k, instead of 10k. Add some debugging information to when info window is trimmed. Add -timemapredraw command instead of it being a compile time option. gtk/gx11.h: Add extern for time_map_redraw. gtk/map.c,gtk/sdl.c: use time_map_redraw variable instead of define option. MSW 2001-11-04 gtk/gcfclient.man: Update man page to include all options supported by gtk client. gtk/gx11.c: remove some unused #defines. add -trim_info_window option which takes place of compile time option. Re-order command line switches to be in alphabetical order. Add support for client to load/save most all new options to the gdefaults file. gtk/map.c: Some refinements to fog of war so if a space is empty, don't mark it as a fog space to improve performance. Modify gdk draw routine so that it also supports fog of war. There is still some problem in that the client will really bog down in some circumstances when drawing the map. x11/Makefile.in: Add cfclient.man to list of files. MSW 2001-11-03 Complete client re-org. Create common, gtk, gnome, sounds, and x11 subdirs. Gtk client: only image support is png. Also add resizing options for the images (-mapscale/-iconscale), remove pngximage, update sdl image and normal draw image to support arbitrary image sizes. sound: Only support new sound system. MSW 2001-11-01 gx11.c: Modified to know about new pickup mode (frontend - most all the work is still done on the server). Patch by Nils Lohner. MSW 2001-08-28 Add reset_map_function into xutil.c that gets called after we lose a connection to the server. This fixes a problem of some leftover images from the previous session appearing in the map windows. MSW 2001-08-12 client.c: add call to reset_map_data proto.h: rebuilt xutil.c: Add reset_map_function (mostly a copy of reset_map), make some other functions 'static' so they don't show up in proto.h Fog of war code checkin. This is a fairly complex check in so hopefully not too much breaks. This adds the feature where tiles that have been seen but have since moved out of LOS are still shown on screen but with a 50% transparent black tile over it show it is no longer in LOS. Whatever was in that tile is still shown until a new update comes in from the server at which point the tile is cleared of all old info. The old way was to just paint an opaque black tile. To do this the client now keeps state of as many tiles as it can and remembers which tiles have been marked as cleared. This is a fair amount of memory so when -fog is not specified, the code reverts back to a much smaller in memory map. To allow this, the map structure is now dynamically allocated. I also had to add a new protocol command "newmap" so the client knows when to reinit its map state. NOTE: This feature only works when the client is using SDL. No reason the other blitters can't take advantage of it, just hasn't been done yet. client.c: fog_of_war global variable and newmap cmd added to CmdMapping Added "newmapcmd" to SetUp command. client.h: FOG_MAP_SIZE macro and Player_Position struct commands.c: handled "newmapcmd" sent from server, added NewmapCmd which just calls display_map_newmap(); gnome.c: stub function for display_map_newmap(); gx11.c: Modified all commands that take x,y coordinates to convert to the virtual coordinate system if fog_of_war is active. Added code to sdl_add_png_face to paint a fog_of_war cell over cleared but still in view tiles. Added handling of Control-shift-i to simulate a newmap cmd. Added -fog cmd line option. Added display_map_newmap() function that resets the virtual map state. Correctly deal with dynamically allocate map structure. proto.h: Added new prototypes by hand. x11.c: Added code to dynamically allocate map structure. Added stub function for display_map_newmap(); xutil.c: Modified functions to convert to virtual coordinate system when fog_of_war is active. Modified display_map_clearcell to not clear cell when fog_of_war is active, now just marks the tile as cleared. New function "allocate_map" to dynamically allocate a new map structure and setup the 2 dimensional array pointers correctly. New function, reset_map that clears out the map structure and resets to coordinate system if fog_of_war is active. Changed map_scroll to only update the virtual coordinates on scroll instead of moving memory around if fog_of_war is active. Also checks if the view is close to the edge of the virtual map and recenters it if so. SMACFIGGEN 2001-07-21 Speed optimization to the SDL rendering code. sdl_add_png_face now exits when all 5 dark[] array values are set to full bright. gx11.c: Added a line in the per_pixel lighting section that exits right away if all darkness values are set to 255. SMACFIGGEN 2001-06-23 Quick fix to the get_metaserver function. It was originally calling gtk_main_interation() in a while loop. This is really really really slooooow. I replaced it with a call to gtk_main(). gtk_main_quit for this invocation of gtk_main is called in enter_callback() when the user types in the metaserver he wants to play on. This is WAY faster then the old method. gx11.c: Changed get_main_interation to gtk_main in get_metaserver. Added call to gtk_main_quit() in enter_callback() when state changes from Metaserver_Select to Playing. SMACFIGGEN 2001-06-19 Fix for the sdl/pngximage clients where the client would draw stale data on blank squares after a mapscroll. Basically if you had say an image of a wall on the bottom of your screen and you walked down one tile. If the new tile on the bottom of the screen is now blank, the client would have drawn the wall again and you get a funky recursive effect. The fix is in the display_mapscroll function in xutil.c. xutil.c: Modifed display_mapscroll so that new cells just coming onto the screen would be marked as the_map.cells[ax][ay].need_update= 1. For cells that are already on screen and just moving, we still leave need_update= 0. SMACFIGGEN 2001-06-19 This checkin puts Scott MacFiggen's SDL support into the gtk client. I've made some enhancements to the code - it can now co-exist with the other image formats (so if all the libraries are available, you can choose from -xpm, vanilla -png, -png -pngximage or -sdl (which also forces -png). aclocal.m4, configure, configure.in: Add checks for SDL. client.man: Update with -sdl option. config.h, config.h.in: Add HAVE_SDL define gx11.c, xutil.c: Support for SDL drawing. A lot of the code in xutil.c is command with that of pngximage. gx11.c adds some additional options beyond just the drawing - per tile darkness and gridline options available under the client config window. MSW 2001-06-17 client.c,client.h: Add want_darkness global variable, include when in setup command we send server. client.man,gx11.c,x11.c: Update to include -darkness/-nodarkness command line options commands.c: Change handling of negative results from server on setup command. MSW 2001-06-16 The main thing this fixes is a major memory corruption problem when using -pngximage with the client. Better darkness display is also when using -pngximage, but it depends on a server change (the change basically lets the client do blending from completely dark spaces. ++ cconfig.h: add METASERVER define option which determines if client should try to contact metaserver or not (useful to turn off if behind a firewall so you don't have to wait for the timeout) client.c: add metaserver_on, map1cmd to global variables commands.c: divide by mapy value instead of 11 when using old map command - needed if playing with smaller maps. set map1cmd value on/off depending on type of map command we receive from server. gx11.c: Add BPP define for internal testing to see if using 4 bytes/pixel gives any speed of 3 (answer is performance is the same or slightly worse with 4bpp). when run with mapsize with x>15, create windows with bigmap outlook (message & stats above map, and not above/below). Fix bug in -mapsize processing which would set invalid sizes. Various cleanups to use image_size instead of 32. Changes in drawing to also use BPP define value instead of 3 is various areas. Optimizations for darkness rendering. Use map1cmd global variable to know the packing form instead of looking at map size. Improved darkness handling to know if adjoining spaces have valid darkness information instead of looking at number of tiles. metaserver.c: if metaserver_on isn't set, don't try to get metaserver information. png.c: remove end_ptr processing - wasn't getting used, so not allocating/ freeing it should improve performance a little. Also, move png_set_filler call to before calling png_read_update_info - this fixes a memory corruption problem. x11.c: use map1cmd for determine packing information in map, fix bug in -mapsize command processing which could result in invalid values being used. xutil.c: add have_darkness value to mapcell structure. Set value when we have valid darkness information for this space. This allows the client to use darkness for blocked spaces if the server provides it. update to use BPP instead of 3 for copies of image data. MSW 2001-06-12 This is actually a fairly big checkin: 1) add large map support into the client (use -mapsize option) 2) using GdkRgb structure for drawing the map. This prevents some more advanced map handling functions (like true alpha) as well as much better darkness support (use -pngximage option) cconfig.h: add TIME_MAP_REDRAW define. I originally used this to benchmark my improvements with the gdkrgb code, but throught it may be useful to others client.c: add map sizing global variables. Add map1 protocol pointer. request different mapsize of server. client.h: add map sizing variables to extern declarations. client.man: add description of -mapsize and -pngximage commands.c: Make it more forgiving about extra spaces in setu command. and support for mapsize option of setup command. Add option to map_doneupdate which controls if we want a full redraw or not. Add Map1Cmd command which handles map1 protocol command. gx11.c: Add support for big maps as well as gdkrgb backing images. Add support for -mapsize and -pngximage command line options. Lots of new image drawing code for pngximage. Add resize_map_window function which is called when new map size is negotiated with server - depending on new and old values, re-arrange some windows. png.c: add png_to_data function which takes the png image and and returns rgba data. used by pngximage code. x11.c Add big map support (-mapsize option). It otherewise lacks many of the other features I added to gx11.c xutil.c: add png_data to image structure, and have data put here when using pngximage mode. Move some of the basic map handling functions here - not the stuff that draws the map, but what sets up the server idea of wha the map looks like in terms of spaces. MSW 2001-06-04 The three main things this checkin does: Ability to save relative sizes of gtk subwindows, and have those restored when re-running the client. Use of the setup protocol command to set configuration values. Receipt of skill experience information, and display of that in the gtk client. ++ Makefile.in: Remove Protocol entry Protocol: Removed - now located in server/doc directory. client.c: Add value to determine if we want this option, initialize global array that maps the number to skill names. Add support for 'setup' protocol command. Send sound selection using new setup command. client.h: add MAX_SKILL to no max number of skills. And skill experience and level total to Stats structure, put extern for skill_names array and want_skill_exp value. commands.c: Add SetupCmd function which handles processing of 'setup' protocol command. If sound setting fails with setup command, fall back to old method. In StatsCmd, add code to get skill experience and level totals. gx11.c: Add ability to save window size and relative pane positions in non split mode, as well as loading and setting of those values (required moving pane information widgets from create_windows to global values) - while at it, renamed this to be more descriptive. Have client now display skill experience totals in stats window. metaserver.c: Make meta_sort a static function so that it does not get put into proto files. Its only used within the metaserver.c file in any case. newclient.h: Add CS_STAT_SKILL* values (to keep in sync with server version of this file) proto.h: automatic rebuild needed for SetupCmd function. MSW 2001-05-28 gx11.c: remove some unused code. Add color for cursed/magic items in the unlocked inventory pane (makes it easier to sort items picked up) Add support for trimming the info window buffers - now gtk just has to be fixed. Have the second information window do the seem freeze logic as the first. Fix problem of trying to access to many resistance labels (may fix some reliability problems). Remove -scrolllines command line option since the client does not use it. xutil.c: Don't load/save scrolllines line in config file when included with gx11.c - gtk client has no use for it. Add newline to error message about lines in default file we did not process. MSW 2001-05-25 client.c: update call to metaserver_show client.h: make meta_server, meta_port vars available to other files. gx11.c: clear echo hiding after user completes entry in text window. metaserver.c: Add parameter to metaserver_show which determines if we display instructions for selecting metaserver. Re-get metaserver information if user hits enter on metaserver selection. player.c: Add metaserver command that gets updated metaserver information. proto.h: rebuilt. MSW 2001-04-29 gx11.c: Add disconnect menu item and callback function to disconnect from server. player.c: Fix/improve firing logic. Was problem with gtk client in that it would stop firing after a little while when holding shift direction. This was because the outgoing command queue got filled up and never emptied because it still sent fire_stop commands. Add 'disconnect command to disconnect from server. MSW 2001-04-28 Makefile.in: Add gx11.c to depend directive, so it recompiles properly on changes to png.c, xutil.c command.c: clear no_echo instead of letting the graphic handler do this. also add call to x_set_echo - this fixes cases in nopopups mode of it not switching to echo things properly. gx11.c: Add nopopups/splitinfo options to configure menu. Add x_set_echo function, and remove detection of this from do_timeout. proto.h: automatic rebuild. x11.c: Add setup x_set_echo function. xutil.c: Add saving/loading of splitinfo and nopopups value to/from ~/.crossfire/gdefaults file. MSW 2001-04-27 Note: by default, the command history forward/back keys are not bound to anything. At least on Sparc/Solaris systems, the up key in the cluster of 4 arrow keys is the same keysym as the the key on the keypad, so by automatically binding these, you basically make it so the player can not move north/south, so I figure its better to let players bind them safely. gx11.c: Make the command completion key as well as history move backwards/ forwards custom settable by the player. Also, resize the width of the name/weight window for the look window the same way we do for the inv window. xutil.c: Add support for binding command completion and history scroll keys. Also, add support of loading/saving these bindings (As well as those for fire keys, run keys, command keys. MSW 2001-04-20 gx11.c: Have it hide password entered when using -nopopups mode. Add command completion with tab. remove some dead code. Add command history. Accessible through the up/down arrow keys (the 4 keys between the standard keys and the keypad, not the arrow keys on the keypad.) This feature is barely tested. Most of the editing functionality used here is what gtk provides. MSW 2001-04-20 client.c: add image_file declaration. Also, properly handle cases where the option given by -server (or config file) is not a valid server - go back to metaserver selection instead of looping infinitely. client.h: add image_file declaration. gx11.c: Lots of changes. remove duplicate code between this file and xutil.c. Add show_unlocked inventory tab selection. Add -nopopups command line option which prevents pop up windows. Also results in the count value getting cleared when used. Add -splitinfo command line option that results in two info (Text) windows - one for colored text, one for normal text. When resizing pane that has inventory listing, now updates inventory headings so weight keeps constant width so that the space for the name increases. Implement command_show options so that 'show' command will rotate through tabs (or goes directly to tab if right name is given) of inventory display options. Add handling for -pngfile option. player.c: add complete_command function that returns complete server command when partial string is passed to it (currently only used by x11.c) x11.c: Add unlocked inventory show option. Add command completion via tab key when entering an extended command. Add -pngfile support processing. xutil.c: Modified with #ifdef GDK_XUTIL so the gx11.c file can include this file to reduce duplicate code. Have cache code look in gfx directory first for images to load. Also have cache code then look at images loaded by -pngfile for match before looking in images previously download, then request image from server if we still don't have an image. MSW 2001-04-19 ------------------------------------------------------------------------------ Changes for 1.0.0: player.c: Fix for client crashes if player enters really long commands (like say .....). MSW 2001-05-08 gx11.c,command.c: Remove some debug statements which really should not be there for 1.0, and which are not really useful anyways. items_types, item_types.h: Varioius minor updates. MSW 2001-05-04 gx11.c: Fix bug that causes gtk client not to update weapon speed. metaserver.c: Have the listing get sorted by hostname to make it easier to find the host the user may want. MSW 2001-05-02 ------------------------------------------------------------------------------ Changes for 0.98.0: item_types,item_types.h: Change matching for sword - hopefully this should fix problems with dancing sword spellbooks. MSW 2001/04/06 gx11.c, item.c: move animations of the look window to the client. All the necessary was already being sent to the client - it was just needed for the client to use this information. Also remove some #if 0 code from gx11.c. MSW 2001/03/28 item.c: set_item_values - only resort items based on name if the name has changed. This fixes a problem with items moving around in the inventory if you lock/apply/unapply/unlock them. MSW 2001/03/23 ------------------------------------------------------------------------------ Changes for 0.97.0: MSW 2001/03/18 Change so that containers on the ground still keep proper contents even if the map space itself changes (spells or other objects going onto the space). This is done by using the cpl.container pointer and when getting an updated map space, seeing if one of the map space object tags match that. commands.c: update the cpl.container tags when opening/closing containers. item.c: Have locate_object see if the container matches the tag. Don't have remove_item remove the object contents of other attributes if it is the container, but still remove it from the list it is on. item.h: remove function prototypes - these are in proto.h MSW 2001/03/13: png.c: New png -> X11 (or gdk) creation routines that are much faster. This should make a noticable difference in performance. Note that the X11 and gdk implementations are very different now - the gdk implementation lets the gdk library do most of the work. gx11.c: remove some dead code, add call to gdk_rgb_init() if using png images - needed by new png loader. x11.c: Add call to init_pngx_loader if running in png mode. Also pass colormap by pointer so png_to_xpixmap can modify it. xutil.c: pass colormap by pointer to init_pngx_loader (same reason as above) MSW 2001/03/06: Makefile.in: Add DMALLOC_LIB definition instead of it going in with the the default libraries. cfsndserv will now get properly linked with dmalloc. configure.in, configure: add --disable-sound option, and make relevant changes to use that option (which basically amounts to not checking for any of the sound systems). Add check for dmalloc.h. change substitution for -ldmalloc. cfsndserv.c: Modified so it now compiles with the modern ALSA sound system. No idea if it actually works. MSW 2001/03/04 metaserver.c: Modified so it uses the value of -port if that command line option is given by a user. MSW 2001/03/01 x11.c: Fixes for info window resizing. This should fix some crashes and the code is a bit simpler now. MSW 2001/02/28 Makefile.in: Modify so that it installs the target (cfclient, gcfclient, cfsndserv) one at a time so it works with the install script. item.c: add insert_item_before_item function. Modify the sorting function so it first sorts by type, then by locked/unlocked status, and then by alphabetical order (not including the number prefix). item_types, item_types.h: More updates of missing objects or ones that need more specific matching rules. x11.c: Remove a lot of duplicate code that was in place for metaserver support - instead, just add checks to the existing X event handling code to know not to do some things if we're in metaserver selection mode. This fixes a bug in that resize events would not be handled if in metaserver selection mode. MSW 2001/02/22 ------------------------------------------------------------------------------ Changes for 0.96.0: MSW 2001/02/02: Protocol: Update with new face1 command that includes checksum. client.c: add face1 protocol command. client.h: Update version_sc to 1026. commands.c: Move FaceCmd from gx11.c/x11.c to this file, since it now only does decoding of data and passes rendering off to appropriate file. Also add Face1Cmd function that deals with checksum. Both of these functions pass off the rendering to the same function. gx11.c: add keepcache variable, re-do facing loading/caching - if we have local version of face, generate checksum of it and compare to that against what server has. finish_face_command added to do this - called by the face functions in commands.c. Add -keepcache command line option which will have it not request images from server if checksum is different. Add usleep in metserver selection area to prevent client from hogging all the cpu time. item.c: Add support for ^ in items file to say only match at start of line. Useful for 'bolt' - doing substring also matched against firebolt. item_types, item_types.h: make bolt ^bolt, add Head and hauberk to matching criteria. proto.h: automatic regen. x11.c: As gx11.c above, plus: Use one font for all windows - reduces complexity. Add easy selection of font to use with -font command line option. xutil.c: As gx11.c for relevant functions that are located in this file and not x11.c End of MSW 2001/02/02 checkin. MSW 2001/01/31: client.c: Clear player inventory and look windows after disconnection from server. Prevents client crashes. gx11.c: various fixes - window placement no longer always centered on screen (very obnoxious if running xinerama), various prototypes fixed up, clear map data after clearing image data. player.c: Add suport for 'mapredraw' command. Not that this should ever really be needed, but the server supports it, so its nice to be able to use it. x11.c: Fixes prototype/casting problems when clearing pixmaps. Like gx11.c, clear map data. xutil.c: add better description to the unbind command. MSW 2001/1/13 (except as mentioned, all changes by MSW): Makefile.in: Create destination dirs, remove extra tab. Patch also by Dave. Protocol: typo fixed. config.h, config.h.in: Add HVAE_DMALLOC_H #ifdefs. Checks currently disable in configure.in, as with it, the sound won't like properly since it needs -ldmalloc, and I haven't bothered investing that much time into fixing the Makefile. gx11.c: Patches by Dave Peticolas - mostly code cleanup, but one new feature is support of wheel mice to move the scrollbars. png.c: No real code change, just adjustments in some ordering which I think makes the code appear a little simpler. x11.c: Minor code cleanups, some formatting changes, some to make better error messages. End of MSW 2000/1/13 checkin. MSW 2001/1/8: client.h: Change damage type to be 16 bits. MSW 2000/12/24: png.c: Fix a major memory corruption issue - the png function was re-allocing for a larger hunk of data, but did not update the pointer and was still using the pointer to the smaller hunk. Severity of this bug depended on luck - if the first png downloaded happened to have the full 4 bytes/pixel, it never needed to do a realloc so would work fine. Otherwise, a matter of luck what data got stomped over. Also, modified the main function in this file so that it you can compile against it and it now works with the new in memory data read. MSW 2000/12/19: Metaserver update. Most files updated. This change has the client connect the metaserver and lets the user choose which server to connect to. Also, if the client loses a connection (either because the player has quit playing or the server died), the client will no longer exit and instead go back to the server selection screen. A few unrelated changes (cfclient): when running cache, non downloaded images should look better. Also, client starts up with larger window in Png mode to take into account the extra space png images takes up in the game window. Changes by file: Makefile.in: Add metaserver.c file. cconfig.h: Add metaserver configuration information. client.c: Add meta_ variables, move resists_name to this file, no longer have DoClient exit if it gets an error on the socket (instead mark the fd as -1 and return), change main loop such that if connection to server has been lost, go through loop to establish a new connection. client.h: Add Metaserver_Select input state. Change resists_name from a static to extern. gx11.c: Remove some unused code, various code cleanups, and additions to support the metaserver connection process. init.c: Add reset_client_vars - call it between connections to servers. proto.h: rebuilt for new functions. x11.c: Update for metaserver connection status. If running Png mode, have windows created larger. xutil.c: When creating default images for cache, create 32x32 images for png mode, not 24x24 images. metaserver.c: New file for metaserver code. End MSW 2000/12/19 checkin. MSW 2000/12/10: png.c, gx11.c, x11.c, xutil.c: modified to use in memory loading of png's. This means that if not caching images, we don't need to write it out to a temp file. This should result in a minor performance gain, but also remove the need of using tmpnam. Also, modified gx11.c so that it uses same logic as the x11 client for extended command key ('). Before gx11.c client would use both ' and ", and there was no way to unbind the later - since one can always bind the command key, I found that a bit annoying. Updated to display resistance values in the message window. Except for armour, this is only displayed when running against serves with PR code. Change for both cfclient and gcfclient. Files affected: Protocol client.h commands.c gx11.c newclient.h player.c sounds soundsdef.h x11.c MSW 12-3-2000 ------------------------------------------------------------------------------ Changes for 0.95.8: Checkin on 2000-11-7 by MSW: item.h: Update NAME_LEN to 128, as the server may send us names that long. Also, terminate the name after we copy it. Checkin on 11/3 by MSW: Remove remaining font support for x11 client. Allow setting default display mode and server to connect to in the cconfig.h file. Files affected: CHANGES, cconfig.h, client.c, client.h, gx11.c, x11.c, xutil.c ------------------------------------------------------------------------------ Changes for 0.95.7: Makefile.in: Update to include png.c when packing up distributions. configure.in, configure: Move check for -lm before png check, and libpng on sparc/solaris systems require math library for proper linking. Also, change the -with-xpm* to -with-ldflags and -with-includes to be more general since extra values may be needed for more than just xpm library. client.man: Updated for information about png images and cwindow command. README: Updated with changes mentioned above with the --with-png options. gx11.c: Remove all support for pixmap images. They didn't work anyways, but you could specify -pix on the command line and get no images - now it will at least result in an error message. Also, savedefaults will now save png status properly. xutil.c: Modified so that it will save png status when savedefaults is issued. MSW 8/24/2000 The following change removes imlib as are png loading/rendering library - instead, we use our own local function located in png.c. libpng is still needed, but it removes the dependancy on imlib. Also, my home spun function renders all the png images crossfire uses correctly, while imlib had several it did not do properly. MSW 8/13/2000 Files affected: config.h, config.h.in: Change HAVE_IMLIB_H to HAVE_LIBPNG configure, configure.in: Change check from imlib to libpng. gx11.c,x11.c,xutil.c: Changed to use our functions and not imlib. png.c: new file that has our png support in it. cfsndserv.c: Make some changes so that sound on ultrasparc systems is played properly. Missing FD_SET call to re-add the soundfd, as well as a missing wrap check for first_free_buffer. MSW 8/10/2000 The following matches a change made to the server which includes two piece item names to make the item names in the client appear more perfect. Protocol: Updated to document the new item name transmission method. client.h: Update SC version to 1024. item.h: Remove name and o_name from item structure, instead there is now d_name, s_name, and p_name, representing the display name, singular name, and plural name. display name is derived from the s/p names plus nrof value. commands.c: Chance strncpy to memcpy, as a null character is used to seperate the two name values. UpdateItemCmd is also modified to supply an empty string to set_item_values instead of the same name if the name is unchanged. gx11.c, player.c, x11.c: use d_name instead of name to correspond with changes to item.h item.c: Update item initialization and clearing functions with new name elements. Update set_item_values with new two piece name support. remove adding 'a' and 'an' prefix to singular objects, as it generally doesn't look good in the look window and isn't all that useful in the inventory window either. Mark Wedel 8/6/2000 item_types, item_types.h: Update with new item types - MSW 7/19/2000 player.c: Comment out command buffering output - MSW 7/19/2000 ------------------------------------------------------------------------------ Changes for 0.95.6: configure.in: Update for 0.95.6 release. x11.c: Change MAX_BUF definition in to match that in config.h Update README for necessary libraries. configure.in, configure: Re-order testing of Xext, Imlib where we still have the any special link flags set. Also, when finding these, explicity set them in the X_LIBS variable and not the default, since they are only needed for the X11 client. MSW 6/16/2000 Protocol: Update for png information - addition of image command. client.c: Add support for image command. Change initializing so we get the protocol from the server early on - we need to know it before we tell it what facemode we want, as it may not support png images. do protocol version check and if the server does not support it and the user request png, fail out. client.h: Increase versions of protocol. Add Png_Display to possible display modes. command.c: Add ImageCmd function which processes the image command (used for receipt of png images). the use of the image command can be abstracted in the future for other image formats quite easily. config.h.in (& config.h): Add HAVE_IMLIB_H define which lets us know if the imlib is available. configure.in (& configure): Add detection for imlib and set the appropriate variables so that they get linked properly. Also add check for Imlib.h gx11.c: Update for png support - add display_newpng command, change XPM_SIZE to image_size and make it a variable and not a define. Pull in appropriate imlib support, as well as rendering of png data. Some dead code removed. display_usepng, display_usxpm, and display_newpng functions added. newclient.h: Add CF_FACE_PNG constant for CS communication. proto.h: Updated for new png functions. x11.c: Many of the same changes as gx11.c above. More work was done here as the 24 image size was hardcoded into this file - it is now a variable also, so supporting other image sizes in the future should also be quite easy. Once the Png's are rendered, they are drawn the same was as the Xpm's are, so many checks for display_mode==Xpm_Display also check for Png_Display. xutil.c: Support for PNG images added. Changes are mostly related to caching code. Changes by Mark Wedel, 6/2/2000 Makfile.in: Have cfsndserv.o removed when make clean is done. Also add a 'distclean' directive which removes the config.cache/log/status files as well as the executables. MSW 5/29/2000 x11.c: Fix bug introduced in 4/20 update which would cause xpm display mode to fail with no such face warnings - code check was in the wrong place - MSW 5/7/2000 xutil.c: Improve logic for built in keybindings - if the def_keys specifies a unique keycode, we don't update the keycode - this is necessary for some keyboards to have working keybindings (for example, sun Type 5 keyboards use the Up keysym for both the arrows and the keypad, so we can't get the keycode for both with the XKeysymToKeycode file - MSW 5/7/2000 Add key ring to item_types and item_types.h file in the container category. MSW 4/21/2000 Change Makefile.in to use perl that configure has found when running items.pl script - MSW 4/21/2000 License: Add license file for the client - MSW 4/20/2000 cfsndserv.c: Various changes 1) Add support for sound on Sun (solaris) systems - another init_audio function added. 2) If in SOUND_DEBUG mode, also print out the audio device we would try to use. Also, add x,y coordinates when printing debug information when playing a sound. 3) Add various casts to reduce compiler warnings on going from signed char to unsigned char data types. 4) For 16 bit output, big endian (sparc) should now work - have two sections when packing the sound information to pack it the write direction depending on endianess of the machine. 5) Ignore the device entry in the .crossfire/sndstat file - using that resulted in incompatibilities between system types. If player needs to use a specific audio device, the AUDIODEV environmental variable can be used. --MSW 4/20/2000 configure.in (and configure): Many fixes: 1) On solaris, add -R flag to linker options if --with-xpm-lib=dir is used - needed to run the client when dynamic linking is used. 2) Add AC_C_BIGENDIAN check - we need to know the byte order for sound to work on both sparc and other systems properly. NOTE - when running autoconf, you will get a warning about that line. 3) Add detecition for solaris audio include, and add appropriate declarations to use it. 4) Fix for xpm check - if X11 includes are in a nonstandard place, it would fail to find xpm.h since that includes some standard X11 files. Add X_CFLAGS which includes any necessary -I options for this to work. --MSW 4/20/2000 config.h, config.h.in: Add WORDS_BIGENDIAN define to file. MSW 4/20/2000 x11.c, xutil.c, client.h, client.man: Only update keycodes for the local keyboard for standard keybindings. Custom keybindings will keep their old/original keycodes, which is often needed. Add -updatekeycodes option so have it update all keycodes. client.man updated to describe the -updatekeycodes command. MSW 4/20/2000 gx11.c: Above update for keycodes added. Also, update so that it has the same set of command line options that x11.c does (-nocache, -nosound) MSW 4/20/2000 x11.c:add closing comment - the missing close comment was just resulting in warnings of 'comment detected inside comment' - the change does not affect the execution of the code. MSW 4/20/2000 item.c: Remove extra semicolon that was resulting in compiler warnings. Update mail address/copyright date. Mark Wedel 4/18/2000 Makefile, config.cache, config.status: Removed from CVS tree it should not be distributed - rather each person should generate it on their own by using the configure script. One advantage of removing these is that a 'cvs diff' of the directory won't show the diffs of these automatically generated files. Mark Wedel, 4/12/2000 commands.c, client.h: Change animation code to dynamically allocate space needed for animations instead of using a statically defined/sized array to contain the face information. This fixes a bug with icors causing the client to crash (it had more animations than the static array had), and this method is just generally a good idea. Mark Wedel, 4/12/2000 x11.c: Add code into gen_draw_face so if a request to draw a nonexistant face is performed, it will handle the problem gracefully. Mark Wedel, 4/12/2000 ------------------------------------------------------------------------------ Changes for 0.95.4: README updated to give better install directions - msw. Add checks to xutil.c to verify we have a valid keysym before trying to convert it to a string and print it out. Before, this could result in trying to print null strings, which would cause a crash - msw. fix unbind and bind in xutil.c so they properly skip over leading spaces - msw. fix Makefile.in so make depend will pick up x11.c dependencies - msw. Fix 'help command so that the draw info commands are formatted to fit on the default window width (player.c - msw). Fix so that cwindow without options results in a message that an option is needed instead of causing the program to crash (player.c - msw) Update Makefile.in so that make install works again - msw Updated gtk client with speedups in text handling and drawing. It should now remain responsive during massive text updates on slower machines. Prepared with a single define (XPM_SIZE) for 32x32 graphic tiles. /David ------------------------------------------------------------------------------ Changes for 0.95.3: Don't link in -lnsl -lsocket on sgi systems. Don't link in -lnsl on linux systems. This list probably needs to be expanded. Gracefully handle failures of the sound daemon for whatever reason (most likely because there is no good sound support). Client should now detect write errors and just stop trying to write stuff to the sound daemon. Improve logic in cfsndserv when adding to the buffers. Prior, it would actually skip over buffers, and logic on determine the amount of data was faulty if a short sound was played after a long song. Fix in cfsndserv.c so that it will read the device entry in the ~.crossfire/sndconfig properly. Include sys/select.h if we have it in cfsndserv.c. Some systems appear to need to for proper compilation of that file. Also, #ifdef for checks already done to determine if we should include some includes or not. Status line should now show hp/sp/gr successfully when player has totals greater than 100 in those stats (From Timo Kokkonen) Option to have system beep when low on food - setable via foodbeep command. (From Timo Kokkonen) Better logic to prevent 'You can not issue commands - state is not ST_PLAYING' warning from Timo Kokkonen) Various non functional changes that should prevent warnings during compile (From Timo Kokkonen) Have client create the ~/.crossfire directory if needed prior to saving keys. Change client help command so it will not display client side help information if the user is requesting help on a specific command. Ability to specify location of sound files at the configure state with --with-sound-dir=/some/path Support for SGI sound system added by Paul Mikell, configure detection for sgi sound by Pertti Karppinen (both untested by me since I don't have an sgi handy) ------------------------------------------------------------------------------ Changes for 0.95.2: Improve item_actions so it can handle getting pashed null objects (just return then) In create_item, only add to an objects environment if we actually have an environment to add to. configure.in changes - special check for alpha systems. Add configure option for new/old sound, and auto detection of alsa (hopefully - untested) Build both gcf and cfclient if possible. Improved Makefile.in - more dependancies and automatic defaults have rules. Support for building both the gcfclient and cfclient with the same common object files. Support for building in other directories. Include aclocal.m4 file in distribution so autoconf can be re-run Improved fire/run handling. Previously, due to the auto repeat of the x-server, numerous fire starts and stops would be continuously sent because the code would see a keypress and keyrelease events. Logic changed to eliminate that constant sending - only send the actual run/fire stop if when all x-events have been processed, the specific key is no longer being pressed. This also seems to improve interact performance when using run to move in the game. This is only fixed in the X11 client - wasn't able to figure out where in the gtk client to call the functions after all events had been processed. Size of command window setable. The command window is the number of commands the client will let go unanswered before it stops sending commands. This is setable with the 'cwindow' command, and will be saved into the defaults file so it stays constant across multiple runs. Fixes to work on black and white systems (cfclient, both pixmap and xpm) Change update_item function to update open/close containers if the flags change. Remove rotateinventory from default keybindings - no reason to keep it around, since it isn't used anymore. Increase buffer size used when reading in key bindings. Fix for x11.c to hopefully prevent FPE's - it seems that at times the players weapon speed could be zero, and dividing by that resulted in the Fpe. If the players weapon speed is zero, then we just display 0 as the speed. Remove instruction from README telling the player to copy the def_keys into their custom key file. Not needed, and clutters up the unbind list quite a bit. Patches from Tero Kivinen: Fix help files so that they do not have embedded new lines (under ansi C, strings can not span multiple lines unless continued with a \ - gcc lets this behaviour go through however). Also, change to configure.in to add -std1 to cc on digital unix. Include aclocal.m4 in distribution so end users can remake configure.in Strip leading spaces when sending complex commands. Parsing of complex commands made a bit cleaner (patch from Maciej Kalisiak) GTK changes by David Sundqvist: Compiles for both gtk+-1.0 and development gtk+-1.1.12 and onwards. Close button for open things in the look window added. Included various patches by Maciej Kalisiak for locking and marking in inventory, as well as coloring damned items too. Some cosmetic code cleanups by Charles Duffy. Tearoff menus for development version of GTK. Some small tooltips. I'd like more, but gtk is picky about what widgets it accepts tooltips for. Some fixup for drop count. Not entirely sure how that should work to be practical. Menu choice to clear info window. Speedup for image creation in non-cached mode. Main loop moved into gx11.c to allow both clients to be built at once. ------------------------------------------------------------------------------ Changes for 0.95.1: Add 'depend' directive to makefile. remove 'includes.h' as a distributed file. -nosplit option added to x11 client. Useful if you don't want split modes but your default file is set for it. resizing of main window in non split mode for x11 client supported. The sub windows will try to be maintained in the same proportions. use autoconf to determine if we have sysconf instead of by system type. Check to see if the item has an environment before setting the inv_updated flag of that environment. This should fix some crashes. Add #ifdef of SOUND_DEBUG so we don't get verbose notifications in the sound code unless we want them. Clear item attributes after the item has been freed. When the items are first created, they are initialized to sane values, and many areas of the code expect that new item will be initialized properly. This change seems to fix the problem with item names being incorrect (ie, "two" and the like). Expanded item_types file to be more complete. GTK changes by David Sundqvist: 981127 Further GUI configuration (keybindings too, needs more work tho) XPM caching now implemented Color text in info window (warning: this may trigger a bug in pre 1.0.5 gtk, but you can turn it off in the GUI config :) ) Menu reorganizations and additions 981114 Split windows mode For those who want new fun layouts. (still has some problems with focus here) Color coded inventory Now you can see cursed and magic items in color coding. Smart dialogs It will actually try to figure out what options you have in dialogs. Fix for inventory count Now pressing 0-9 should update count. Configuration dialog GUI configuration for some options. ------------------------------------------------------------------------------ Changes for 0.94.4: Set receive socket buf to 64K. Added item type detection and sorting (prior, items basically appeared in the inventory in which they were sent.) Ordering can be changed/extended- see item_types file. Incorporate gtk version 0.94.3auto into this release to have one common client source base. Support for complex keybindings (more than one command bound to the same key, seperated by semicolons) added -nocache command line option (default behaviour, but option needed if your defaults file is set to cache). When receiving new xpm image from server, create xpm data from the data provided instead of saving it to a file and creating it from the file. This should be much faster. If we are caching images, we still save the data to a file but use the buffer to create the image (this is the same thing that pixmap display does). This is only true for the x11 client - I am not sure what the gtk client does. Added support in the client to understand the 'goodbye' command from the server. This is to allow the client clean exits. SC protocol updated for 1022 for this. 'goodbye' will be in the 0.95.0 server. ------------------------------------------------------------------------------ Changes for 0.94.3: Only print debugging output on runs if compiled with -DDEBUG option. Most fprintf(stderr,...) changed to use the LOG call instead. Updated protocol version to 1021. This is for the ncom and commc commands (command windowing). Support for the ncom and comc functions above added to client. Client will now stop sending repeat commands at a certain point. README cleaned up - README now contains more of the first level type instructions, where README.old contains some of the older discussion and background notes. README now includes very good notes on extracting keybindings from save files for use with client. ------------------------------------------------------------------------------ Changes for 0.94.2: Change Version command to include 2 versions strings - version of of C->S commands and version of S->C commands. Allows for better handling when versions are mismatched. Current versions for both set to 1020. Also, version command can now take an optional string describing the client and server (ie, X11 C client, or Java client, etc) Client query command now will handle multi line text fields (seperated by newlines) as sent in the query command. Before, it was never explicity set that this should be done, and was never an issue because there never was multiple lines sent. However, to make input handling on some clients easier, text describing what the query is for is not sent via drawinfo, but now sent via the query command. When user enters the help command, send any options along to the server (ie, send 'help asdf' to server. Before, it only sent the help. Added ability to mark items similar to server. 'mark' command added to protocol. Bug fix when using commans bound with 'bind -e'.Prior, when hitting return to finish the command, it would not advance to a new line. It now does. nrof and item name with nrof now properly updated in inventory window when server sends and update command (prior, the client internally know the correct nrof, but the item name in the window was not properly updated) Changed local showicons command to showicon instead. The later is what it should have been in the first place. ------------------------------------------------------------------------------ Changes for 0.94.1: CS_STAT_WEIGHT_LIM added to stats command. Client will store value, and print it at top of inventory window (carried weight/limit) Handling of dmalloc library in makefiles better done. Don't assume gcc on mips machines. Minor updates to protocol file (more accurate, no change in actual commands save for weight limit above) Only send fire start/stop commands if in play state. cleaned up overly verbose messages in sound.c (comment out). Also, soundcard.h assumed to only exist on linux systems. ------------------------------------------------------------------------------ Changes for 0.94.0: Client will handle item1, upditem, face, sound, and anim commands from server (new commands) Client will now animate objects. Fully handles caching of images - should be a big speed improvement over slow links. Client now handles numbering of commands on its own (item1 will send nrof) Handling of locked items now also handled on client. Created misc.c file - handles things like strdup, and creation of directories. Client will now send lookat command to server. sound.c file added - handles playing of sounds. This should work on most systems that have a /dev/audio which can play .au files. On linux (open sound system), more sophisticated handling is added (stereo support and volume control). soundsdef.h file added which contains default sound information. -nosound option added to disable sounds. Added inventory show options (ie, magical, nonmagical, etc) - equivalant of 'x' command on oldserver. Bug fix that would cause grace bar to always be drawn same color as sp bar. Print fire on/run on informatin in the message window. Add KEYF_STANDARD flag to keybindings, so when do an unbind, we can only show custom keybindings. Can now save window positions (in -split mode) accross runs. Saved in ~/.crossfire/winpos Can now save standard defaults (sound, scrollboard, port, tec) in ~/.crossfire/defaults Protocol file updated with new commands. Added some client side 'help command - shows commands the client handles locally. New local commands added: savewinpos, savedefaults, help, show. ------------------------------------------------------------------------------ Changes for 0.93.7: Fixed make proto directive to exclude inline functions in the proto.h file. Added support to using debug malloc library (dmalloc.) Change Extra_Flags, LOCAL_LIBRARIES in the Imakefile to disable this. made update_item a non static function in item.c. Also, no will probably find the player object for weight updates. Removed carrying field in the item structure. Fixed bugs in resizing the info window which would cause program to crash - left over problems from when the scrollbar was added. Can now drop a portion of a group of objects (ie, 50 of 100 arrows) ------------------------------------------------------------------------------ Changes for 0.93.6: Change the select loop to reset the timeout each time - looks like linux select resets this to zero (undocumented feature?) Use correct length in SendAddMe function. Started adding code for local face caching. Protocol file updated to be more accurate/complete. ------------------------------------------------------------------------------ Changes for 0.93.5: Added support for multi line input. ------------------------------------------------------------------------------ Changes of 0.92.2-a: Scrollback buffer for the info window added.