From 833cc59e0cc1802432f21ddbaa763c99e541fafe Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 13 Nov 1998 18:23:46 +0100 Subject: [PATCH] rnd-19981113-2 --- src/Makefile | 21 ++++++++++----------- src/cartoons.c | 4 ++-- src/image.c | 4 ++-- src/netserv.c | 7 +++++-- src/sound.c | 2 ++ 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/Makefile b/src/Makefile index 6dc3a1a2..a6ab6996 100644 --- a/src/Makefile +++ b/src/Makefile @@ -11,10 +11,11 @@ CC = gcc # on Solaris and similar systems, you'll need to uncomment this -# EXTRA_LIBS = -lnsl -lsocket +EXTRA_LIBS = -lnsl -lsocket -# specify X11 library path on your system -XLIB_PATH = /usr/X11/lib +# specify path to X11 on your system +# X11_PATH = /usr/X11 +X11_PATH = /local/X11 # change this to the directory where you want to install game data like levels GAME_DIR = . @@ -72,7 +73,12 @@ DEBUG = -DDEBUG -g -Wall # LIBS = -L/usr/X11R6/lib -lX11 -lm # LIBS = -L/usr/X11R6/lib $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS) -LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS) + +XINC_PATH = $(X11_PATH)/include +XLIB_PATH = $(X11_PATH)/lib + +INCL = -I$(XINC_PATH) +LIBS = -L$(XLIB_PATH) $(EXTRA_X11_LIBS) -lX11 -lm $(EXTRA_LIBS) -R$(XLIB_PATH) # CFLAGS = -O2 $(CONFIG) $(SYSTEM) CFLAGS = $(DEBUG) $(CONFIG) $(SYSTEM) $(INCL) @@ -130,10 +136,3 @@ clean: backup: ./make_backup.sh - -depend: - for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend - -ifeq (.depend,$(wildcard .depend)) -include .depend -endif diff --git a/src/cartoons.c b/src/cartoons.c index 44242e87..96ad9793 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -191,8 +191,8 @@ void HandleAnimation(int mode) boolean AnimateToon(int toon_nr, boolean restart) { - static pos_x = 0, pos_y = 0; - static delta_x = 0, delta_y = 0; + static int pos_x = 0, pos_y = 0; + static int delta_x = 0, delta_y = 0; static int frame = 0, frame_step = 1; static boolean horiz_move, vert_move; static long anim_delay = 0; diff --git a/src/image.c b/src/image.c index 5f7c4ffb..b0a8a1d5 100644 --- a/src/image.c +++ b/src/image.c @@ -145,7 +145,7 @@ XImageInfo *Image_to_XImage(Display *display, int screen, Visual *visual, static Colormap global_cmap = 0; static Pixel *global_cmap_index; static int num_cmap_entries, free_cmap_entries; - static private_cmap = FALSE; + static boolean private_cmap = FALSE; Pixel *redvalue, *greenvalue, *bluevalue; unsigned int a, c=0, x, y, linelen, dpixlen, dbits; XColor xcolor; @@ -515,7 +515,7 @@ XImageInfo *Image_to_XImage(Display *display, int screen, Visual *visual, XCreateImage(display, visual, 1, XYBitmap, 0, (char *)data_mask, image->width, image->height, 8, linelen); -#if 0 +#if 1 if (visual->class == DirectColor || visual->class == TrueColor) { Pixel pixval; diff --git a/src/netserv.c b/src/netserv.c index 5b32ba04..6ff6e52e 100644 --- a/src/netserv.c +++ b/src/netserv.c @@ -617,10 +617,13 @@ void NetworkServer(int port, int serveronly) tv.tv_sec = 0; tv.tv_usec = 500000; if ((sl = select(mfd + 1, &fds, NULL, NULL, &tv)) < 0) + { if (errno != EINTR) syserr("select"); - else continue; - + else + continue; + } + if (sl < 0) continue; diff --git a/src/sound.c b/src/sound.c index 97484309..2bf6c1a0 100644 --- a/src/sound.c +++ b/src/sound.c @@ -28,9 +28,11 @@ static struct SoundControl emptySoundControl = }; static int stereo_volume[PSND_MAX_LEFT2RIGHT+1]; static char premix_first_buffer[SND_BLOCKSIZE]; +#ifdef VOXWARE static char premix_left_buffer[SND_BLOCKSIZE]; static char premix_right_buffer[SND_BLOCKSIZE]; static int premix_last_buffer[SND_BLOCKSIZE]; +#endif static unsigned char playing_buffer[SND_BLOCKSIZE]; static int playing_sounds = 0; #else -- 2.34.1