Fixed compilation with GCC 3.0.
Fixed invalid cast (ushort * -> uint *) in openal.c.
This commit is contained in:
parent
d6cb06cd9e
commit
e49862a2d2
3 changed files with 9 additions and 17 deletions
7
Makefile
7
Makefile
|
@ -1,12 +1,17 @@
|
|||
CC = gcc
|
||||
CXX = gcc
|
||||
#CC = gcc-3.0
|
||||
#CXX = gcc-3.0
|
||||
NASM = nasm
|
||||
|
||||
CFLAGS = -g -Wall -pipe -O2 -Dengine=1 -I. -Iinclude -Iwin95 -Iavp -Iavp/win95 -Iavp/support -Iavp/win95/frontend -Iavp/win95/gadgets
|
||||
#CFLAGS = -Wall -pipe -O6 -ffast-math -fomit-frame-pointer -march=pentiumpro -mcpu=pentiumpro -Dengine=1 -I. -Iinclude -Iwin95 -Iavp -Iavp/win95 -Iavp/support -Iavp/win95/frontend -Iavp/win95/gadgets
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
LDLIBS = -lm
|
||||
|
||||
CFLAGS += `sdl-config --cflags`
|
||||
LDLIBS += -L/usr/X11R6/lib -lX11 -lXext -lGL `sdl-config --libs` -lopenal -lm
|
||||
#LDLIBS += -lstdc++
|
||||
|
||||
AFLAGS = -g -Iinclude/ -w+macro-params -w+orphan-labels -w+number-overflow
|
||||
|
||||
|
@ -50,7 +55,7 @@ OBJ = $(ROOTOBJ) $(AVPOBJ) $(SHAPESOBJ) $(SUPPORTOBJ) $(AVPWIN95OBJ) $(FRONTENDO
|
|||
all: AvP
|
||||
|
||||
AvP: depend $(OBJ)
|
||||
gcc -o AvP $(OBJ) $(LDLIBS)
|
||||
$(CC) -o AvP $(OBJ) $(LDLIBS)
|
||||
|
||||
compile: $(OBJ)
|
||||
|
||||
|
|
|
@ -498,7 +498,8 @@ unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr)
|
|||
ALint len, seclen = 0;
|
||||
unsigned char *nb;
|
||||
void *udata;
|
||||
ALushort rfmt, rchan, rfreq, rsize;
|
||||
ALushort rfmt, rchan, rfreq;
|
||||
ALuint rsize;
|
||||
|
||||
fprintf(stderr, "ExtractWavFile(%d, %p)\n", soundIndex, bufferPtr);
|
||||
|
||||
|
@ -510,7 +511,7 @@ unsigned char *ExtractWavFile(int soundIndex, unsigned char *bufferPtr)
|
|||
fprintf (stderr, "Loaded %s\n", GameSounds[soundIndex].wavName);
|
||||
}
|
||||
|
||||
if (acLoadWAV (bufferPtr, (ALuint *) &rsize, &udata, &rfmt,
|
||||
if (acLoadWAV (bufferPtr, &rsize, &udata, &rfmt,
|
||||
&rchan, &rfreq) == NULL) {
|
||||
fprintf (stderr, "Unable to convert data\n");
|
||||
return (unsigned char *)0;
|
||||
|
|
|
@ -21,22 +21,8 @@ extern "C" {
|
|||
#define VARARG_DECL
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#if __GNUC__ >= 2 && __GNUC_MINOR__ >= 5
|
||||
extern void
|
||||
VARARG_DECL fail (const char * __format, ...)
|
||||
__attribute__ ((noreturn, format (printf, 1, 2)));
|
||||
#else
|
||||
extern __volatile__ void VARARG_DECL fail (const char * __format, ...);
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
extern void VARARG_DECL fail (const char * __format, ...);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue