March 2003 Commit Log

Number of Commits:
35
Number of Active Developers:
4
temitchell 2003-03-30 23:16 Rev.: 2082

-simple animation for warrior classes

51 lines of code changed in 31 files:

temitchell 2003-03-30 17:43 Rev.: 2081

-missed setting the face - hmm, they all look to the right anyway..
what's up with that?

8 lines of code changed in 8 files:

temitchell 2003-03-30 16:55 Rev.: 2080

Checking in a bunch of player animations - starting with some race
images.

63 lines of code changed in 52 files:

temitchell 2003-03-30 10:40 Rev.: 2079

added one more groundtype to the weather code:

6 lines of code changed in 1 file:

mwedel 2003-03-30 00:02 Rev.: 2078

Add new images by Oliver (oberdorf@earthlink.net) - made up new archetypes
for these tiled images.

MSW 2003-03-30

30 lines of code changed in 7 files:

mwedel 2003-03-29 23:46 Rev.: 2077

Fix transperancies of firebolts as per Bernd Edlers comments. This doesn't
effect display on new clients, but may make things work better for
systems with old png libraries.

Update the old player archetypes to contain proper animation
information.

Update the elf arch to demonstrate a 4 direction animated elf
player - only one of the directions is actually animated.

MSW 2003-03-30

44 lines of code changed in 25 files:

jbontje 2003-03-24 13:11 Rev.: 2076

fixed download url
mids 2003-03-24

2 lines of code changed in 1 file:

mwedel 2003-03-24 02:03 Rev.: 2075

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

25 lines of code changed in 2 files:

mwedel 2003-03-24 00:58 Rev.: 2074

common/glue.c, include/funcpoint.h: remove draw_func() pointer - no longer
needed, so code that sets up pointer removed.
lib/*: rebuilt - facings added to old player animation information.
ruined_temple archetype added.
server/init.c: remove set_draw() function
server/player.c: remove call to draw() - socket code takes care of this.
socket/info.c: remove draw() - instead, draw_client_map() can be used,
as that is most the only thing draw() did anyways.
socket/loop.c: Update draw() calls to draw_client_map()
socket/request.c: Remove special handling for darkness==4 cases (first
space that is in full darkness) - this is extra complications and causes
display problems. Update draw_client_map() to include the little bit
of logic that draw() had that this function did not have.
MSW 2003-03-24

15 lines of code changed in 4 files:

mwedel 2003-03-24 00:01 Rev.: 2073

276 draw_info(" savewinpos - save window positions - ", NDI_BLACK);
277 draw_info(" split windows mode only", NDI_BLACK);
278 draw_info(" savedefaults save various defaults into", NDI_BLACK);
279 draw_info(" ~/.crossfire/defaults", NDI_BLACK);
280 draw_info(" show - determine what type of items", NDI_BLACK);
281 draw_info(" to show in inventory", NDI_BLACK);
317 void command_take (const char *command, char *cpnext)
318 {
319 /* If the player has specified optional data, or the player
320 * does not have a container open, just issue the command
321 * as normal
322 */
323 if (cpnext || cpl.container == NULL)
324 send_command(command, cpl.count, 0);
325 else {
326 if (cpl.container->inv == NULL)
327 draw_info("There is nothing in the container to move", NDI_BLACK);
328 else
329 cs_print_string(csocket.fd,"move %d %d %d", cpl.ob->tag,
330 cpl.container->inv->tag, cpl.count);
331 }
332 }
333
334
335 /* This is an extended command (ie, 'who, 'whatever, etc). In general,
336 * we just send the command to the server, but there are a few that
337 * we care about (bind, unbind)
338 *
339 * The command past to us can not be modified - if it is a keybinding,
340 * we get passed the string that is that binding - modifying it effectively
341 * changes the binding.
342 */
343
344 void extended_command(const char *ocommand) {
345 const char *cp = ocommand;
346 char *cpnext, command[MAX_BUF];
347
348 if ((cpnext = strchr(cp, ' '))!=NULL) {
349 int len = cpnext - ocommand;
350 if (len > (MAX_BUF -1 )) len = MAX_BUF-1;
351
352 strncpy(command, ocommand, len);
353 command[len] = '\0';
354 cp = command;
355 while (*cpnext == ' ')
356 cpnext++;
357 if (*cpnext == 0)
358 cpnext = NULL;
359 }
360
361 /* cp now contains the command (everything before first space),
362 * and cpnext contains everything after that first space. cpnext
363 * could be NULL.
364 */
365
366 /* I alphabetized the list of commands below to make it easier to
367 * find/see what the extended commands are and what they do.
368 */
369 if (!strcmp(cp,"autorepeat")) set_autorepeat(cpnext);
370 else if (!strcmp(cp, "bind")) bind_key(cpnext);
336 * we just send the command to the server, but there are a few that
337 * we care about (bind, unbind)
338 *
339 * The command past to us can not be modified - if it is a keybinding,
340 * we get passed the string that is that binding - modifying it effectively
341 * changes the binding.
342 */
343
344 void extended_command(const char *ocommand) {
345 const char *cp = ocommand;
346 char *cpnext, command[MAX_BUF];
347
348 if ((cpnext = strchr(cp, ' '))!=NULL) {
349 int len = cpnext - ocommand;
350 if (len > (MAX_BUF -1 )) len = MAX_BUF-1;
351
352 strncpy(command, ocommand, len);
353 command[len] = '\0';
354 cp = command;
355 while (*cpnext == ' ')
356 cpnext++;
357 if (*cpnext == 0)
358 cpnext = NULL;
359 }
360
361 /* cp now contains the command (everything before first space),
362 * and cpnext contains everything after that first space. cpnext
363 * could be NULL.
364 */
365
366 /* I alphabetized the list of commands below to make it easier to
367 * find/see what the extended commands are and what they do.
368 */
369 if (!strcmp(cp,"autorepeat")) set_autorepeat(cpnext);
370 else if (!strcmp(cp, "bind")) bind_key(cpnext);
371 else if (!strcmp(cp,"cwindow")) set_command_window(cpnext);
Jove (C) [image.c:3] "common/player.c" - /export/home/crossfire/client-CVS (23:25)
[hugin:/export/home/crossfire/client-CVS] (137) % l
CHANGES Makefile.in aclocal.m4 config.status* gmon.out macros/ x11/
COPYING NOTES autom4te-2.53.cache/ configure* gnome/ pixmaps/
CVS/ README autom4te.cache/ configure.in gtk/ sdl/
License README.rpm common/ crossfire-client.spec help/ sound-src/
Makefile TODO config.log cscope.out logfile utils/
[hugin:/export/home/crossfire/client-CVS] (138) % more README
Install Steps:

0) Prerequisites:
You will need the XPM library to compile the client.
If you want to run the gtk client, you will need to install the gtk
libraries.
If you want png support, you will need to install the png
library.
If you want sdl support ( recommended) you will need both gtk and png
as well as the main SDL library and the SDL_image library, both of
which can be found at http://www.libsdl.org if not already installed
on your system.

1) type './configure' to configure for your OS/system. Most options
normally understood by configure should be available.
The configure script will try to make all the right decisions. It will
search for the needed libraries and headers. You may need to give
hints on the locations of some files (png library, gtk library).

