From f4b4234ce1ba55402eedc352f4dad444a02ea4bc Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 6 Feb 2011 22:57:32 +0000 Subject: [PATCH] fix some issues with compilation on mac osx; make B, N, M keys behave the same as KP1, KP2, KP3 when pointing at a polymer light (hack around keyboard strangeness) git-svn-id: https://svn.eduke32.com/eduke32@1789 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/nedmalloc.c | 4 ++++ polymer/eduke32/build/src/polymer.c | 3 +++ polymer/eduke32/samples/a.m32 | 4 ++++ polymer/eduke32/source/jaudiolib/Makefile | 10 +++++++++- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/nedmalloc.c b/polymer/eduke32/build/src/nedmalloc.c index 7931867ae..68ab11a85 100644 --- a/polymer/eduke32/build/src/nedmalloc.c +++ b/polymer/eduke32/build/src/nedmalloc.c @@ -57,6 +57,10 @@ DEALINGS IN THE SOFTWARE. /* Sadly we can't include as it causes a redefinition error */ extern size_t malloc_usable_size(void *); #endif +#if defined(__APPLE__) +/* PK: for malloc_size(): */ +#include +#endif #if USE_ALLOCATOR==1 #define MSPACES 1 #define ONLY_MSPACES 1 diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index e7fb12498..dde51028a 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -33,6 +33,9 @@ float pr_specularfactor = 1.0f; int32_t pr_highpalookups = 1; int32_t pr_ati_fboworkaround = 0; int32_t pr_ati_nodepthoffset = 0; +#ifdef __APPLE__ +int32_t pr_ati_textureformat_one = 0; +#endif int32_t r_pr_maxlightpasses = 5; // value of the cvar (not live value), used to detect changes diff --git a/polymer/eduke32/samples/a.m32 b/polymer/eduke32/samples/a.m32 index e69690a58..64aeffe60 100644 --- a/polymer/eduke32/samples/a.m32 +++ b/polymer/eduke32/samples/a.m32 @@ -372,6 +372,10 @@ defstate fiddlewithlights ifeithershift inv j set k 0 + ifhitkey KEY_B { add .xvel j, set k 1 } + ifhitkey KEY_N { add .yvel j, set k 1 } + ifhitkey KEY_M { add .zvel j, set k 1 } + ifhitkey KEY_KP1 { add .xvel j, set k 1 } ifhitkey KEY_KP2 { add .yvel j, set k 1 } ifhitkey KEY_KP3 { add .zvel j, set k 1 } diff --git a/polymer/eduke32/source/jaudiolib/Makefile b/polymer/eduke32/source/jaudiolib/Makefile index 3b5b44737..8023dec13 100644 --- a/polymer/eduke32/source/jaudiolib/Makefile +++ b/polymer/eduke32/source/jaudiolib/Makefile @@ -18,6 +18,14 @@ CFLAGS=$(BASECFLAGS) $(F_NO_STACK_PROTECTOR) OURCFLAGS=$(CFLAGS) CPPFLAGS=-I$(INC) -I$(SRC) -DHAVE_VORBIS +ifeq ($(PLATFORM),DARWIN) + ifeq (1,$(SDL_FRAMEWORK)) + APPLE_INCLUDE_DIR:=../../Apple/include + OURCFLAGS += -DSDL_FRAMEWORK -I$(APPLE_INCLUDE_DIR) -I/Library/Frameworks/SDL.framework/Headers \ + -I/Library/Frameworks/SDL_mixer.framework/Headers + endif +endif + OBJECTS=$(OBJ)/drivers.o \ $(OBJ)/fx_man.o \ @@ -48,7 +56,7 @@ $(OBJNAME): $(OBJECTS) $(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c -mkdir -p $(OBJ) $(COMPILE_STATUS) - if $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi + if $(CC) $(CPPFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi ifeq ($(PRETTY_OUTPUT),1) .SILENT: