diff --git a/glide3x/cvg/glide3/src/fxglide.h b/glide3x/cvg/glide3/src/fxglide.h index 85c3d12..3fe5f7d 100644 --- a/glide3x/cvg/glide3/src/fxglide.h +++ b/glide3x/cvg/glide3/src/fxglide.h @@ -19,6 +19,9 @@ ** ** $Header$ ** $Log$ +** Revision 1.1.1.1.8.3 2003/11/03 13:34:29 dborca +** Voodoo2 happiness (DJGPP & Linux) +** ** Revision 1.1.1.1.8.2 2003/07/25 07:13:41 dborca ** removed debris ** @@ -3346,7 +3349,9 @@ double_precision_asm(void); #define G3_LOD_TRANSLATE(lod) (lod) #define G3_ASPECT_TRANSLATE(aspect) (aspect) #else /* !GLIDE3_DEBUG */ -#define TEX_INFO(ptr,field) ptr##field##Log2 +/* [dBorca] picky preprocessors +#define TEX_INFO(ptr,field) ptr##field##Log2*/ +#define TEX_INFO(ptr,field) ptr field##Log2 #define G3_LOD_TRANSLATE(lod) (0x8-lod) #define G3_ASPECT_TRANSLATE(aspect) (0x3-(aspect)) #endif /* !GLIDE3_DEBUG */ diff --git a/glide3x/cvg/glide3/src/g3df.c b/glide3x/cvg/glide3/src/g3df.c index 8c3ce3d..9c24399 100644 --- a/glide3x/cvg/glide3/src/g3df.c +++ b/glide3x/cvg/glide3/src/g3df.c @@ -19,6 +19,9 @@ ** ** $Header$ ** $Log$ +** Revision 1.1.1.1.8.1 2003/11/03 13:34:29 dborca +** Voodoo2 happiness (DJGPP & Linux) +** ** Revision 1.1.1.1 1999/12/07 21:42:32 joseph ** Initial checkin into SourceForge. ** @@ -70,7 +73,9 @@ */ #include #include - +#ifdef __GNUC__ +#include +#endif #include <3dfx.h> #define FX_DLL_DEFINITION diff --git a/glide3x/h3/glide3/src/g3df.c b/glide3x/h3/glide3/src/g3df.c index fd9b6b7..8c042b9 100644 --- a/glide3x/h3/glide3/src/g3df.c +++ b/glide3x/h3/glide3/src/g3df.c @@ -19,6 +19,9 @@ ** ** $Header$ ** $Log$ +** Revision 1.1.1.1.6.2 2003/06/29 18:43:27 guillemj +** Fix compilation warnings. +** ** Revision 1.1.1.1.6.1 2003/05/05 07:12:46 dborca ** no message ** @@ -401,18 +404,13 @@ GR_DIENTRY(gu3dfGetInfo, FxBool, /* ** determine the color format of the input image */ -#if defined(__GNUC__) && !defined(__DJGPP__) /* [dBorca] DJGPP has `strupr' */ - /* This function is not found in libgcc.a */ { - char* tempStr = (char*)color_format; - while(*tempStr != '\0') *tempStr++ = toupper(*tempStr); + char *tempStr = (char*)color_format; + while (*tempStr != '\0') { + *tempStr = toupper(*tempStr); + tempStr++; + } } -#else - { - extern char* strupr(char*); - strupr(color_format); - } -#endif /* __GNUC__ */ i = 0; format_found = FXFALSE; diff --git a/glide3x/h5/glide3/src/fifo.c b/glide3x/h5/glide3/src/fifo.c index f9fd07c..6b990b7 100644 --- a/glide3x/h5/glide3/src/fifo.c +++ b/glide3x/h5/glide3/src/fifo.c @@ -1349,17 +1349,22 @@ _fifoAssertFull( void ) if ( !gc->windowed ) { if ((gFifoCheckCount++ & kFifoCheckMask) == 0) { +#if GLIDE_INIT_HAL const FxU32 cmdFifoDepth = GR_GET(((SstRegs*)(gc->reg_ptr))->cmdFifoDepth); +#else + /* [dBorca] gc->reg_ptr == NULL if not GLIDE_INIT_HAL */ + const FxU32 cmdFifoDepth = GR_GET(((SstRegs*)(gc->sstRegs))->cmdFifoDepth); +#endif const FxU32 maxFifoDepth = ((gc->cmdTransportInfo.fifoSize - FIFO_END_ADJUST) >> 2); - if(cmdFifoDepth > maxFifoDepth) { + if(cmdFifoDepth > maxFifoDepth) { GDBG_PRINTF("cmdFifoDepth > size: 0x%X : 0x%Xn", cmdFifoDepth, maxFifoDepth); - ASSERT_FAULT_IMMED(cmdFifoDepth <= maxFifoDepth); - } else if (cmdFifoDepth + (gc->cmdTransportInfo.fifoRoom >> 2) > maxFifoDepth) { + ASSERT_FAULT_IMMED(cmdFifoDepth <= maxFifoDepth); + } else if (cmdFifoDepth + (gc->cmdTransportInfo.fifoRoom >> 2) > maxFifoDepth) { GDBG_PRINTF("cmdFifoDepth + fifoRoom > size: (0x%X : 0x%X) : 0x%Xn", cmdFifoDepth, (gc->cmdTransportInfo.fifoRoom >> 2), maxFifoDepth); - ASSERT_FAULT_IMMED(cmdFifoDepth + (gc->cmdTransportInfo.fifoRoom >> 2) <= maxFifoDepth); - } + ASSERT_FAULT_IMMED(cmdFifoDepth + (gc->cmdTransportInfo.fifoRoom >> 2) <= maxFifoDepth); + } } ASSERT_FAULT_IMMED(HW_FIFO_PTR(FXTRUE) >= (FxU32)gc->cmdTransportInfo.fifoStart); ASSERT_FAULT_IMMED(HW_FIFO_PTR(FXTRUE) < (FxU32)gc->cmdTransportInfo.fifoEnd); diff --git a/glide3x/h5/glide3/src/fxglide.h b/glide3x/h5/glide3/src/fxglide.h index 4e9c024..285fce7 100644 --- a/glide3x/h5/glide3/src/fxglide.h +++ b/glide3x/h5/glide3/src/fxglide.h @@ -2329,7 +2329,7 @@ _trisetup_noclip_valid(const void *va, const void *vb, const void *vc ); (*gc->triSetupProc) #else // _MSC_VER // TRISETUP Macro for msvc 6 or later -#ifdef GLIDE_DEBUG +#if defined(GLIDE_DEBUG) || GLIDE_USE_C_TRISETUP // MSVC6 Debug does funny stuff, so push our parms inline #define TRISETUP(_a, _b, _c) \ __asm { \