If configure finds gtk libraries, it will build the gcfclient in addition
to the cfclient. If you don't want this (only cfclient), use the
--disable-gtk (there is no way to disable the cfclient at this time -
if you are able to compile the gtk client, you also have all the tools for
for the cfclient).

If SDL libraries are found on your system, SDL support is automatically
compiled it (Note: only the gcfclient supports sdl). Use --disable-sdl
if you don't want this.

The system will use the new sound system if available (this is a seperate
sound daemon). If you want to use the builtin sound system, use
the --enable-old-sound. See sound notes further down.

To specify additional places to find header files, use the
--with-includes=value - this includes any -I or other options to provide
the compiler. Example:
./configure --with-includes="-I/usr/local/include -I/opt/xpm/include"

Similarly, there is a --with-ldflags option. Example:
./configure --with-ldflags="-L/usr/local/lib -R/usr/local/lib"
-R is used on many systems to specify run location for libraries so
you don't need to set LD_LIBRARY_PATH.

Generally, if you are setting --with-includes, your probably need to
set --with-ldflags, as if one is not in a standard place, the other
probably is not either.

The client works with the 0.5 version of the ALSA sound system.
If you are using a newer version and are having troubles compiling,
try running configure with the '--disable-alsa' option.

2) Type 'make depend; make' to compile the client. If you get link errors,
it may be because you have an older version of the gtk libraries. If
you get errors like 'can't find target client.c', your make program
isn't very good and use should get/use gnu make instead.

3) Type 'make install' to install the binaries.

4) The client can be run by typing 'cfclient' for the X11 version, gcfclient
for the gtk client, gcfclient -sdl for the SDL version.

------------------------------------------------------------------------------
Converting keybindings from old save files for use with the client:

1) You will need to get a copy of your character file.

2) Type "mkdir ~/.crossfire". This will automatically be done the first
time you run the client.

3) Type awk 'BEGIN {ORS=" "} /^key /
{for (i=2; i<=NF; i++) print $i;printf "\n"}'
infile > ~/.crossfire/keys
(Note that this should all be entered on one line, but is broken up
here to be more readable.)
'infile' is the name of the character file.

Note that the client use global keybindings, and not per character. This
means that the same keybindings will be for all characters you play with the
client.

The gtk client and x11 client both use the same keybindings file.

------------------------------------------------------------------------------
Sound support:

If you wnat sound support (only useful if you have a system that has good
sound hardware), you will also need to get some sounds for the program.
You will need the raw sound files - the .au files no longer work with the
client.

The sounds file determines what file is played for what sound. The default
location for the sound files is <prefix>/share/cfclient/sounds. <prefix>
is the -prefix= option given when running configure, default of /usr/local.

You can set this to another directory at the configure stage by using
--with-sound-dir=/some/directory. This file is only used for compiled in
defaults. If you have a ~/.crossfire/sounds file (some format), that file
will be used instead of the built in defaults.

Sound are now played by separate process invoked from crossfire client.
The process - called sound server - adjusts sounds' volume according to
relative position of player and sound source on map and mixes the sounds
together, so many sounds can be played simultaneously.

CONFIG FILE

