compilation and some other minor fixes to aid in debugging

This commit is contained in:
dborca
2004-01-20 14:04:10 +00:00
parent 21a713dc68
commit 6ffeebc162
5 changed files with 31 additions and 18 deletions

View File

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

View File

@@ -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 <stdio.h>
#include <string.h>
#ifdef __GNUC__
#include <ctype.h>
#endif
#include <3dfx.h>
#define FX_DLL_DEFINITION

View File

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

View File

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

View File

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