"$Id: CHANGES,v 1.25 2000/11/08 07:22:32 cvs Exp $"
Top of CVS tree:

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.