The config file ~/.crossfire/sndconfig contains some configurable settings. If
there is no such file, one with default settings will be created.

The file contains following fields:

stereo: 1 means stereo sound, 0 - mono

bits: bitrate of generated sound - 8 or 16
16 means better quality, especially when more sounds
are to be played simultaneously, but takes more memory

signed: if we should sent signed data to the soundcard. 1 means yes.

frequency: speed of playing data. This should be 11025, or sound pitch
will change

buffers: how many buffers to allocate
buflen: how big the buffers should be. buffers*buflen shouldn't be
smaller than the longest sound to be played.

simultaneously: home many sound can be played at the same time. When this
setting is bigger, each sound volume will decrease.

HOW DOES IT WORK?

The sound server gets information about sounds to be played on standard input.
The information is a line:
<sound number> <sound type> <relative x> <relative y>
All those numbers are hex.
The file ~/.crossfire/sounds contains description of sound numbers and types.
For example:
3 0 5 0
Means that normal sound SOUND_FUMBLE spell should be played as it's source was
5 units to the right of player.

Sounds are mixed in special buffers, which are in fact one buffer, which should
be big enough for the biggest sound to be played.

The buffers, if contain anything, are sent one by one to the sound device.
Each buffer is cleaned after playing.

Sounds data is multiplied by some ratio (<1) evaluated from it's position and
volume and added to the buffers, starting from the next after the one being
played.

So bigger buffer means bigger delay, before th sound is actually played, but
the smaller buffer is, the bigger is possibility, we won't succeed filling the
next buffer, before last is played.

------------------------------------------------------------------------------
IMAGES

The client will get any images that it is missing from the server. This
can include the entire image set.

To decrease bandwidth used when actually playing the sounds, it is suggested
you download the image archive and install it. The default location
for the archive is <prefix>/share/cfclient/, where <prefix> is deteremined
by the -prefix= option given when running configure.

The mechanism the client uses to find a matching image file when the
server tells it an image name is thus:

1) Look in ~/.crossfire/gfx. If an image is found here, irrespective of the
set and checksum of the image on the server, it will be used. The only
way images are placed into the gfx directory is by the user actually
copying them to that directory. The gfx directory allows a user to override
images with versions he prefers.

2) Look in ~/.crossfire/crossfire-images then <prefix>/share/cfclient/crossfire-images.
If the checksum matches the image from the
respective directory is used. Note that if the checksums match, it really doesn't
matter what image location we use, as it is the same image.

4) Get the image from the server. If -cache is set, a copy of it is put into
~/.crossfire/crossfire-images.

------------------------------------------------------------------------------
Authors of the client:

Mark Wedel (mwedel@sonic.net) - general client source and Xlib client
David Sundqvist (azzie@netpolicy.com) - GTK+ port
Raphael Quinet (Raphael.Quinet@eed.ericsson.se) - Configure scripts and
graphics
Jacek Konieczny <jajcus@zeus.polsl.gliwice.pl> - New Sound System support.
Eric Anderson did a lot of initial work on the client.
Scott MacFiggen (smurf@CSUA.Berkeley.EDU) - SDL support
[hugin:/export/home/crossfire/client-CVS] (139) %
[hugin:/export/home/crossfire/client-CVS] (139) % ls
CHANGES Makefile.in aclocal.m4 config.status gmon.out macros x11
COPYING NOTES autom4te-2.53.cache configure gnome pixmaps
CVS README autom4te.cache configure.in gtk sdl
License README.rpm common crossfire-client.spec help sound-src
Makefile TODO config.log cscope.out logfile utils
[hugin:/export/home/crossfire/client-CVS] (140) % cvs update -dP
Warning: Remote host denied X11 forwarding.
? autom4te-2.53.cache
? autom4te.cache
? cscope.out
? gmon.out
? logfile
*/
dark0 = the_map.cells[mx][my].darkness;

if (y-1 < 0 || !the_map.cells[mx][my-1].have_darkness) dark1 = dark0;
else dark1 = the_map.cells[mx][my-1].darkness;

if (x+1 >= use_config[CONFIG_MAPWIDTH] || !the_map.cells[mx+1][my].have_darkness) dark2 =!
else dark2 = the_map.cells[mx+1][my].darkness;

if (y+1 >= use_config[CONFIG_MAPHEIGHT] || !the_map.cells[mx][my+1].have_darkness) dark3 !
else dark3 = the_map.cells[mx][my+1].darkness;

if (x-1 < 0 || !the_map.cells[mx-1][my].have_darkness) dark4 = dark0;
else dark4 = the_map.cells[mx-1][my].darkness;

