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
This commit is contained in:
helixhorned 2011-02-06 22:57:32 +00:00
parent 17a0887086
commit f4b4234ce1
4 changed files with 20 additions and 1 deletions

View file

@ -57,6 +57,10 @@ DEALINGS IN THE SOFTWARE.
/* Sadly we can't include <malloc.h> as it causes a redefinition error */
extern size_t malloc_usable_size(void *);
#endif
#if defined(__APPLE__)
/* PK: for malloc_size(): */
#include <malloc/malloc.h>
#endif
#if USE_ALLOCATOR==1
#define MSPACES 1
#define ONLY_MSPACES 1

View file

@ -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

View file

@ -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 }

View file

@ -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: