From fbb3f390d04b12712db257ada65d0b3aafed9814 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 4 Dec 2008 00:31:16 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1176 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile | 2 +- polymer/eduke32/build/Makefile | 2 +- .../eduke32/build/include/tmp/buildsound.h | 15 -- .../build/include/tmp/pragmas-functions.h | 159 ------------------ polymer/eduke32/build/src/mdsprite.c | 4 + polymer/eduke32/source/astub.c | 4 +- polymer/eduke32/source/game.c | 6 +- polymer/eduke32/source/player.c | 4 +- 8 files changed, 14 insertions(+), 182 deletions(-) delete mode 100644 polymer/eduke32/build/include/tmp/buildsound.h delete mode 100644 polymer/eduke32/build/include/tmp/pragmas-functions.h diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index a26e79740..4519d9040 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -164,7 +164,7 @@ EDITOROBJS=$(OBJ)/astub.$o ifeq ($(PLATFORM),LINUX) OURCFLAGS += -fno-pic NASMFLAGS += -f elf - LIBS += -lvorbisfile -lvorbis -logg -lprofiler + LIBS += -lvorbisfile -lvorbis -logg USE_OPENAL = 0 endif diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 9ea8dd8c9..d00e36c22 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -144,7 +144,7 @@ EDITOROBJS=$(OBJ)/build.$o \ ifeq ($(PLATFORM),LINUX) ASFLAGS+= -f elf - LIBS+= -lm -lprofiler + LIBS+= -lm endif ifeq ($(PLATFORM),DARWIN) ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o \ diff --git a/polymer/eduke32/build/include/tmp/buildsound.h b/polymer/eduke32/build/include/tmp/buildsound.h deleted file mode 100644 index bce038ac1..000000000 --- a/polymer/eduke32/build/include/tmp/buildsound.h +++ /dev/null @@ -1,15 +0,0 @@ - -typedef struct { - unsigned int samplerate; // sample rate of the sound - unsigned short channels; // number of channels - unsigned short bitspersample; // bits per sample - unsigned short format; // 0 = pcm - unsigned int soundlength; // bytes required for sound storage -} SoundInfo; - - -int ReadVOCInfo(int fh, SoundInfo *snd); -int ReadVOCData(int fh, char *data, int bufferlen); - -int ReadWAVInfo(int fh, SoundInfo *snd); -int ReadWAVData(int fh, char *data, int bufferlen); diff --git a/polymer/eduke32/build/include/tmp/pragmas-functions.h b/polymer/eduke32/build/include/tmp/pragmas-functions.h deleted file mode 100644 index 29fe8c60f..000000000 --- a/polymer/eduke32/build/include/tmp/pragmas-functions.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifdef USE_C_FUNCTION_PRAGMAS -int sqr(int a); -int scale(int a, int d, int c); -int mulscale(int a, int d, int c); -int mulscale1(int a, int d); -int mulscale2(int a, int d); -int mulscale3(int a, int d); -int mulscale4(int a, int d); -int mulscale5(int a, int d); -int mulscale6(int a, int d); -int mulscale7(int a, int d); -int mulscale8(int a, int d); -int mulscale9(int a, int d); -int mulscale10(int a, int d); -int mulscale11(int a, int d); -int mulscale12(int a, int d); -int mulscale13(int a, int d); -int mulscale14(int a, int d); -int mulscale15(int a, int d); -int mulscale16(int a, int d); -int mulscale17(int a, int d); -int mulscale18(int a, int d); -int mulscale19(int a, int d); -int mulscale20(int a, int d); -int mulscale21(int a, int d); -int mulscale22(int a, int d); -int mulscale23(int a, int d); -int mulscale24(int a, int d); -int mulscale25(int a, int d); -int mulscale26(int a, int d); -int mulscale27(int a, int d); -int mulscale28(int a, int d); -int mulscale29(int a, int d); -int mulscale30(int a, int d); -int mulscale31(int a, int d); -int mulscale32(int a, int d); -int dmulscale(int a, int d, int S, int D, int c); -int dmulscale1(int a, int d, int S, int D); -int dmulscale2(int a, int d, int S, int D); -int dmulscale3(int a, int d, int S, int D); -int dmulscale4(int a, int d, int S, int D); -int dmulscale5(int a, int d, int S, int D); -int dmulscale6(int a, int d, int S, int D); -int dmulscale7(int a, int d, int S, int D); -int dmulscale8(int a, int d, int S, int D); -int dmulscale9(int a, int d, int S, int D); -int dmulscale10(int a, int d, int S, int D); -int dmulscale11(int a, int d, int S, int D); -int dmulscale12(int a, int d, int S, int D); -int dmulscale13(int a, int d, int S, int D); -int dmulscale14(int a, int d, int S, int D); -int dmulscale15(int a, int d, int S, int D); -int dmulscale16(int a, int d, int S, int D); -int dmulscale17(int a, int d, int S, int D); -int dmulscale18(int a, int d, int S, int D); -int dmulscale19(int a, int d, int S, int D); -int dmulscale20(int a, int d, int S, int D); -int dmulscale21(int a, int d, int S, int D); -int dmulscale22(int a, int d, int S, int D); -int dmulscale23(int a, int d, int S, int D); -int dmulscale24(int a, int d, int S, int D); -int dmulscale25(int a, int d, int S, int D); -int dmulscale26(int a, int d, int S, int D); -int dmulscale27(int a, int d, int S, int D); -int dmulscale28(int a, int d, int S, int D); -int dmulscale29(int a, int d, int S, int D); -int dmulscale30(int a, int d, int S, int D); -int dmulscale31(int a, int d, int S, int D); -int dmulscale32(int a, int d, int S, int D); -int tmulscale1(int a, int d, int b, int c, int S, int D); -int tmulscale2(int a, int d, int b, int c, int S, int D); -int tmulscale3(int a, int d, int b, int c, int S, int D); -int tmulscale4(int a, int d, int b, int c, int S, int D); -int tmulscale5(int a, int d, int b, int c, int S, int D); -int tmulscale6(int a, int d, int b, int c, int S, int D); -int tmulscale7(int a, int d, int b, int c, int S, int D); -int tmulscale8(int a, int d, int b, int c, int S, int D); -int tmulscale9(int a, int d, int b, int c, int S, int D); -int tmulscale10(int a, int d, int b, int c, int S, int D); -int tmulscale11(int a, int d, int b, int c, int S, int D); -int tmulscale12(int a, int d, int b, int c, int S, int D); -int tmulscale13(int a, int d, int b, int c, int S, int D); -int tmulscale14(int a, int d, int b, int c, int S, int D); -int tmulscale15(int a, int d, int b, int c, int S, int D); -int tmulscale16(int a, int d, int b, int c, int S, int D); -int tmulscale17(int a, int d, int b, int c, int S, int D); -int tmulscale18(int a, int d, int b, int c, int S, int D); -int tmulscale19(int a, int d, int b, int c, int S, int D); -int tmulscale20(int a, int d, int b, int c, int S, int D); -int tmulscale21(int a, int d, int b, int c, int S, int D); -int tmulscale22(int a, int d, int b, int c, int S, int D); -int tmulscale23(int a, int d, int b, int c, int S, int D); -int tmulscale24(int a, int d, int b, int c, int S, int D); -int tmulscale25(int a, int d, int b, int c, int S, int D); -int tmulscale26(int a, int d, int b, int c, int S, int D); -int tmulscale27(int a, int d, int b, int c, int S, int D); -int tmulscale28(int a, int d, int b, int c, int S, int D); -int tmulscale29(int a, int d, int b, int c, int S, int D); -int tmulscale30(int a, int d, int b, int c, int S, int D); -int tmulscale31(int a, int d, int b, int c, int S, int D); -int tmulscale32(int a, int d, int b, int c, int S, int D); -int divscale(int a, int b, int c); -int divscale1(int a, int b); -int divscale2(int a, int b); -int divscale3(int a, int b); -int divscale4(int a, int b); -int divscale5(int a, int b); -int divscale6(int a, int b); -int divscale7(int a, int b); -int divscale8(int a, int b); -int divscale9(int a, int b); -int divscale10(int a, int b); -int divscale11(int a, int b); -int divscale12(int a, int b); -int divscale13(int a, int b); -int divscale14(int a, int b); -int divscale15(int a, int b); -int divscale16(int a, int b); -int divscale17(int a, int b); -int divscale18(int a, int b); -int divscale19(int a, int b); -int divscale20(int a, int b); -int divscale21(int a, int b); -int divscale22(int a, int b); -int divscale23(int a, int b); -int divscale24(int a, int b); -int divscale25(int a, int b); -int divscale26(int a, int b); -int divscale27(int a, int b); -int divscale28(int a, int b); -int divscale29(int a, int b); -int divscale30(int a, int b); -int divscale31(int a, int b); -int divscale32(int d, int b); -int readpixel(void *D); -void drawpixel(void *D, int a); -void drawpixels(void *D, int a); -void drawpixelses(void *D, int a); -void clearbuf(void* D, int c, int a); -void copybuf(void *S, void *D, int c); -int mul3(int a); -int mul5(int a); -int mul9(int a); -int divmod(int a, int b); -int moddiv(int a, int b); -int klabs(int a); -int ksgn(int b); -int umin(int a, int b); -int umax(int a, int b); -int kmin(int a, int b); -int kmax(int a, int b); -void swapchar(void *a, void *b); -void swapshort(void *a, void *b); -void swaplong(void *a, void *b); -void swapbuf4(void *a, void *b, int c); -void swap64bit(void *a, void *b); -void swapchar2(void *a, void *b, int S); -#endif - diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index c70a842dd..3375fed31 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -1,5 +1,7 @@ //------------------------------------- MD2/MD3 LIBRARY BEGINS ------------------------------------- +#ifdef POLYMOST + #include "compat.h" #include "build.h" #include "glbuild.h" @@ -2975,4 +2977,6 @@ void mdfree(mdmodel *vm) if (vm->mdnum == 3) { md3free((md3model *)vm); return; } } +#endif + //---------------------------------------- MD LIBRARY ENDS ---------------------------------------- diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index c3c584c68..a37fc3abe 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -7370,7 +7370,7 @@ static void G_AddGroup(const char *buffer) j += lengths[i]; \ testplay_addparam[j++] = ' '; -#ifdef RENDERTYPEWIN +#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) extern char forcegl; #endif @@ -7494,7 +7494,7 @@ static void G_CheckCommandLine(int argc, const char **argv) continue; } #endif -#ifdef RENDERTYPEWIN +#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) if (!Bstrcasecmp(c+1,"forcegl")) { forcegl = 1; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index ac2f47153..5d651f3e9 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -164,7 +164,7 @@ int g_levelTextTime = 0; int r_maxfps = 0; unsigned int g_frameDelay = 0; -#ifdef RENDERTYPEWIN +#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) extern char forcegl; #endif @@ -9601,7 +9601,7 @@ static void G_CheckCommandLine(int argc, const char **argv) i++; continue; } -#ifdef RENDERTYPEWIN +#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) if (!Bstrcasecmp(c+1,"forcegl")) { forcegl = 1; @@ -10849,7 +10849,7 @@ void app_main(int argc,const char **argv) G_CheckCommandLine(argc,argv); -#ifdef RENDERTYPEWIN +#if defined(RENDERTYPEWIN) && defined(USE_OPENGL) if (forcegl) initprintf("GL driver blacklist disabled.\n"); #endif diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 6ef90a68c..0ad8558d6 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -1952,8 +1952,10 @@ static void G_DrawTileScaled(int x, int y, int tilenum, int shade, int orientati if (orientation&4) a = 1024; - if (usemodels && md_tilehasmodel(tilenum,p) > 0) +#if defined(POLYMOST) && defined(USE_OPENGL) + if (getrendermode() >= 3 && usemodels && md_tilehasmodel(tilenum,p) > 0) y += (224-weapsc(224)); +#endif rotatesprite(weapsc((orientation&256)?x:(x<<16))+((xoff-weapsc(xoff))<<16), weapsc((orientation&256)?y:(y<<16))+((200-weapsc(200))<<16), weapsc(65536L),a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);