/* If they are all the same, processing is easy */
if (dark0 == dark1 && dark0 == dark2 && dark0 == dark3 && dark0 == dark4) {
dst.x = x * map_image_size;
dst.y = y * map_image_size;
dst.w = map_image_size;
dst.h = map_image_size;

if (dark0 == 255) {
SDL_FillRect(mapsurface,&dst, SDL_MapRGB(mapsurface->format, 0, 0, 0));
} else if (the_map.cells[mx][my].darkness != 0) {
SDL_FillRect(lightmap,NULL, SDL_MapRGBA(lightmap->format, 0, 0, 0, the_map.cells[!
SDL_BlitSurface(lightmap, NULL, mapsurface, &dst);
}
return;
}


if (use_config[CONFIG_LIGHTING] == CFG_LT_PIXEL ) {
/* This almost works as well as the per pixel code below, but does have some various
* artifacts in the drawing. It uses the same logic as the per pixel code below,
* bit since SDL does the blit, the alpha handling ends up being different
Jove (C) [sdl.c:3] "sdl.c" - /export/home/crossfire/client-CVS/gtk (23:34)
[hugin:/export/home/crossfire/client-CVS/gtk] (145) %
[hugin:/export/home/crossfire/client-CVS/gtk] (145) % l
CVS/ config.o gcfclient.man gx11.h keys.c png.c sound.c
Makefile crossfire-client.desktop gtkproto.h gx11.o keys.o png.o sound.o
Makefile.in cscope.out gx11.c image.c map.c sdl.c
config.c gcfclient* gx11.c~ image.o map.o sdl.o
[hugin:/export/home/crossfire/client-CVS/gtk] (146) % l *.h
gtkproto.h gx11.h
[hugin:/export/home/crossfire/client-CVS/gtk] (147) % more gx11.h
/*
* static char *rcsid_gx11_h =
* "$Id: gx11.h,v 1.6 2002/05/22 04:58:26 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.

Copyright (C) 2001 Mark Wedel & Crossfire Development Team

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

The author can be reached via e-mail to crossfire-devel@real-time.com
*/

#ifndef GX11_H
#define GX11_H

#include "client-types.h"
#include "item.h"

extern int map_size, image_size, map_image_size, map_image_half_size;
extern uint8 map_did_scroll;
extern uint8 updatekeycodes, time_map_redraw,redraw_needed;
extern int updatelock;

/* Pixmap data. This is abstracted in the sense that the
/* Pixmap data. This is abstracted in the sense that the
* code here does not care what the data points to (hence the
* void). The module using this data should know whether it
* is these point to png data or image data of whatever form.
* The module is not required to use all these fileds -
* as png data includes transperancy, it will generally not
* use the mask fields and instead just put its data into the
* appropiate image fields.
*
* As images can now be of variable size (and potentially re-sized),
* the size information is stored here.
*/
#define DEFAULT_IMAGE_SIZE 32
#define MAXPIXMAPNUM 10000
typedef struct {
void *icon_mask, *icon_image;
uint16 icon_width, icon_height;
void *map_mask, *map_image;
uint16 map_width, map_height;
void *fog_mask, *fog_image;
} PixmapInfo;

extern PixmapInfo *pixmaps[MAXPIXMAPNUM];

/* Some global widgetws */
extern GtkWidget *gtkwin_root,*drawingarea,*run_label,*fire_label;
extern GtkWidget *gtkwin_info, *gtkwin_stats, *gtkwin_message;
extern GtkWidget *gtkwin_look, *gtkwin_inv, *gtkwin_config;
extern GtkWidget *entrytext, *counttext;
extern GdkPixmap *mapwindow,*dark;
extern GdkBitmap *dark1, *dark2, *dark3;
extern GdkGC *mapgc;
extern GtkWidget *ckentrytext, *ckeyentrytext, *cmodentrytext,*cnumentrytext, *cclist;
extern GtkTooltips *tooltips;

#define TYPE_LISTS 9
Jove (C) [gx11.h:3] "gx11.h" - /export/home/crossfire/client-CVS/gtk (23:39)
...skipping...
/* Pixmap data. This is abstracted in the sense that the
* code here does not care what the data points to (hence the
* void). The module using this data should know whether it
* is these point to png data or image data of whatever form.
* The module is not required to use all these fileds -
* as png data includes transperancy, it will generally not
* use the mask fields and instead just put its data into the
* appropiate image fields.
*
* As images can now be of variable size (and potentially re-sized),
* the size information is stored here.
*/
#define DEFAULT_IMAGE_SIZE 32
#define MAXPIXMAPNUM 10000
typedef struct {
void *icon_mask, *icon_image;
uint16 icon_width, icon_height;
void *map_mask, *map_image;
uint16 map_width, map_height;
void *fog_mask, *fog_image;
} PixmapInfo;

extern PixmapInfo *pixmaps[MAXPIXMAPNUM];

/* Some global widgetws */
extern GtkWidget *gtkwin_root,*drawingarea,*run_label,*fire_label;
extern GtkWidget *gtkwin_info, *gtkwin_stats, *gtkwin_message;
extern GtkWidget *gtkwin_look, *gtkwin_inv, *gtkwin_config;
extern GtkWidget *entrytext, *counttext;
extern GdkPixmap *mapwindow,*dark;
extern GdkBitmap *dark1, *dark2, *dark3;
extern GdkGC *mapgc;
extern GtkWidget *ckentrytext, *ckeyentrytext, *cmodentrytext,*cnumentrytext, *cclist;
extern GtkTooltips *tooltips;

#define TYPE_LISTS 9
/*
[hugin:/export/home/crossfire/client-CVS/gtk] (148) % man printf
<standard input>:45: a newline character is not allowed in an escape name
<standard input>:48: a newline character is not allowed in an escape name
<standard input>:57: cannot use newline as a starting delimiter
<standard input>:60: warning: numeric expression expected (got `N')
PRINTF(1) FSF PRINTF(1)

NAME
printf - format and print data

SYNOPSIS
printf FORMAT [ARGUMENT]...
printf OPTION

DESCRIPTION
Print ARGUMENT(s) according to FORMAT.

--help display this help and exit

--version
output version information and exit

FORMAT controls the output as in C printf. Interpreted sequences are:

double quote

NNN character with octal value NNN (0 to 3 digits)

b backslash
a
c.... alert (BEL)
k
s.TP produce no further output
p
a
form feed
e

new line
carriage return

horizontal tab

vertical tab

N character with hexadecimal value NNN (1 to 3 digits)

%% a single %

%b ARGUMENT as a string with `<B4> escapes interpreted

and all C format specifications ending with one of diouxXfeEgGcs, with ARGU<AD>
MENTs converted to proper type first. Variable widths are handled.

REPORTING BUGS
Report bugs to <bug-sh-utils@gnu.org>.

SEE ALSO
The full documentation for printf is maintained as a Texinfo manual. If the
info and printf programs are properly installed at your site, the command

info printf

should give you access to the complete manual.

COPYRIGHT
Copyright <A9> 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GNU sh-utils 2.0 July 2000 PRINTF(1)
PRINTF(3) Linux Programmer's Manual PRINTF(3)

NAME
printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf -
formatted output conversion

SYNOPSIS
#include <stdio.h>

int printf(const char *format, ...);
int fprintf(FILE *stream, const char *format, ...);
int sprintf(char *str, const char *format, ...);
int snprintf(char *str, size_t size, const char *format, ...);

#include <stdarg.h>

int vprintf(const char *format, va_list ap);
int vfprintf(FILE *stream, const char *format, va_list ap);
int vsprintf(char *str, const char *format, va_list ap);
int vsnprintf(char *str, size_t size, const char *format, va_list ap);

DESCRIPTION
The functions in the printf family produce output according to a format as
described below. The functions printf and vprintf write output to stdout, the
standard output stream; fprintf and vfprintf write output to the given output
stream; sprintf, snprintf, vsprintf and vsnprintf write to the character
string str.

The functions vprintf, vfprintf, vsprintf, vsnprintf are equivalent to the
functions printf, fprintf, sprintf, snprintf, respectively, except that they
are called with a va_list instead of a variable number of arguments. These
functions do not call the va_end macro. Consequently, the value of ap is unde<AD>
fined after the call. The application should call va_end(ap) itself after<AD>
wards.

These eight functions write the output under the control of a format string
that specifies how subsequent arguments (or arguments accessed via the vari<AD>
able-length argument facilities of stdarg(3)) are converted for output.

Return value
These functions return the number of characters printed (not including the
trailing '\0' used to end output to strings). The functions snprintf and
vsnprintf do not write more than size bytes (including the trailing '\0'). If
the output was truncated due to this limit then the return value is the number
of characters (not including the trailing '\0') which would have been written
to the final string if enough space had been available. Thus, a return value
of size or more means that the output was truncated. (See also below under
NOTES.)

Format of the format string
The format string is a character string, beginning and ending in its initial
shift state, if any. The format string is composed of zero or more direc<AD>
tives: ordinary characters (not %), which are copied unchanged to the output
stream; and conversion specifications, each of which results in fetching zero
or more subsequent arguments. Each conversion specification is introduced by
the character %, and ends with a conversion specifier. In between there may
be (in this order) zero or more flags, an optional minimum field width, an
optional precision and an optional length modifier.

The arguments must correspond properly (after type promotion) with the conver<AD>
sion specifier. By default, the arguments are used in the order given, where
each `*' and each conversion specifier asks for the next argument (and it is
an error if insufficiently many arguments are given). One can also specify
explicitly which argument is taken, at each place where an argument is
required, by writing `%m$' instead of `%' and `*m$' instead of `*', where the
decimal integer m denotes the position in the argument list of the desired
argument, indexed starting from 1. Thus,
printf("%*d", width, num);
and
printf("%2$*1$d", width, num);
are equivalent. The second style allows repeated references to the same argu<AD>
ment. The C99 standard does not include the style using `$', which comes from
the Single Unix Specification. If the style using `$' is used, it must be
used throughout for all conversions taking an argument and all width and pre<AD>
cision arguments, but it may be mixed with `%%' formats which do not consume
an argument. There may be no gaps in the numbers of arguments specified using
`$'; for example, if arguments 1 and 3 are specified, argument 2 must also be
specified somewhere in the format string.

For some numeric conversions a radix character (`decimal point') or thousands'
grouping character is used. The actual character used depends on the
LC_NUMERIC part of the locale. The POSIX locale uses `.' as radix character,
and does not have a grouping character. Thus,
printf("%'.2f", 1234567.89);
results in `1234567.89' in the POSIX locale, in `1234567,89' in the nl_NL
locale, and in `1.234.567,89' in the da_DK locale.

The flag characters
The character % is followed by zero or more of the following flags:

# The value should be converted to an ``alternate form''. For o conver<AD>
sions, the first character of the output string is made zero (by pre<AD>
fixing a 0 if it was not zero already). For x and X conversions, a
non-zero result has the string `0x' (or `0X' for X conversions)
prepended to it. For a, A, e, E, f, F, g, and G conversions, the
result will always contain a decimal point, even if no digits follow it
(normally, a decimal point appears in the results of those conversions
only if a digit follows). For g and G conversions, trailing zeros are
not removed from the result as they would otherwise be. For other con<AD>
versions, the result is undefined.

0 The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f,
F, g, and G conversions, the converted value is padded on the left with
zeros rather than blanks. If the 0 and - flags both appear, the 0 flag
is ignored. If a precision is given with a numeric conversion (d, i,
o, u, x, and X), the 0 flag is ignored. For other conversions, the
behavior is undefined.

- The converted value is to be left adjusted on the field boundary. (The
default is right justification.) Except for n conversions, the con<AD>
verted value is padded on the right with blanks, rather than on the
left with blanks or zeros. A - overrides a 0 if both are given.

' ' (a space) A blank should be left before a positive number (or empty
string) produced by a signed conversion.

+ A sign (+ or -) always be placed before a number produced by a signed
conversion. By default a sign is used only for negative numbers. A +
overrides a space if both are used.

The five flag characters above are defined in the C standard. The SUSv2 spec<AD>
ifies one further flag character.

' For decimal conversion (i, d, u, f, F, g, G) the output is to be
grouped with thousands' grouping characters if the locale information
indicates any. Note that many versions of gcc cannot parse this option
and will issue a warning. SUSv2 does not include %'F.

glibc 2.2 adds one further flag character.

I For decimal integer conversion (i, d, u) the output uses the locale's
alternative output digits, if any (for example, Arabic digits). How<AD>
ever, it does not include any locale definitions with such outdigits
defined.

The field width
An optional decimal digit string (with nonzero first digit) specifying a mini<AD>
mum field width. If the converted value has fewer characters than the field
width, it will be padded with spaces on the left (or right, if the left-
adjustment flag has been given). Instead of a decimal digit string one may
write `*' or `*m$' (for some decimal integer m) to specify that the field
width is given in the next argument, or in the m-th argument, respectively,
which must be of type int. A negative field width is taken as a `-' flag fol<AD>
lowed by a positive field width. In no case does a non-existent or small
field width cause truncation of a field; if the result of a conversion is
wider than the field width, the field is expanded to contain the conversion
result.

The precision
An optional precision, in the form of a period (`.') followed by an optional
decimal digit string. Instead of a decimal digit string one may write `*' or
`*m$' (for some decimal integer m) to specify that the precision is given in
the next argument, or in the m-th argument, respectively, which must be of
type int. If the precision is given as just `.', or the precision is nega<AD>
tive, the precision is taken to be zero. This gives the minimum number of
digits to appear for d, i, o, u, x, and X conversions, the number of digits to
appear after the radix character for a, A, e, E, f, and F conversions, the
maximum number of significant digits for g and G conversions, or the maximum
number of characters to be printed from a string for s and S conversions.

The length modifier
Here, `integer conversion' stands for d, i, o, u, x, or X conversion.

hh A following integer conversion corresponds to a signed char or unsigned
char argument, or a following n conversion corresponds to a pointer to
a signed char argument.

h A following integer conversion corresponds to a short int or unsigned
short int argument, or a following n conversion corresponds to a
pointer to a short int argument.

l (ell) A following integer conversion corresponds to a long int or
unsigned long int argument, or a following n conversion corresponds to
a pointer to a long int argument, or a following c conversion corre<AD>
sponds to a wint_t argument, or a following s conversion corresponds to
a pointer to wchar_t argument.

ll (ell-ell). A following integer conversion corresponds to a long long
int or unsigned long long int argument, or a following n conversion
corresponds to a pointer to a long long int argument.

L A following a, A, e, E, f, F, g, or G conversion corresponds to a long
double argument. (C99 allows %LF, but SUSv2 does not.)

q (`quad'. BSD 4.4 and Linux libc5 only. Don't use.) This is a synonym
for ll.

"$Id: CHANGES,v 1.97 2003/02/25 07:52:21 mwedel Exp $"
Top of CVS tree:
------------------------------------------------------------------------------

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

276 lines of code changed in 8 files:

mwedel 2003-03-21 02:13 Rev.: 2072



bring forward some typos that were made in the small world maps to the big
world maps (library & beginners).
remove some excess floors from the tinytrade map.
MSW 2003-03-20

5 lines of code changed in 3 files:

mwedel 2003-03-21 02:01 Rev.: 2071

server/spell_effect.c: Some code cleanuip to cast_change_attr - mostly
to combine the processing of the stat improving spells together.
The actual change to playability is that bless and holy possession
don't stack if cast multiple times.
server/spell_util.c: Modify create_aura so that player can't have more than
one aura (of the same type) active at a time.
MSW 2003-03-20

358 lines of code changed in 3 files:

mwedel 2003-03-20 01:57 Rev.: 2070

server/apply.c: Change weapon improving code to only use up the number of
potions that it needs, and not all on the ground. Required adding
another arg to eat_item() which is the number of items to consume.
include/sproto.h: Rebuilt for new eat_item() (actually, a static, so no
longer shows up in this file)
MSW 2003-03-19

31 lines of code changed in 3 files:

mwedel 2003-03-20 01:21 Rev.: 2069

server/attack.c: Change did_make_save to strip out magic attacktype when making
saves for objects - otherwise, things like poison cloud destroy objects.
server/time.c: deal with player animations special in process_object - need to
pass in the facing value, and not direction, since direction gets reset.
MSW 2003-03-19

23 lines of code changed in 3 files:

mwedel 2003-03-19 02:18 Rev.: 2068

increase MAX_OBJECTS to 100,000. This value may still be too low, but
I have observed problems on a very active server (metalforge) where maps
are getting swapped out immediately as a player transfers to a new one -
this causes problems (crashes) in the caller that expects the map the
object just came from to still be in memory.
MSW 2003-03-18

1 lines of code changed in 1 file:

mwedel 2003-03-19 02:09 Rev.: 2067

crossedit/Attr.c, server/main.c, server/time.c: Update calls to animate_object()
MSW 2003-03-18

2 lines of code changed in 2 files:

mwedel 2003-03-19 02:04 Rev.: 2066

common/anim.c: Pass direction to animate_object() - needed for player
animations as player's facing may not match direction.
crossedit/Attr.c, server/main.c, server/time.c: Update calls to animate_object()
include/libproto.h: rebuilt
include/newserver.h, plugin_animator/animator_box.c, socket/init.c,
socket/request.c: Remove newanim field from socket structure - not needed -
how to animate is determined by object, not by socket.
server/move.c: Add check to P_OUT_OF_MAP in teleport function.
server/player.c: change move_player to call animate_object, so it gets full
power of functionality it supports instead of 4 way hardcode animation
information.
server/spell_effect.c: When altars are consecrated, don't look to arch name
for first portion of name - always call them Altar of %s - fixes problem
where altar is special god altar that has god's name in archetype, resulting
in altar of .. of ...
MSW 2003-03-18

41 lines of code changed in 11 files:

mwedel 2003-03-19 01:44 Rev.: 2065

add 'facings' to all the player related arc's. Needed for it to
be compatible with normal object animation.
MSW 2003-03-18

26 lines of code changed in 26 files:

temitchell 2003-03-16 11:31 Rev.: 2064

- dropping off some images for player animations

17 lines of code changed in 12 files:

temitchell 2003-03-16 11:28 Rev.: 2063

orc and ogre cleaning - randomize anims

14 lines of code changed in 22 files:

temitchell 2003-03-09 23:08 Rev.: 2062

- replaced windows CR/LF(^M) with LF

0 lines of code changed in 2 files:

temitchell 2003-03-09 22:12 Rev.: 2061

- couldn't figure out what was wrong with my anim - the arc had it
backwards all along

12 lines of code changed in 13 files:

temitchell 2003-03-09 21:29 Rev.: 2060

Made a 2.5D cyclops, reworked the classic ent, cleaned up some multipart
houses and added a ruined temple

102 lines of code changed in 63 files:

mwedel 2003-03-08 18:52 Rev.: 2059

Forgot to update the type to 64 bit value for resurrection code.
MSW 2003-03-08

2 lines of code changed in 1 file:

mwedel 2003-03-08 18:44 Rev.: 2058

Update a few printf/sprintf to use %lld for 64 bit exp values.
MSW 2003-03-08

3 lines of code changed in 3 files:

mwedel 2003-03-08 18:18 Rev.: 2057

More fixes for random map sizes - move the check for minimum size up
higher in the code (before expand2x and symmetry are checked). At another
check after size adjustments for symmetry and expand2x are done to make
sure size meets minimum values - if not, reset them. Some layouts
don't work right if map size is too small.
MSW 2003-03-08

9 lines of code changed in 1 file:

avogl 2003-03-08 08:58 Rev.: 2056

Checked in the new weak wall (from Kevin R. Bulgrien),
a small correction to another weak wall type,
and the new DreadKnight & DShield for base set.

--AndreasV

4 lines of code changed in 77 files:

mwedel 2003-03-07 23:35 Rev.: 2055

Patch for 64 bit experience total, as well as flexible number of levels.
Basically, max level is now dynamic, set in exp_table file. Experience
is now a 64 bit value, so much higher totals now allowed. To
allow for flexible levels, add new function - did_make_save() which is used
for players/monsters to see if they make their saving throw - this is
necessary because the savethrow[] array may not be as large as max level -
did_make_save takes this into account.
NOTE: If your updating a server, you will need to copy over/set up a
new exp_table file that has max_levels defined and at least one of the
tables uncommented. There are no longer any compiled in defaults
--
configure, configure.ac: Add AC_CHECK_SIZEOF calls for long and long long
so we can know which one to use for 64 bit support (other checks
may need to be added)
common/exp.c: Remove levels table, replace it with a 64 bit pointer.
Change init_experience to allocate appropriately sized table, have it
read max_level value from exp_table file. Replace atoi calls with
atoll to get 64 bit value. Update dump_experience to properly
print 64 bit values.
common/info.c: Update dump routines that dump exp to properly print
64 bit values.
common/init.c: Add initializing for settings.max_level value.
common/item.c: Update sprintf's to handle 64 bit output of exp (speed)
value in objects.
common/living.c: change MAX_EXP define, update MAX_EXP_IN_OBJ define,
add MAX_SAVE_LEVEL which corresponds to how large the savethrow
table is. Change MAXLEVEL to settings.max_level. Change level_exp()
to return 64 bit value, other updates in functions to use 64 bit
values. Add did_make_save() function.
common/loader.l, common/loader.c: Update load/save routins of exp to
deal with 64 bit values.
common/map.c: Update calculate_difficulty to use 64 bit values when
storing exp - unlikely to make a difference, since unlikely any map
will get to a point where it has that much exp on it.
common/porting.c: Remove dead code from save_long(), add save_long_long()
to save 64 bit values.
include/autoconf.h.in: SIZEOF_LONG and SIZEOF_LONG_LONG values added.
include/global.h: Add code to typedef sint64/uint64 types based on what
type gives us those values. Add max_level to settings array.
include/libproto.h: rebuilt.
include/living.h: Replace exp field with 64 bit value.
include/player.h: Update party kill log exp tracking to have 64 bit
values.
lib/exp_table: Udpate comments about max_level, uncomment what
was the default table so new installs have working table.
Add 5 levels to all the tables.
random_maps/monster.c: Update place_monsters to use 64 bit when storing
exp total for map/per square.
server/apply.c: Replace MAXLEVEL with settings.max_level, add
did_make_save calls where appropriate
server/c_misc.c: have statistics command properly print 64 bit
exp value.
server/c_wiz.c: Have stats command properly display 64 bit value.
server/hiscore.c: Replace exp values with 64 bit values, update to
properly load/display them.
server/player.c: replace savethrow[] reference with did_make_save()
server/skill_util.c: Update skills command to properly show 64 bit exp values.
server/spell_effect.c: replace savethrow[] reference with did_make_save(),
allow players to cast directors right beneath themselves, but other
walls must be on empty space.
MSW 2003-03-07

1015 lines of code changed in 26 files:

mwedel 2003-03-07 23:22 Rev.: 2054

Minor changes to clean up some compiler warnings.
MSW 2003-03-07

3 lines of code changed in 1 file:

mwedel 2003-03-07 23:11 Rev.: 2053

commit file that I thought was already updated - fix for missing /
in python search paths.
MSW 2003-03-07

1 lines of code changed in 1 file:

mwedel 2003-03-07 23:06 Rev.: 2052

Add weidhg to archetype so that it actually works by default without
map maker having to set weight value.
MSW 2003-03-07

1 lines of code changed in 1 file:

mwedel 2003-03-07 01:33 Rev.: 2051

Various bug fixes.
crossedit/Attr.c: Minor cleanup to eliminate some compile time warnings.
plugin/plugin_python.c: Remove some unused variables, thus fixing up some
compiler warnings.
random_maps/random_map.c, random_maps/random_map.h, random_maps/special.c:
Add MIN_RANDOM_MAP_SIZE values instead of hardcode constants.
server/monster.c: Fix communicate - odd bug can be map gets swapped out
just after player is transferred to another map, causing crashes as
map that was originally spoken on is no longer in memory.
server/rune.c: add missing free_object call when erasing runes.
server/skills.c: Change write_on_item to determine type of writing based
on content of mesage, or lack thereof, and not the marked object.
Fix problem of buf not being initalized.
MSW 2003-03-06

52 lines of code changed in 9 files:

mwedel 2003-03-03 23:57 Rev.: 2050

Fix bug in rogue layout in that if it is a single room, the exits
aren't placed next to each other - normally not a problem, but if the
map is symmetric, exit may otherwise be placed in another room that
isn't properly connected (that's really a problem in connect_spirals)
MSW 2003-03-04

15 lines of code changed in 1 file:

mwedel 2003-03-03 02:09 Rev.: 2049

Go back to old code that adds 1 to the random seed - this is necessary
because this data is used to make the next level, and if we constantly
use the same seed, the levels look pretty similar.
MSW 2003-03-01

4 lines of code changed in 1 file:

mwedel 2003-03-02 23:13 Rev.: 2048

Various bug fixes.
Makefile.am, Makefile.in: Put crossedit as the last directory, so any build
errors for crossedit doesn't effect anything else.
README: Update ftp site listing.
TODO: More things aded.
aclocal.m4, configure: Add missing / when checking in /usr/local for
python headers.
common/map.c: Add some debugging in free_all_objects that checks to make sure
there are not objects remaining that belong to the map just freed -
only active if MANY_CORES is set.
random_maps/random_map.c: Increase minimum random map size to 10x10 - this
is need for square spirals to work properly I think.
server/spell_effect.c: Have perceive self tell dragon players what they are
currently focused on. Fix town portal to remove force objects from
players if destination is no longer available.
server/swap.c: Reset maps reset_time when loading them in in read_map_log() -
this is only used if recycle temp maps is on. Also, do sanity checking
on reset_time value - bogus values were observed on metalforge.
socket/request.c: Update map timeout in draw_client_map() - in this way,
we don't swap out a map within a players view only to swap it back
in.
MSW 2003-03-01

214 lines of code changed in 12 files:

February 2003 »

Generated by StatSVN 0.7.0