From 9af9ed4320e72c5d03b461b56529fe8672c8d5fd Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 10 Oct 2005 12:50:10 +0000 Subject: [PATCH] OpenAL: Fixed native headers, now that altypes.h and alctypes are gone --- src/native/common/extal.h | 103 +++++++++++++++++++++++++++++++------- src/native/linux/Makefile | 2 +- 2 files changed, 86 insertions(+), 19 deletions(-) diff --git a/src/native/common/extal.h b/src/native/common/extal.h index eacdaafc..88906887 100644 --- a/src/native/common/extal.h +++ b/src/native/common/extal.h @@ -37,28 +37,15 @@ #include #endif -#ifdef _X11 -#include -#include -#endif -#ifdef _WIN32 -#include -#include -#endif -#ifdef _MACOSX -#include -#include -#endif - #include #include "common_tools.h" -void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); - #ifdef __cplusplus extern "C" { #endif +void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); + #if defined(_WIN32) #ifdef _OPENAL32LIB #define ALCAPI __declspec(dllexport) @@ -66,9 +53,6 @@ extern "C" { #define ALCAPI __declspec(dllimport) #endif - typedef struct ALCdevice_struct ALCdevice; - typedef struct ALCcontext_struct ALCcontext; - #define ALCAPIENTRY __cdecl #else #define ALCAPI @@ -93,6 +77,89 @@ extern "C" { #define INITGUID #define OPENAL +// ALC typedefs +typedef struct ALCdevice_struct ALCdevice; +typedef struct ALCcontext_struct ALCcontext; +/** 8-bit boolean */ +typedef char ALCboolean; + +/** character */ +typedef char ALCchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALCbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALCubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALCshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALCushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALCint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALCuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALCsizei; + +/** enumerated 32-bit value */ +typedef int ALCenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALCfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALCdouble; + +/** void type (for opaque pointers only) */ +typedef void ALCvoid; + +// AL typedefs +/** 8-bit boolean */ +typedef char ALboolean; + +/** character */ +typedef char ALchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALsizei; + +/** enumerated 32-bit value */ +typedef int ALenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALdouble; + +/** void type (for opaque pointers only) */ +typedef void ALvoid; + + void InitializeOpenAL(JNIEnv *env, jobjectArray oalPaths); void DeInitializeOpenAL(); diff --git a/src/native/linux/Makefile b/src/native/linux/Makefile index 68bc54e2..ea8d25b9 100644 --- a/src/native/linux/Makefile +++ b/src/native/linux/Makefile @@ -5,7 +5,7 @@ LINKER=gcc STRIP=strip CFLAGS_LINK=-shared -Wall LIBS=-L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXxf86vm,-lXcursor,-lXrender,-lXrandr,-call_shared -CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux +CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(AL_HOME)/include SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../generated/*c) OBJECTS=$(subst .c,.o,$(SRC)) LIBRARY=liblwjgl.so