003-clean_up_cvg-000, cvg tree cleanup.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
/* This should be exported, but isn't yet */
|
||||
#define SST1INIT_MAX_BOARDS 16
|
||||
|
||||
int main (int argc[], char* argv[])
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
FxU32* sst[SST1INIT_MAX_BOARDS];
|
||||
int num_sst;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __linux__
|
||||
#include <windows.h>
|
||||
@@ -106,10 +107,11 @@ MyDebugPrintf(FILE* outputFile, const char* fmtString, ...)
|
||||
|
||||
va_start(args, fmtString);
|
||||
{
|
||||
char msgBuf[256];
|
||||
//char msgBuf[256];
|
||||
|
||||
vsprintf(msgBuf, fmtString, args);
|
||||
OutputDebugString(msgBuf);
|
||||
vfprintf(stderr, fmtString, args);
|
||||
//vsprintf(msgBuf, fmtString, args);
|
||||
//OutputDebugString(msgBuf);
|
||||
}
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:08 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 16 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
@@ -279,8 +282,8 @@ GR_ENTRY(guMPDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const Gr
|
||||
|
||||
FxU32 alphamode, alphamode_orig;
|
||||
FxU32 fbzcolorpath, fbzcolorpath_orig;
|
||||
FxU32 fbzmode, fbzmode_orig;
|
||||
FxU32 fogmode, fogmode_orig;
|
||||
FxU32 fbzmode, fbzmode_orig = 0;
|
||||
FxU32 fogmode, fogmode_orig = 0;
|
||||
|
||||
alphamode = alphamode_orig = gc->state.fbi_config.alphaMode;
|
||||
fbzcolorpath = fbzcolorpath_orig = gc->state.fbi_config.fbzColorPath;
|
||||
@@ -399,8 +402,8 @@ GR_ENTRY(guMPDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const Gr
|
||||
|
||||
FxU32 alphamode, alphamode_orig;
|
||||
FxU32 fbzcolorpath, fbzcolorpath_orig;
|
||||
FxU32 fbzmode, fbzmode_orig;
|
||||
FxU32 fogmode, fogmode_orig;
|
||||
FxU32 fbzmode, fbzmode_orig = 0;
|
||||
FxU32 fogmode, fogmode_orig = 0;
|
||||
|
||||
alphamode = alphamode_orig = gc->state.fbi_config.alphaMode;
|
||||
fbzcolorpath = fbzcolorpath_orig = gc->state.fbi_config.fbzColorPath;
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 28 3/14/98 1:07p Peter
|
||||
** mac port happiness
|
||||
@@ -240,6 +243,7 @@ _grAssert(char *exp, char *fileName, int lineNo)
|
||||
#if !GLIDE_INIT_HAL
|
||||
if (gc->scanline_interleaved) {
|
||||
SstRegs* slaveHw = (SstRegs*)gc->slave_ptr;
|
||||
slaveHw = slaveHw; // FIXME: Below might not exist. *sigh*
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "\tsli: 0x%X : (0x%X : 0x%X : 0x%X)\n",
|
||||
HW_FIFO_PTR(FXFALSE),
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 168 7/02/98 6:59p Peter
|
||||
** Fixed merge problem from previous checkin
|
||||
@@ -510,7 +513,7 @@ GR_ENTRY(grBufferClear, void, (GrColor_t color, GrAlpha_t alpha, FxU16 depth))
|
||||
{
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET(BROADCAST_ID, hw, bltSize,
|
||||
(((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3) - 1));
|
||||
((((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)) - 1));
|
||||
GR_CHECK_SIZE();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 75 6/23/98 5:38p Peter
|
||||
** lfb hinting
|
||||
@@ -206,7 +209,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
{
|
||||
#define FN_NAME "grLfbLock"
|
||||
FxBool rv = FXTRUE;
|
||||
FxU32 lfbMode, zaColor, fbzMode;
|
||||
FxU32 lfbMode = 0, zaColor = 0, fbzMode = 0;
|
||||
const FxBool idleLockP = ((type & GR_LFB_NOIDLE) == 0);
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_MACOS) && SET_BSWAP
|
||||
FxBool swizzleByteP = FXFALSE;
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:11 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 26 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
@@ -767,8 +770,7 @@ GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
|
||||
int fadeInFrames, fadeOutFrames;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grSplash", 85);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%f,%f,%f,%f,%d)\n",
|
||||
x, y, w, h, _frame);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%f,%f,%f,%f,%d)\n", x, y, w, h, _frame);
|
||||
|
||||
/* Check Screen Dimensions and Check Avail of Depth Buffer */
|
||||
if ((x > gc->state.screen_width) ||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:11 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 168 6/30/98 6:08p Jeske
|
||||
** fixed bug where we tried to setup MTRRs on old (<p6) systems which
|
||||
@@ -411,7 +414,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
|
||||
#define FN_NAME "grSstWinOpen"
|
||||
FxBool rv = FXTRUE;
|
||||
int tmu;
|
||||
int xres, yres, fbStride;
|
||||
int xres = 0, yres = 0, fbStride;
|
||||
FxDeviceInfo devInfo;
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
sst1VideoTimingStruct *sstVideoRez = NULL, tvVidtiming;
|
||||
@@ -1803,7 +1806,7 @@ GR_ENTRY(grSstControl, FxBool, (GrControl_t code))
|
||||
#elif (GLIDE_PLATFORM & GLIDE_HW_CVG) && !GLIDE_INIT_HAL
|
||||
{
|
||||
FxBool isValidP = FXTRUE;
|
||||
FxBool passFlag;
|
||||
FxBool passFlag = 0;
|
||||
|
||||
switch ( code ) {
|
||||
case GR_CONTROL_DEACTIVATE:
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:11 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 61 5/18/98 12:11p Peter
|
||||
** removed unnecesasry fencing
|
||||
@@ -271,7 +274,7 @@ GR_DDFUNC(_grTexDownloadPalette,
|
||||
slopCount, (0xFF >> (8 - slopCount)));
|
||||
while(i < start + slopCount) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
(0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF)));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
@@ -284,7 +287,7 @@ GR_DDFUNC(_grTexDownloadPalette,
|
||||
REG_GROUP_BEGIN(chipId, nccTable0[4], 8, 0xFF);
|
||||
while(i < endIndex) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
(0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF)));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
@@ -298,7 +301,7 @@ GR_DDFUNC(_grTexDownloadPalette,
|
||||
slopCount, (0xFF >> (8 - slopCount)));
|
||||
while(i <= end) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
(0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF)));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 7 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
@@ -10655,7 +10658,7 @@ static Gu3dfInfo hilite_3dfinfo = {
|
||||
GR_ASPECT_1x1, /* aspect_ratio */
|
||||
GR_TEXFMT_INTENSITY_8 /* format */
|
||||
},
|
||||
{ 0x0000000 }, /* table */
|
||||
{ {{0x0000000}} }, /* table */
|
||||
NULL, /* data */
|
||||
0x00000ab0 /* mem_required */
|
||||
};
|
||||
@@ -12040,7 +12043,7 @@ static Gu3dfInfo shadow_3dfinfo = {
|
||||
GR_ASPECT_2x1, /* aspect_ratio */
|
||||
GR_TEXFMT_INTENSITY_8 /* format */
|
||||
},
|
||||
{ 0x00000000 }, /* table */
|
||||
{ {{0x00000000}} }, /* table */
|
||||
NULL, /* data */
|
||||
0x00000ab0 /* mem_required */
|
||||
};
|
||||
|
||||
@@ -43,11 +43,6 @@ static const char name[] = "display";
|
||||
static const char purpose[] = "display a 16 bit frame buffer (565 format) dump out";
|
||||
static const char usage[] = "-n <frames> -r <res> -s srcimage -t testimage";
|
||||
|
||||
static const char *renderBufferString[] = {
|
||||
"GR_BUFFER_FRONTBUFFER",
|
||||
"GR_BUFFER_BACKBUFFER "
|
||||
};
|
||||
|
||||
static const char *sourceFormatString[] = {
|
||||
"GR_LFB_SRC_FMT_565 ",
|
||||
"GR_LFB_SRC_FMT_555 ",
|
||||
@@ -68,7 +63,8 @@ static const char *sourceFormatString[] = {
|
||||
};
|
||||
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -84,7 +80,7 @@ void main( int argc, char **argv) {
|
||||
LFB_Img src, dst, diff;
|
||||
FxBool txtdisplay = FXTRUE;
|
||||
|
||||
void *image;
|
||||
void *image = NULL;
|
||||
FxU32 bpp;
|
||||
|
||||
GrLfbSrcFmt_t sourceFormat;
|
||||
@@ -101,13 +97,13 @@ void main( int argc, char **argv) {
|
||||
dstfname[0] = 0;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -171,8 +167,8 @@ void main( int argc, char **argv) {
|
||||
/* readng the LFB file header */
|
||||
fread(&src.signature, 4, 1, fp);
|
||||
if (src.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
printf("%s file type incorrect\n", srcfname);
|
||||
exit(1);
|
||||
}
|
||||
fread(&src.width, 2, 1, fp);
|
||||
fread(&src.height, 2, 1, fp);
|
||||
@@ -205,8 +201,8 @@ void main( int argc, char **argv) {
|
||||
/* readng the LFB file header */
|
||||
fread(&dst.signature, 4, 1, fp);
|
||||
if (dst.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
printf("%s file type incorrect\n", dstfname);
|
||||
exit(1);
|
||||
}
|
||||
fread(&dst.width, 2, 1, fp);
|
||||
fread(&dst.height, 2, 1, fp);
|
||||
@@ -269,7 +265,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
if ( ( imageWidth > (FxU32)scrWidth ) ||
|
||||
( imageHeight > (FxU32)scrHeight ) )
|
||||
return;
|
||||
exit(1);
|
||||
|
||||
while( frames-- ) {
|
||||
|
||||
@@ -360,7 +356,7 @@ void main( int argc, char **argv) {
|
||||
if (srcfname[0] && dstfname[0])
|
||||
free(diff.data);
|
||||
free(image);
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -90,10 +90,9 @@ void drawBoxes(int w, int h, unsigned long c1, unsigned long c2) {
|
||||
grDrawLine(&p2,&p3);
|
||||
}
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
int keepworking = 1;
|
||||
GrScreenResolution_t resolution;
|
||||
int frames = -1;
|
||||
int redraw = 1;
|
||||
int redrawPattern = 0;
|
||||
int patternon = 1;
|
||||
@@ -193,6 +192,6 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
typedef enum { NORMAL, ANTIALIASED } Mode;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -68,13 +68,13 @@ void main( int argc, char **argv) {
|
||||
// GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -254,7 +254,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
@@ -44,6 +44,19 @@ static GrChipID_t currTMU = GR_TMU0;
|
||||
static FxBool bMultiRevOrder;
|
||||
static FxBool bMultiOffsetFix;
|
||||
|
||||
/* static helper prototypes */
|
||||
static FxU32 prGetLodSize( GrTexInfo *const disTexInfo, GrLOD_t disLOD );
|
||||
static FxU32 prTexMultiMemRequired( FxU32 deMipMask, GrTexBaseRange_t deRange,
|
||||
GrTexInfo* deTexInfo );
|
||||
static void prGetLod( GrTexInfo *lpTexInfo, GrLOD_t deLod, void *data );
|
||||
static void prPopLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static FxU32 prGetTxMnAdd( hTexId_t deTexId, GrLOD_t deLod );
|
||||
static int prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static int prGetLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo,
|
||||
GrTexBaseRange_t deTexBase,
|
||||
FxU32 deMipMask );
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
|
||||
@@ -99,20 +99,6 @@ void plPopLod( hTexId_t hCurrTexture, mipMapEnd_t mipMapEnd );
|
||||
void plPushLod( hTexId_t hCurrTexture, mipMapEnd_t mipMapEnd );
|
||||
void plCreateTlTexture( TlTexture *disTlTexture, FxU16 daColors[] );
|
||||
|
||||
/* static helper prototypes */
|
||||
static void prSetBeenPopd( hTexId_t deTexId, FxBool bBeenPopd );
|
||||
static FxU32 prGetLodSize( GrTexInfo *const disTexInfo, GrLOD_t disLOD );
|
||||
static FxU32 prTexMultiMemRequired( FxU32 deMipMask, GrTexBaseRange_t deRange,
|
||||
GrTexInfo* deTexInfo );
|
||||
static void prGetLod( GrTexInfo *lpTexInfo, GrLOD_t deLod, void *data );
|
||||
static void prPopLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static FxU32 prGetTxMnAdd( hTexId_t deTexId, GrLOD_t deLod );
|
||||
static int prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static int prGetLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo,
|
||||
GrTexBaseRange_t deTexBase,
|
||||
FxU32 deMipMask );
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ static FxBool g_bDoLodPrtlDwnld = FXFALSE;
|
||||
static FxI32 g_nLodPrtlFstRow;
|
||||
static FxI32 g_nLodPrtlLstRow;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -88,10 +88,10 @@ void main( int argc, char **argv) {
|
||||
|
||||
/* templates for all algorithmic textures */
|
||||
GrTexInfo yAlgTxtreTmplts[][9] =
|
||||
{{ GR_LOD_1, GR_LOD_256, GR_ASPECT_8x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_4x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_2x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL }};
|
||||
{{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_8x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_4x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_2x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL} }};
|
||||
|
||||
const int nDwnLodTxtres = 8;
|
||||
FxU16 yDwnLodClrs[][9] =
|
||||
@@ -105,23 +105,23 @@ void main( int argc, char **argv) {
|
||||
{ BLU_565, BLU_565, BLU_565, BLU_565, BLU_565, BLU_565, BLU_565, BLU_565, BLU_565 }};
|
||||
|
||||
GrTexInfo yDwnTxtreTmplts[][9] =
|
||||
{{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_332, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_ARGB_1555, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_ARGB_4444, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_8x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_4x1, GR_TEXFMT_RGB_565, NULL },
|
||||
{ GR_LOD_1, GR_LOD_256, GR_ASPECT_2x1, GR_TEXFMT_RGB_565, NULL }};
|
||||
{{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_332, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_ARGB_1555, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_ARGB_4444, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_1x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_8x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_4x1, GR_TEXFMT_RGB_565, NULL} },
|
||||
{ {GR_LOD_1, GR_LOD_256, GR_ASPECT_2x1, GR_TEXFMT_RGB_565, NULL} }};
|
||||
|
||||
/* texture handles */
|
||||
hTexId_t hCurrFgTxtre, /* current fg texture */
|
||||
hFstFgTxtre, /* first fg texture */
|
||||
hFstFgTxtre = 0, /* first fg texture */
|
||||
hLstFgTxtre, /* last fg texture */
|
||||
hFstAlgFgTxtre, /* first algo texture */
|
||||
hLstAlgFgTxtre, /* last algo texture */
|
||||
hFstDwnlTxtre, /* first lod download texture */
|
||||
hLstDwnlTxtre, /* last lod download texture */
|
||||
hLstAlgFgTxtre = 0, /* last algo texture */
|
||||
hFstDwnlTxtre = 0, /* first lod download texture */
|
||||
hLstDwnlTxtre = 0, /* last lod download texture */
|
||||
hDwlnSrcTxtre,
|
||||
hTmpTxtre;
|
||||
hTexId_t hBgTxtre; /* bg texture */
|
||||
@@ -179,14 +179,14 @@ void main( int argc, char **argv) {
|
||||
fgVerts[3].tmuvtx[0].tow = 0.f;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) )
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) )
|
||||
{
|
||||
if ( rv == -1 )
|
||||
{
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n", tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
switch( match )
|
||||
@@ -739,8 +739,7 @@ void main( int argc, char **argv) {
|
||||
doUnloadTextures();
|
||||
grGlideShutdown();
|
||||
|
||||
|
||||
return;
|
||||
exit(1);
|
||||
} /* main */
|
||||
|
||||
|
||||
|
||||
@@ -51,8 +51,7 @@ static const char purpose[] = "Buffer Swap Alliance bug";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
int main( int argc, char **argv)
|
||||
{
|
||||
/* Definitions */
|
||||
char match;
|
||||
@@ -84,13 +83,13 @@ main( int argc, char **argv)
|
||||
|
||||
/* Code */
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -165,5 +164,5 @@ main( int argc, char **argv)
|
||||
}
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ static const char name[] = "test00";
|
||||
static const char purpose[] = "Clear screen to blue";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void
|
||||
int
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -53,13 +53,13 @@ main( int argc, char **argv)
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while(( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) )) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -129,6 +129,6 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test01";
|
||||
static const char purpose[] = "draws a diagonal line of points from top-left to bottom-right";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void
|
||||
int
|
||||
main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
@@ -49,13 +49,13 @@ main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -145,7 +145,7 @@ main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test02";
|
||||
static const char purpose[] = "draws a parabolic envelope of lines";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -147,7 +147,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test03";
|
||||
static const char purpose[] = "draws gouraud shaded lines";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -142,7 +142,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test04";
|
||||
static const char purpose[] = "draws gouraud shaded triangle";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -145,7 +145,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test05";
|
||||
static const char purpose[] = "renders two interpenetrating triangles with z-buffering";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void
|
||||
int
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -50,13 +50,13 @@ main( int argc, char **argv)
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -179,7 +179,7 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test06";
|
||||
static const char purpose[] = "renders two interpenetrating triangles with w-buffering";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -176,7 +176,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test07";
|
||||
static const char purpose[] = "alpha blending test";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -159,7 +159,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test08";
|
||||
static const char purpose[] = "fogging";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -50,13 +50,13 @@ void main( int argc, char **argv) {
|
||||
GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -158,7 +158,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char purpose[] = "chromakey - render a red and blue"
|
||||
" triangle but chromakey one out";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -52,13 +52,13 @@ void main( int argc, char **argv) {
|
||||
unsigned long chromaColor;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) )) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -166,7 +166,7 @@ void main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -200,7 +200,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ static const char purpose[] = "culling test - render a red and blue"
|
||||
", blue negative";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -53,13 +53,13 @@ void main( int argc, char **argv) {
|
||||
GrCullMode_t cullMode;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -162,7 +162,7 @@ void main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -195,7 +195,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ static const char usage[] = "-n <frames> -r <res>";
|
||||
static int rRandom(int s, int e);
|
||||
static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -54,13 +54,13 @@ void main( int argc, char **argv) {
|
||||
int x,y;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -148,7 +148,7 @@ void main( int argc, char **argv) {
|
||||
|
||||
if ( tlScaleX(1.0f) < 64.0 ||
|
||||
tlScaleY(1.0f) < 64.0 )
|
||||
return;
|
||||
exit(1);
|
||||
|
||||
/* generate random start position */
|
||||
startX = (int)rRandom( 64, (int)tlScaleX(1.0f) - 65 );
|
||||
@@ -223,7 +223,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
@@ -70,7 +70,7 @@ static const char *pixPipeString[] = {
|
||||
"PIXELPIPE ENABLED "
|
||||
};
|
||||
|
||||
void
|
||||
int
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
char match;
|
||||
@@ -94,13 +94,13 @@ main( int argc, char **argv)
|
||||
FxBool pixPipe;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -116,7 +116,7 @@ main( int argc, char **argv)
|
||||
|
||||
if ( resolution == GR_RESOLUTION_NONE ) {
|
||||
tlErrorMessage( "Error!: Frontbuffer rendering not supported in a window\n" );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
tlSetScreen( scrWidth, scrHeight );
|
||||
@@ -335,7 +335,7 @@ main( int argc, char **argv)
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
} /* main */
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char name[] = "test13";
|
||||
static const char purpose[] = "iterated alpha test - blue triangle fades towards one vertex\n";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -49,13 +49,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -167,5 +167,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char purpose[] = "depth bias test: vary depth bias \n"
|
||||
"over time with two interpenetrating triangles";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -50,13 +50,13 @@ void main( int argc, char **argv) {
|
||||
short zDelta;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -177,5 +177,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test15";
|
||||
static const char purpose[] = "clip rectangle testing - clip rectangle travels around screen";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -48,13 +48,13 @@ void main( int argc, char **argv) {
|
||||
float clipX, clipY, clipSize, clipSizeDelta, clipPosDelta;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -210,5 +210,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char name[] = "test16";
|
||||
static const char purpose[] = "test grShamelessPlug and grSplash";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -49,13 +49,13 @@ void main( int argc, char **argv) {
|
||||
char filename[256];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -194,5 +194,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ const char *textureModeNames[] = {
|
||||
"(ITRGB * TEXTURE)+WHITE SPECULAR"
|
||||
};
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -61,13 +61,13 @@ void main( int argc, char **argv) {
|
||||
TlTexture texture;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -257,7 +257,7 @@ void main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -285,5 +285,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ static const char name[] = "test18";
|
||||
static const char purpose[] = "alpha texture test";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -51,13 +51,13 @@ void main( int argc, char **argv) {
|
||||
TlTexture texture;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -251,5 +251,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ static int loadTexture( const char *filename,
|
||||
void *table );
|
||||
static GrTexTable_t texTableType( GrTextureFormat_t format );
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -79,13 +79,13 @@ void main( int argc, char **argv) {
|
||||
Texture texture;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -245,7 +245,7 @@ void main( int argc, char **argv) {
|
||||
cnt = strcspn(filename, ".");
|
||||
strncpy(fname, filename, cnt);
|
||||
fname[cnt] = 0;
|
||||
sprintf(tmp,"_%d\0", subframe);
|
||||
sprintf(tmp,"_%d", subframe);
|
||||
strcat(fname, tmp);
|
||||
strcat(fname, filename+cnt);
|
||||
if (!tlScreenDump(fname, (FxU16)scrWidth, (FxU16)scrHeight))
|
||||
@@ -293,7 +293,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ static const char usage[] = "-n <frames> -r <res>";
|
||||
typedef enum { DISABLE, NEAREST, TRILINEAR } MipMapMode;
|
||||
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -55,13 +55,13 @@ void main( int argc, char **argv) {
|
||||
MipMapMode mipMapMode;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -310,7 +310,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
typedef enum { LIGHTMAP, SPECULAR, DETAIL } Mode;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -60,13 +60,13 @@ void main( int argc, char **argv) {
|
||||
Mode mode;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -364,7 +364,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test22";
|
||||
static const char purpose[] = "fog with multi-pass texturing";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -56,13 +56,13 @@ void main( int argc, char **argv) {
|
||||
float distance, dDelta;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -296,7 +296,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
typedef enum { NORMAL, ANTIALIASED } Mode;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -60,13 +60,13 @@ void main( int argc, char **argv) {
|
||||
GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -222,7 +222,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
@@ -40,7 +40,7 @@ static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
typedef enum { NORMAL, ANTIALIASED } Mode;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -59,13 +59,13 @@ void main( int argc, char **argv) {
|
||||
GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -217,7 +217,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
@@ -164,7 +164,7 @@ static int screenFulls[] = {
|
||||
#define NFRAMES 20
|
||||
#define NVERTS 3
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -187,7 +187,7 @@ void main( int argc, char **argv) {
|
||||
y_angle = 0.0f; /* rotation amount */
|
||||
|
||||
int
|
||||
firstTime; /* Used for performance calculations */
|
||||
firstTime = 0; /* Used for performance calculations */
|
||||
|
||||
GrPassthruMode_t
|
||||
passthruMode = GR_PASSTHRU_SHOW_SST1; /* For toggling passthru */
|
||||
@@ -211,7 +211,7 @@ void main( int argc, char **argv) {
|
||||
swapDelay = 1, /* Arg to grBufferSwap */
|
||||
trisDrawn, /* # triangles drawn */
|
||||
trisProcessed, /* # triangles through pipeline */
|
||||
lastFrame, /* Number of last frame we did perf stats */
|
||||
lastFrame = 0, /* Number of last frame we did perf stats */
|
||||
frameNum = 0L; /* id of each frame drawn */
|
||||
|
||||
GrCullMode_t
|
||||
@@ -238,13 +238,13 @@ void main( int argc, char **argv) {
|
||||
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrbtea", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nrbtea", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -872,7 +872,7 @@ void main( int argc, char **argv) {
|
||||
{
|
||||
char str[256];
|
||||
swapDelay = (int) c - 0x30;
|
||||
sprintf(str, "Swapdelay = %d\n", swapDelay);
|
||||
sprintf(str, "Swapdelay = %ld\n", swapDelay);
|
||||
tlConOutput(str);
|
||||
}
|
||||
break;
|
||||
@@ -891,4 +891,5 @@ void main( int argc, char **argv) {
|
||||
break;
|
||||
}
|
||||
grGlideShutdown();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -35,11 +35,6 @@ static const char name[] = "test26";
|
||||
static const char purpose[] = "tests grLfbWriteRegion, and grLfbReadRegion";
|
||||
static const char usage[] = "-b <# color buffers> -d <# aux buffers> -n <frames> -r <res>";
|
||||
|
||||
static const char *renderBufferString[] = {
|
||||
"GR_BUFFER_FRONTBUFFER",
|
||||
"GR_BUFFER_BACKBUFFER "
|
||||
};
|
||||
|
||||
static const char *sourceFormatString[] = {
|
||||
"GR_LFB_SRC_FMT_565 ",
|
||||
"GR_LFB_SRC_FMT_555 ",
|
||||
@@ -60,7 +55,7 @@ static const char *sourceFormatString[] = {
|
||||
};
|
||||
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -88,13 +83,13 @@ void main( int argc, char **argv) {
|
||||
FxU32 *bpp );
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "bdnr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "bdnr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'b':
|
||||
@@ -169,7 +164,7 @@ void main( int argc, char **argv) {
|
||||
(int) scrWidth, (int) scrHeight);
|
||||
|
||||
tlErrorMessage(errMsg);
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sourceFormat = GR_LFB_SRC_FMT_565;
|
||||
@@ -289,7 +284,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
#define SNAP_BIAS ((float)(3<<18))
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -56,13 +56,13 @@ void main( int argc, char **argv) {
|
||||
int cycles;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "Nnr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "Nnr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -167,7 +167,7 @@ doNothing:
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
@@ -90,7 +90,7 @@ static const char name[] = "test28";
|
||||
static const char purpose[] = "planar polygon test";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -107,13 +107,13 @@ void main( int argc, char **argv) {
|
||||
RGB hues[NHUE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -222,5 +222,5 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ static const char name[] = "test29";
|
||||
static const char purpose[] = "oow diff hint";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
@@ -50,13 +50,13 @@ void main( int argc, char **argv) {
|
||||
float distance, dDelta;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
while( (rv = tlGetOpt( argc, argv, "nr", &match, &remArgs )) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
exit(1);
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
@@ -261,7 +261,7 @@ void main( int argc, char **argv) {
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -338,7 +338,6 @@ static const int charsPerLine = 14;
|
||||
|
||||
static int fontInitialized;
|
||||
|
||||
static void grabTex( FxU32 addr, void *storage );
|
||||
static void putTex( FxU32 addr, void *storage );
|
||||
static void consoleScroll( void );
|
||||
static void drawChar( char character, float x, float y, float w, float h );
|
||||
@@ -450,7 +449,6 @@ static void strupr(char *str) {
|
||||
int - number of chars printed
|
||||
-------------------------------------------------------------------*/
|
||||
int tlConOutput( const char *fmt, ... ) {
|
||||
static short tmpTex[256*256];
|
||||
int rv = 0;
|
||||
va_list argptr;
|
||||
|
||||
@@ -531,8 +529,6 @@ void tlConClear() {
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
void tlConRender( void ) {
|
||||
static short tmpTex[256*256];
|
||||
|
||||
if( fontInitialized ) {
|
||||
int x, y;
|
||||
|
||||
@@ -955,14 +951,10 @@ static void drawChar( char character, float x, float y, float w, float h ) {
|
||||
|
||||
grConstantColorValue( consoleColor );
|
||||
|
||||
a.tmuvtx[0].sow = c.tmuvtx[0].sow =
|
||||
(float)fontTable[character][0];
|
||||
a.tmuvtx[0].tow = b.tmuvtx[0].tow =
|
||||
(float)fontTable[character][1];
|
||||
d.tmuvtx[0].sow = b.tmuvtx[0].sow =
|
||||
a.tmuvtx[0].sow + (float)fontWidth;
|
||||
d.tmuvtx[0].tow = c.tmuvtx[0].tow =
|
||||
a.tmuvtx[0].tow + (float)fontHeight;
|
||||
a.tmuvtx[0].sow = c.tmuvtx[0].sow = (float)fontTable[(int) character][0];
|
||||
a.tmuvtx[0].tow = b.tmuvtx[0].tow = (float)fontTable[(int) character][1];
|
||||
d.tmuvtx[0].sow = b.tmuvtx[0].sow = a.tmuvtx[0].sow + (float)fontWidth;
|
||||
d.tmuvtx[0].tow = c.tmuvtx[0].tow = a.tmuvtx[0].tow + (float)fontHeight;
|
||||
|
||||
grDrawTriangle( &a, &d, &c );
|
||||
grDrawTriangle( &a, &b, &d );
|
||||
@@ -992,74 +984,6 @@ static void putTex( FxU32 addr, void *storage ) {
|
||||
grTexDownloadMipMap( 0, addr, GR_MIPMAPLEVELMASK_BOTH, &fontInfo );
|
||||
}
|
||||
|
||||
|
||||
static void grabTex( FxU32 addr, void *storage ) {
|
||||
static FxU16 tmpSpace[256][256];
|
||||
GrTexInfo texInfo;
|
||||
GrVertex a, b, c, d;
|
||||
|
||||
grGlideGetState( &state );
|
||||
grDitherMode( GR_DITHER_DISABLE );
|
||||
grColorMask( FXTRUE, FXFALSE );
|
||||
grSstOrigin( GR_ORIGIN_UPPER_LEFT );
|
||||
grCullMode( GR_CULL_DISABLE );
|
||||
|
||||
/* Grab Upper Left 256*256 of frame buffer */
|
||||
readRegion( tmpSpace, 0, 0, 256, 256 );
|
||||
|
||||
/* Grab First 256x256 MM in Texture Ram */
|
||||
texInfo.smallLod = GR_LOD_256;
|
||||
texInfo.largeLod = GR_LOD_256;
|
||||
texInfo.aspectRatio = GR_ASPECT_1x1;
|
||||
texInfo.format = GR_TEXFMT_RGB_565;
|
||||
texInfo.data = 0;
|
||||
grTexMipMapMode( 0, GR_MIPMAP_DISABLE, FXFALSE );
|
||||
grTexFilterMode( 0,
|
||||
GR_TEXTUREFILTER_POINT_SAMPLED,
|
||||
GR_TEXTUREFILTER_POINT_SAMPLED );
|
||||
grTexCombine( 0,
|
||||
GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE );
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE );
|
||||
grTexSource( 0, addr, GR_MIPMAPLEVELMASK_BOTH, &texInfo );
|
||||
grAlphaBlendFunction( GR_BLEND_ONE, GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
grDepthBufferFunction( GR_DEPTHBUFFER_DISABLE );
|
||||
grAlphaTestFunction( GR_CMP_ALWAYS );
|
||||
grFogMode( GR_FOG_DISABLE );
|
||||
grCullMode( GR_CULL_DISABLE );
|
||||
grChromakeyMode( GR_CHROMAKEY_DISABLE );
|
||||
/*-------------------
|
||||
A---B
|
||||
| \ |
|
||||
C---D
|
||||
-------------------*/
|
||||
a.oow = a.tmuvtx[0].oow = 1.0f;
|
||||
b = c = d = a;
|
||||
a.x = c.x = a.y = b.y = 0.5f;
|
||||
b.x = d.x = c.y = d.y = 255.6f;
|
||||
a.tmuvtx[0].sow = c.tmuvtx[0].sow = a.tmuvtx[0].tow = b.tmuvtx[0].tow =
|
||||
0.5f;
|
||||
b.tmuvtx[0].sow = d.tmuvtx[0].sow = c.tmuvtx[0].tow = d.tmuvtx[0].tow =
|
||||
0.5f;
|
||||
grDrawTriangle( &a, &d, &c );
|
||||
grDrawTriangle( &a, &b, &d );
|
||||
readRegion( storage, 0, 0, 256, 256 );
|
||||
|
||||
/* Restore The Upper Left Hand of Frame Buffer */
|
||||
writeRegion( tmpSpace, 0, 0, 256, 256 );
|
||||
grGlideSetState( &state );
|
||||
return;
|
||||
}
|
||||
|
||||
static void readRegion( void *data,
|
||||
int sx, int sy,
|
||||
int w, int h ) {
|
||||
@@ -1433,7 +1357,7 @@ char tlGetCH( void ) {
|
||||
|
||||
FxBool
|
||||
tlErrorMessage( char *err) {
|
||||
fprintf(stderr, err);
|
||||
return !!fprintf(stderr, err);
|
||||
} /* tlErrorMessage */
|
||||
|
||||
#else
|
||||
|
||||
@@ -32,10 +32,7 @@ extern "C" {
|
||||
* so that it is a harmless wrapper rather than ((void)0) as in <assert.h>
|
||||
*/
|
||||
#ifndef DEBUG
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(exp) (exp)
|
||||
#define NDEBUG
|
||||
#endif
|
||||
|
||||
int tlGetOpt( int argc, char *argv[], const char *tags, char *match, char **remArgs[] );
|
||||
|
||||
@@ -42,10 +42,24 @@
|
||||
// if debug info turned on then GDBG_INFO does something
|
||||
#ifdef GDBG_INFO_ON
|
||||
|
||||
// Standard C provides no clean way to do this, but the GNU C tools do..
|
||||
#ifdef __GNUC__
|
||||
|
||||
#define GDBG_INFO(level, format, args...) \
|
||||
gdbg_info(level, format , ## args)
|
||||
#define GDBG_INFO_MORE(level, format, args...) \
|
||||
gdbg_info_more(level, format , ## args)
|
||||
#define GDBG_PRINTF(format, args...) \
|
||||
gdbg_printf(format , ## args)
|
||||
|
||||
#else
|
||||
|
||||
#define GDBG_INFO gdbg_info
|
||||
#define GDBG_INFO_MORE gdbg_info_more
|
||||
#define GDBG_PRINTF gdbg_printf
|
||||
|
||||
#endif
|
||||
|
||||
#define GDBG_ERROR_SET_CALLBACK gdbg_error_set_callback
|
||||
#define GDBG_ERROR_CLEAR_CALLBACK gdbg_error_clear_callback
|
||||
|
||||
@@ -66,6 +80,15 @@
|
||||
#pragma disable_message (111, 201)
|
||||
#endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
|
||||
|
||||
// Standard C provides no clean way to do this, but the GNU C tools do..
|
||||
#ifdef __GNUC__
|
||||
|
||||
#define GDBG_INFO(level, format, args...)
|
||||
#define GDBG_INFO_MORE(level, format, args...)
|
||||
#define GDBG_PRINTF(format, args...)
|
||||
|
||||
#else
|
||||
|
||||
#define GDBG_INFO 0 && (unsigned long)
|
||||
#define GDBG_INFO_MORE 0 && (unsigned long)
|
||||
#define GDBG_PRINTF 0 && (unsigned long)
|
||||
@@ -73,9 +96,12 @@
|
||||
#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
|
||||
#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
|
||||
|
||||
#endif
|
||||
|
||||
#define GDBG_GET_DEBUGLEVEL(x) 0
|
||||
#define GDBG_SET_DEBUGLEVEL(a,b)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#define GDBG_INIT gdbg_init
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
** Initialization code for initializing supported SST-1 DACs
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -1367,4 +1369,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitDacIndexedEnable(FxU32 *sstbase,
|
||||
return(FXTRUE);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** Initialization code for loading SST-1 gamma tables
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -249,4 +251,6 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitGammaTable(FxU32 *sstbase, FxU32 nentries, Fx
|
||||
return(FXTRUE);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -252,8 +252,10 @@ gdbg_vprintf (const char *format,va_list args)
|
||||
|
||||
#if __DOS32__
|
||||
pciOutputDebugString(msgBuf);
|
||||
#else
|
||||
#elif __WIN32
|
||||
OutputDebugString(msgBuf);
|
||||
#else
|
||||
fprintf(stderr, msgBuf);
|
||||
#endif /* !__DOS32__ */
|
||||
} else
|
||||
#endif /* USE_DEBUG_STRING */
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** configuration information.
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef BUILD_FOR_SST1
|
||||
@@ -235,7 +237,7 @@ getTmuConfigData(FxU32 *sstbase, sst1DeviceInfoStruct *info)
|
||||
ISET(SST_TREX(sst,2)->trexInit1, info->tmuInit1[2]);
|
||||
|
||||
if(GETENV(("SSTV2_TMUCFG")))
|
||||
SSCANF(GETENV(("SSTV2_TMUCFG")), "%i", &info->tmuConfig);
|
||||
SSCANF(GETENV(("SSTV2_TMUCFG")), "%ld", &info->tmuConfig);
|
||||
|
||||
return(FXTRUE);
|
||||
}
|
||||
@@ -512,7 +514,7 @@ sst1InitGetFbiInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
|
||||
|
||||
/* Detect board identification and memory speed */
|
||||
if(GETENV(("SSTV2_FBICFG")))
|
||||
SSCANF(GETENV(("SSTV2_FBICFG")), "%i", &info->fbiConfig);
|
||||
SSCANF(GETENV(("SSTV2_FBICFG")), "%ld", &info->fbiConfig);
|
||||
else
|
||||
info->fbiConfig = (IGET(sst->fbiInit3) & SST_FBI_MEM_TYPE) >>
|
||||
SST_FBI_MEM_TYPE_SHIFT;
|
||||
@@ -565,12 +567,12 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
|
||||
INIT_PRINTF(("sst1DeviceInfo: Filling info Struct with default values...\n"));
|
||||
|
||||
if(GETENV(("SSTV2_FBICFG")))
|
||||
SSCANF(GETENV(("SSTV2_FBICFG")), "%i", &info->fbiConfig);
|
||||
SSCANF(GETENV(("SSTV2_FBICFG")), "%ld", &info->fbiConfig);
|
||||
else
|
||||
info->fbiConfig = 0x0;
|
||||
|
||||
if(GETENV(("SSTV2_TMUCFG")))
|
||||
SSCANF(GETENV(("SSTV2_TMUCFG")), "%i", &info->tmuConfig);
|
||||
SSCANF(GETENV(("SSTV2_TMUCFG")), "%ld", &info->tmuConfig);
|
||||
else
|
||||
info->tmuConfig = 0x0;
|
||||
|
||||
@@ -650,4 +652,6 @@ FxBool sst1InitFillDeviceInfo(FxU32 *sstbase, sst1DeviceInfoStruct *info)
|
||||
|
||||
return(FXTRUE);
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** Parsing code for grabbing information from "voodoo2.ini" initialization file
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -49,16 +51,21 @@
|
||||
|
||||
static int sst1InitFgets(char *, FILE *);
|
||||
static int sst1InitFgetc(FILE *);
|
||||
#ifndef INIT_LINUX
|
||||
static int sst1InitParseFieldDac(char *);
|
||||
#endif
|
||||
static int sst1InitParseFieldCfg(char *);
|
||||
#ifndef INIT_LINUX
|
||||
static int sst1InitParseDacRdWrString(char *, sst1InitDacStruct *);
|
||||
static int sst1InitParseDacRdWr(char *, sst1InitDacRdWrStruct *);
|
||||
static int sst1InitParseSetVideoString(char *, sst1InitDacStruct *);
|
||||
static int sst1InitParseSetMemClkString(char *, sst1InitDacStruct *);
|
||||
static int sst1InitParseSetVideoModeString(char *, sst1InitDacStruct *);
|
||||
static void sst1InitPrintDacRdWr(sst1InitDacRdWrStruct *, char *);
|
||||
#endif
|
||||
static void sst1InitToLower(char *string);
|
||||
#if __DOS32__
|
||||
static void sst1InitFixFilename(char *dst, char *src);
|
||||
#endif
|
||||
|
||||
static FxBool checkedFileP = FXFALSE;
|
||||
|
||||
@@ -280,7 +287,6 @@ __errExit:
|
||||
*/
|
||||
FX_ENTRY FxBool FX_CALL sst1InitVoodooFile() {
|
||||
static FxBool retVal = FXFALSE;
|
||||
int inCfg, inDac;
|
||||
FILE *file = 0;
|
||||
char buffer[1024], filename[256];
|
||||
char *tmpPtr;
|
||||
@@ -314,7 +320,7 @@ FX_ENTRY FxBool FX_CALL sst1InitVoodooFile() {
|
||||
}
|
||||
strncpy(filename, tmpPtr, 255);
|
||||
if (filename[strlen(filename)-1] == '\\')
|
||||
snprintf(filename, 255, "%voodoo2", filename);
|
||||
snprintf(filename, 255, "%s/voodoo2", filename);
|
||||
else
|
||||
snprintf(filename, 255, "%s/voodoo2", filename);
|
||||
i++;
|
||||
@@ -346,88 +352,7 @@ __errExit:
|
||||
|
||||
#if defined(INIT_DOS) || defined(INIT_LINUX)
|
||||
|
||||
#if TEST
|
||||
/* void main(int argc, char **argv) */
|
||||
static void foo(int argc, char **argv)
|
||||
{
|
||||
char buffer[2048]; /* buffer for command line inputs */
|
||||
int inCfg, inDac;
|
||||
sst1InitEnvVarStruct *envVarsPtr;
|
||||
sst1InitDacStruct *dacPtr;
|
||||
sst1InitDacSetVideoStruct *setVideo;
|
||||
sst1InitDacSetMemClkStruct *setMemClk;
|
||||
FILE *file = fopen(argv[1], "r");
|
||||
|
||||
inCfg = inDac = 0;
|
||||
while(sst1InitFgets(buffer, file)) {
|
||||
buffer[strlen(buffer)-1] = (char) NULL;
|
||||
if(!strcmp(buffer, "[CFG]")) {
|
||||
inCfg = 1; inDac = 0;
|
||||
continue;
|
||||
} else if (!strcmp(buffer, "[DAC]")) {
|
||||
inCfg = 0; inDac = 1;
|
||||
continue;
|
||||
} else if(buffer[0] == '[') {
|
||||
inCfg = 0; inDac = 0;
|
||||
continue;
|
||||
}
|
||||
if(inCfg) {
|
||||
if(!sst1InitParseFieldCfg(buffer))
|
||||
/* Error processing .ini file */
|
||||
exit(1);
|
||||
} else if(inDac) {
|
||||
if(!sst1InitParseFieldDac(buffer))
|
||||
/* Error processing .ini file */
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump CFG Data... */
|
||||
envVarsPtr = envVarsBase;
|
||||
while(envVarsPtr) {
|
||||
printf("ENV VAR:%s VALUE:%s\n", envVarsPtr->envVariable,
|
||||
envVarsPtr->envValue);
|
||||
envVarsPtr = (sst1InitEnvVarStruct *) envVarsPtr->nextVar;
|
||||
}
|
||||
|
||||
/* Dump Dac Data... */
|
||||
dacPtr = dacStructBase;
|
||||
while(dacPtr) {
|
||||
printf("DAC MANU:%s DEVICE:%s\n", dacPtr->dacManufacturer,
|
||||
dacPtr->dacDevice);
|
||||
if(dacPtr->detect) {
|
||||
printf("\tDetect:\n");
|
||||
sst1InitPrintDacRdWr(dacPtr->detect, "\t\t");
|
||||
}
|
||||
if(dacPtr->setVideo) {
|
||||
setVideo = dacPtr->setVideo;
|
||||
while(1) {
|
||||
printf("\tsetVideo (%dx%d @ %d Hz)\n",
|
||||
setVideo->width, setVideo->height, setVideo->refresh);
|
||||
sst1InitPrintDacRdWr(setVideo->setVideoRdWr, "\t\t");
|
||||
if(!setVideo->nextSetVideo)
|
||||
break;
|
||||
else
|
||||
setVideo = setVideo->nextSetVideo;
|
||||
}
|
||||
}
|
||||
if(dacPtr->setMemClk) {
|
||||
setMemClk = dacPtr->setMemClk;
|
||||
while(1) {
|
||||
printf("\tsetMemClk (%d MHz)\n", setMemClk->frequency);
|
||||
sst1InitPrintDacRdWr(setMemClk->setMemClkRdWr, "\t\t");
|
||||
if(!setMemClk->nextSetMemClk)
|
||||
break;
|
||||
else
|
||||
setMemClk = setMemClk->nextSetMemClk;
|
||||
}
|
||||
}
|
||||
dacPtr = dacPtr->nextDac;
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __DOS32__
|
||||
static void sst1InitFixFilename(char *dst, char *src)
|
||||
{
|
||||
while(*src) {
|
||||
@@ -438,6 +363,7 @@ static void sst1InitFixFilename(char *dst, char *src)
|
||||
}
|
||||
*dst = (char) NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int sst1InitFgets(char *string, FILE *stream)
|
||||
@@ -542,6 +468,7 @@ static int sst1InitParseFieldCfg(char *string)
|
||||
return(1);
|
||||
}
|
||||
|
||||
#ifndef INIT_LINUX
|
||||
static int sst1InitParseFieldDac(char *string)
|
||||
{
|
||||
char *dacFieldReference, *dacFieldValue;
|
||||
@@ -742,33 +669,6 @@ static int sst1InitParseDacRdWr(char *string, sst1InitDacRdWrStruct *dacRdWrPtr)
|
||||
return(1);
|
||||
}
|
||||
|
||||
#if TEST
|
||||
static void sst1InitPrintDacRdWr(sst1InitDacRdWrStruct *dacRdWrBase,
|
||||
char *prefix)
|
||||
{
|
||||
sst1InitDacRdWrStruct *dacRdWrPtr = dacRdWrBase;
|
||||
|
||||
while(dacRdWrPtr) {
|
||||
if(dacRdWrPtr->type == DACRDWR_TYPE_WR) {
|
||||
printf("%sDacWR", prefix);
|
||||
printf("(0x%x,0x%x)\n", dacRdWrPtr->addr, dacRdWrPtr->data);
|
||||
} else if(dacRdWrPtr->type == DACRDWR_TYPE_RDMODWR) {
|
||||
printf("%sDacRD-MOD-WR", prefix);
|
||||
printf("(0x%x,0x%x,0x%x)\n", dacRdWrPtr->addr, dacRdWrPtr->mask,
|
||||
dacRdWrPtr->data);
|
||||
} else if(dacRdWrPtr->type == DACRDWR_TYPE_RDNOCHECK) {
|
||||
printf("%sDacRD-NOCHECK", prefix);
|
||||
printf("(0x%x)\n", dacRdWrPtr->addr);
|
||||
} else if(dacRdWrPtr->type == DACRDWR_TYPE_RDCHECK) {
|
||||
printf("%sDacRD-CHECK", prefix);
|
||||
printf("(0x%x,0x%x)\n", dacRdWrPtr->addr, dacRdWrPtr->data);
|
||||
} else
|
||||
printf("%sDAC???", prefix);
|
||||
dacRdWrPtr = dacRdWrPtr->nextRdWr;
|
||||
}
|
||||
}
|
||||
#endif /* TEST */
|
||||
|
||||
static int sst1InitParseSetVideoString(char *string, sst1InitDacStruct *dacBase)
|
||||
{
|
||||
int cntr = 0;
|
||||
@@ -969,6 +869,7 @@ static int sst1InitParseSetVideoModeString(char *string,
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void sst1InitToLower(char *string)
|
||||
{
|
||||
@@ -1118,4 +1019,6 @@ FX_ENTRY char* FX_CALL sst1InitGetenv(char *string)
|
||||
}
|
||||
#endif /* INIT_DOS */
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
**
|
||||
** Print functions for SST-1 Initialization routines
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -81,4 +83,6 @@ FX_ENTRY void FX_CALL sst1InitVPrintf(const char *format, va_list args)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** Initialization code for initializing scanline interleaving
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -239,11 +241,11 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitSli(FxU32 *sstbase0, FxU32 *sstbase1)
|
||||
slavePVOutClkDel = 0;
|
||||
|
||||
if(GETENV(("SSTV2_SLIS_VOUT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIS_VOUT_CLKDEL")), "%i", &slaveVOutClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIS_VOUT_CLKDEL")), "%ld", &slaveVOutClkDel);
|
||||
if(GETENV(("SSTV2_SLIS_PVOUT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIS_PVOUT_CLKDEL")), "%i", &slavePVOutClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIS_PVOUT_CLKDEL")), "%ld", &slavePVOutClkDel);
|
||||
if(GETENV(("SSTV2_SLIS_VIN_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIS_VIN_CLKDEL")), "%i", &slaveVInClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIS_VIN_CLKDEL")), "%ld", &slaveVInClkDel);
|
||||
INIT_PRINTF(("sst1InitSli(): slaveVinClkdel=0x%x, slaveVOutClkDel=0x%x, slavePVOutClkDel=0x%x\n",
|
||||
slaveVInClkDel, slaveVOutClkDel, slavePVOutClkDel));
|
||||
if(sst1CurrentBoard->fbiVideo16BPP)
|
||||
@@ -388,11 +390,11 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitSli(FxU32 *sstbase0, FxU32 *sstbase1)
|
||||
masterVOutClkDel = 2;
|
||||
masterPVOutClkDel = 0;
|
||||
if(GETENV(("SSTV2_SLIM_VOUT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIM_VOUT_CLKDEL")), "%i", &masterVOutClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIM_VOUT_CLKDEL")), "%ld", &masterVOutClkDel);
|
||||
if(GETENV(("SSTV2_SLIM_PVOUT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIM_PVOUT_CLKDEL")), "%i", &masterPVOutClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIM_PVOUT_CLKDEL")), "%ld", &masterPVOutClkDel);
|
||||
if(GETENV(("SSTV2_SLIM_VIN_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_SLIM_VIN_CLKDEL")), "%i", &masterVInClkDel);
|
||||
SSCANF(GETENV(("SSTV2_SLIM_VIN_CLKDEL")), "%ld", &masterVInClkDel);
|
||||
INIT_PRINTF(("sst1InitSli(): masterVinClkdel=0x%x, masterVOutClkDel=0x%x, masterPVOutClkDel=0x%x\n",
|
||||
masterVInClkDel, masterVOutClkDel, masterPVOutClkDel));
|
||||
if(sst1CurrentBoard->fbiVideo16BPP)
|
||||
@@ -734,4 +736,6 @@ sst1InitSliPaired(FxU32 *sstbase)
|
||||
return sliPaired;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -141,7 +141,9 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -203,7 +205,7 @@ FX_EXPORT FxU32 * FX_CSTYLE sst1InitMapBoardDirect(FxU32 BoardNumber,
|
||||
FxU32 sstv2_noremap = 0;
|
||||
|
||||
if( GETENV( ("SSTV2_DEVICEID") ) )
|
||||
SSCANF(GETENV(("SSTV2_DEVICEID")), "%i", &deviceID);
|
||||
SSCANF(GETENV(("SSTV2_DEVICEID")), "%ld", &deviceID);
|
||||
else
|
||||
deviceID = 0x0002;
|
||||
|
||||
@@ -232,7 +234,7 @@ FX_EXPORT FxU32 * FX_CSTYLE sst1InitMapBoardDirect(FxU32 BoardNumber,
|
||||
sst1InitUseVoodooFile = sst1InitVoodooFile();
|
||||
|
||||
if( GETENV( ("SSTV2_NOREMAP") ) ) {
|
||||
SSCANF(GETENV(("SSTV2_NOREMAP")), "%i", &sstv2_noremap);
|
||||
SSCANF(GETENV(("SSTV2_NOREMAP")), "%ld", &sstv2_noremap);
|
||||
} else {
|
||||
sstv2_noremap = 0;
|
||||
}
|
||||
@@ -463,7 +465,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
|
||||
// Adjust Trex-to-Fbi FIFO
|
||||
if(GETENV(("SSTV2_TF_FIFO_THRESH")))
|
||||
SSCANF(GETENV(("SSTV2_TF_FIFO_THRESH")), "%i", &tf_fifo_thresh);
|
||||
SSCANF(GETENV(("SSTV2_TF_FIFO_THRESH")), "%ld", &tf_fifo_thresh);
|
||||
else
|
||||
tf_fifo_thresh = 0x8;
|
||||
INIT_PRINTF(("sst1InitRegisters(): Setting TREX-to-FBI FIFO THRESHOLD to 0x%x...\n",
|
||||
@@ -472,7 +474,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
// Set ft_clkdel for 16 MHz bringup
|
||||
ft_clkdel = 0x8; // Okay for 16 MHz startup...
|
||||
if(GETENV(("SSTV2_PFT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_PFT_CLKDEL")), "%i", &ft_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_PFT_CLKDEL")), "%ld", &ft_clkdel);
|
||||
INIT_PRINTF(("sst1InitRegisters(): Setting PRELIM FT-CLK delay to 0x%x...\n", ft_clkdel));
|
||||
|
||||
// SST_FBIINIT3_DEFAULT is set to disable texture mapping, so if
|
||||
@@ -537,7 +539,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
// set TREX0 init values
|
||||
if(GETENV(("SSTV2_TREX0INIT0"))) {
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX0INIT0 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX0INIT0")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX0INIT0")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit0[0]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit0[0] = SST_TREX0INIT0_DEFAULT;
|
||||
@@ -547,12 +549,12 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
if(GETENV(("SSTV2_TREX0INIT1"))) {
|
||||
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX0INIT1 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX0INIT1")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX0INIT1")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit1[0]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit1[0] = SST_TREX0INIT1_DEFAULT;
|
||||
if(GETENV(("SSTV2_PTF0_CLKDEL"))) {
|
||||
SSCANF(GETENV(("SSTV2_PTF0_CLKDEL")), "%i", &tf0_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_PTF0_CLKDEL")), "%ld", &tf0_clkdel);
|
||||
sst1CurrentBoard->tmuInit1[0] = (sst1CurrentBoard->tmuInit1[0] &
|
||||
~SST_TEX_TF_CLK_DEL_ADJ) |
|
||||
(tf0_clkdel<<SST_TEX_TF_CLK_DEL_ADJ_SHIFT);
|
||||
@@ -563,7 +565,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
// set TREX1 init values
|
||||
if(GETENV(("SSTV2_TREX1INIT0"))) {
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX1INIT0 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX1INIT0")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX1INIT0")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit0[1]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit0[1] = SST_TREX1INIT0_DEFAULT;
|
||||
@@ -571,12 +573,12 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
sst1CurrentBoard->tmuInit0[1]));
|
||||
if(GETENV(("SSTV2_TREX1INIT1"))) {
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX1INIT1 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX1INIT1")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX1INIT1")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit1[1]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit1[1] = SST_TREX1INIT1_DEFAULT;
|
||||
if(GETENV(("SSTV2_PTF1_CLKDEL"))) {
|
||||
SSCANF(GETENV(("SSTV2_PTF1_CLKDEL")), "%i", &tf1_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_PTF1_CLKDEL")), "%ld", &tf1_clkdel);
|
||||
sst1CurrentBoard->tmuInit1[1] = (sst1CurrentBoard->tmuInit1[1] &
|
||||
~SST_TEX_TF_CLK_DEL_ADJ) |
|
||||
(tf1_clkdel<<SST_TEX_TF_CLK_DEL_ADJ_SHIFT);
|
||||
@@ -588,7 +590,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
// set TREX2 init values
|
||||
if(GETENV(("SSTV2_TREX2INIT0"))) {
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX2INIT0 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX2INIT0")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX2INIT0")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit0[2]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit0[2] = SST_TREX2INIT0_DEFAULT;
|
||||
@@ -596,12 +598,12 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitRegisters(FxU32 *sstbase)
|
||||
sst1CurrentBoard->tmuInit0[2]));
|
||||
if(GETENV(("SSTV2_TREX2INIT1"))) {
|
||||
INIT_PRINTF(("sst1InitRegisters(): Using SST_TREX2INIT1 environment variable\n"));
|
||||
SSCANF(GETENV(("SSTV2_TREX2INIT1")), "%i",
|
||||
SSCANF(GETENV(("SSTV2_TREX2INIT1")), "%ld",
|
||||
&sst1CurrentBoard->tmuInit1[2]);
|
||||
} else
|
||||
sst1CurrentBoard->tmuInit1[2] = SST_TREX2INIT1_DEFAULT;
|
||||
if(GETENV(("SSTV2_PTF2_CLKDEL"))) {
|
||||
SSCANF(GETENV(("SSTV2_PTF2_CLKDEL")), "%i", &tf2_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_PTF2_CLKDEL")), "%ld", &tf2_clkdel);
|
||||
sst1CurrentBoard->tmuInit1[2] = (sst1CurrentBoard->tmuInit1[2] &
|
||||
~SST_TEX_TF_CLK_DEL_ADJ) |
|
||||
(tf2_clkdel<<SST_TEX_TF_CLK_DEL_ADJ_SHIFT);
|
||||
@@ -1325,4 +1327,6 @@ sst1InitCachingAMD(FxU32* sstBase, FxBool enableP, FxBool hasP2MTRR)
|
||||
return retVal;
|
||||
} // sst1InitSetCachingAMD
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,9 @@
|
||||
|
||||
#else /* DIRECTX */
|
||||
#include "ddglobal.h"
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */
|
||||
#endif
|
||||
#undef INIT_PRINTF
|
||||
#undef INIT_INFO
|
||||
#undef GETENV
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** Utility routines for SST-1 Initialization code
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -490,7 +492,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitResetTmus(FxU32 *sstbase)
|
||||
*/
|
||||
FX_EXPORT FxBool FX_CSTYLE sst1InitResetFbi(FxU32 *sstbase)
|
||||
{
|
||||
volatile delay;
|
||||
volatile int delay;
|
||||
// int i;
|
||||
FxU32 fbiInit0;
|
||||
SstRegs *sst = (SstRegs *) sstbase;
|
||||
@@ -977,7 +979,7 @@ FX_EXPORT FxU32 FX_CSTYLE sst1InitMeasureSiProcess(FxU32 *sstbase, FxU32 which)
|
||||
return(FXFALSE);
|
||||
|
||||
if(GETENV(("SSTV2_SIPROCESS_CNTR"))) {
|
||||
SSCANF(GETENV(("SSTV2_SIPROCESS_CNTR")), "%i", &pciCntrLoad);
|
||||
SSCANF(GETENV(("SSTV2_SIPROCESS_CNTR")), "%ld", &pciCntrLoad);
|
||||
INIT_PRINTF(("sst1InitMeasureSiProcess(): Using PCI Counter preload value of 0x%x...\n", pciCntrLoad));
|
||||
}
|
||||
|
||||
@@ -1178,4 +1180,6 @@ void sst1InitDrawRectUsingTris(FxU32 *sstbase, FxU32 x, FxU32 y, FxU32 tSize)
|
||||
ISET(sst->triangleCMD, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
** Initialization code for initializing SST-1 video unit
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",off)
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -220,21 +222,21 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
|
||||
// Setup SST video timing registers
|
||||
if(GETENV(("SSTV2_HSYNC"))) {
|
||||
SSCANF(GETENV(("SSTV2_HSYNC")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_HSYNC")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using SST_HSYNC=0x%x\n", vtmp));
|
||||
ISET(sst->hSync, vtmp);
|
||||
} else
|
||||
ISET(sst->hSync, ((sstVideoRez->hSyncOff << SST_VIDEO_HSYNC_OFF_SHIFT) |
|
||||
(sstVideoRez->hSyncOn << SST_VIDEO_HSYNC_ON_SHIFT)));
|
||||
if(GETENV(("SSTV2_VSYNC"))) {
|
||||
SSCANF(GETENV(("SSTV2_VSYNC")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_VSYNC")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using SST_VSYNC=0x%x\n", vtmp));
|
||||
ISET(sst->vSync, vtmp);
|
||||
} else
|
||||
ISET(sst->vSync, ((sstVideoRez->vSyncOff << SST_VIDEO_VSYNC_OFF_SHIFT) |
|
||||
(sstVideoRez->vSyncOn << SST_VIDEO_VSYNC_ON_SHIFT)));
|
||||
if(GETENV(("SSTV2_BACKPORCH"))) {
|
||||
SSCANF(GETENV(("SSTV2_BACKPORCH")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_BACKPORCH")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using SST_BACKPORCH=0x%x\n", vtmp));
|
||||
ISET(sst->backPorch, vtmp);
|
||||
} else
|
||||
@@ -242,7 +244,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
((sstVideoRez->vBackPorch << SST_VIDEO_VBACKPORCH_SHIFT) |
|
||||
(sstVideoRez->hBackPorch << SST_VIDEO_HBACKPORCH_SHIFT)));
|
||||
if(GETENV(("SSTV2_DIMENSIONS"))) {
|
||||
SSCANF(GETENV(("SSTV2_DIMENSIONS")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_DIMENSIONS")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using SST_DIMENSIONS=0x%x\n", vtmp));
|
||||
sstVideoRez->yDimension = (vtmp >> SST_VIDEO_YDIM_SHIFT) & 0x3ff;
|
||||
sstVideoRez->xDimension = vtmp & 0x3ff;
|
||||
@@ -251,12 +253,12 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
((sstVideoRez->yDimension << SST_VIDEO_YDIM_SHIFT) |
|
||||
((sstVideoRez->xDimension-1) << SST_VIDEO_XDIM_SHIFT)));
|
||||
if(GETENV(("SSTV2_MEMOFFSET"))) {
|
||||
SSCANF(GETENV(("SSTV2_MEMOFFSET")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_MEMOFFSET")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using video memOffset=0x%x\n", vtmp));
|
||||
sstVideoRez->memOffset = vtmp;
|
||||
}
|
||||
if(GETENV(("SSTV2_TILESINX"))) {
|
||||
SSCANF(GETENV(("SSTV2_TILESINX")), "%i", &vtmp);
|
||||
SSCANF(GETENV(("SSTV2_TILESINX")), "%ld", &vtmp);
|
||||
INIT_PRINTF(("sst1InitVideo(): Using video tilesInX=0x%x\n", vtmp));
|
||||
sstVideoRez->tilesInX = vtmp;
|
||||
}
|
||||
@@ -318,13 +320,13 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
|
||||
memFifoLwm = 23;
|
||||
if(GETENV(("SSTV2_MEMFIFO_LWM")))
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_LWM")), "%i", &memFifoLwm);
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_LWM")), "%ld", &memFifoLwm);
|
||||
memFifoHwm = 54;
|
||||
if(GETENV(("SSTV2_MEMFIFO_HWM")))
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_HWM")), "%i", &memFifoHwm);
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_HWM")), "%ld", &memFifoHwm);
|
||||
pciFifoLwm = 13;
|
||||
if(GETENV(("SSTV2_PCIFIFO_LWM")))
|
||||
SSCANF(GETENV(("SSTV2_PCIFIFO_LWM")), "%i", &pciFifoLwm);
|
||||
SSCANF(GETENV(("SSTV2_PCIFIFO_LWM")), "%ld", &pciFifoLwm);
|
||||
INIT_PRINTF(("sst1InitVideo(): pciFifoLwm:%d memFifoLwm:%d memFifoHwm:%d\n",
|
||||
pciFifoLwm, memFifoLwm, memFifoHwm));
|
||||
|
||||
@@ -382,7 +384,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
return(FXFALSE);
|
||||
}
|
||||
if(GETENV(("SSTV2_MEMFIFO_ENTRIES")))
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_ENTRIES")), "%i", &memFifoEntries);
|
||||
SSCANF(GETENV(("SSTV2_MEMFIFO_ENTRIES")), "%d", &memFifoEntries);
|
||||
INIT_PRINTF(("sst1InitVideo(): Enabling Memory FIFO (Entries=%d)...\n",
|
||||
65536 - (memFifoEntries << 5)));
|
||||
|
||||
@@ -400,11 +402,11 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
|
||||
vInClkDel = 1;
|
||||
if(GETENV(("SSTV2_VIN_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_VIN_CLKDEL")), "%i", &vInClkDel);
|
||||
SSCANF(GETENV(("SSTV2_VIN_CLKDEL")), "%ld", &vInClkDel);
|
||||
|
||||
vOutClkDel = 0;
|
||||
if(GETENV(("SSTV2_VOUT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_VOUT_CLKDEL")), "%i", &vOutClkDel);
|
||||
SSCANF(GETENV(("SSTV2_VOUT_CLKDEL")), "%ld", &vOutClkDel);
|
||||
|
||||
INIT_PRINTF(("sst1InitVideo(): vInClkDel=0x%x vOutClkDel=0x%x\n",
|
||||
|
||||
@@ -469,7 +471,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
if(!GETENV(("SSTV2_VIDEO_FILTER_DISABLE"))) {
|
||||
ISET(sst->fbiInit1, IGET(sst->fbiInit1) | SST_VIDEO_FILTER_EN);
|
||||
if(GETENV(("SSTV2_VIDEO_FILTER_THRESHOLD"))) {
|
||||
SSCANF(GETENV(("SSTV2_VIDEO_FILTER_THRESHOLD")), "%i", &n);
|
||||
SSCANF(GETENV(("SSTV2_VIDEO_FILTER_THRESHOLD")), "%ld", &n);
|
||||
INIT_PRINTF(("sst1InitVideo(): Setting Video Filtering Treshold to 0x%x...\n", n));
|
||||
|
||||
ISET(sst->videoFilterRgbThreshold, n);
|
||||
@@ -603,7 +605,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitVideoBuffers(FxU32 *sstbase,
|
||||
FxU32 pagesToFill;
|
||||
|
||||
if(GETENV(("SSTV2_VIDEO_CLEARCOLOR")))
|
||||
SSCANF(GETENV(("SSTV2_VIDEO_CLEARCOLOR")), "%i", &clearColor);
|
||||
SSCANF(GETENV(("SSTV2_VIDEO_CLEARCOLOR")), "%ld", &clearColor);
|
||||
|
||||
if(sst1CurrentBoard->fbiMemSize == 1)
|
||||
pagesToFill = 256;
|
||||
@@ -726,8 +728,6 @@ FX_EXPORT FxBool FX_CSTYLE
|
||||
sst1InitAllocBuffers(FxU32 *sstbase, FxU32 nColorBuffs, FxU32 nAuxBuffs)
|
||||
{
|
||||
SstRegs *sst = (SstRegs *) sstbase;
|
||||
FxU32 nCol = nColorBuffs;
|
||||
FxU32 nAux = nAuxBuffs;
|
||||
FxBool retVal;
|
||||
|
||||
if(!sst)
|
||||
@@ -1262,7 +1262,7 @@ FX_EXPORT FxBool FX_CSTYLE sst1InitMonitorDetect(FxU32 *sstbase)
|
||||
// }
|
||||
|
||||
if(GETENV(("SSTV2_MDETECT_CONST"))) {
|
||||
SSCANF(GETENV(("SSTV2_MDETECT_CONST")), "%i", &gammaCorrectConstant);
|
||||
SSCANF(GETENV(("SSTV2_MDETECT_CONST")), "%ld", &gammaCorrectConstant);
|
||||
INIT_PRINTF(("sst1InitMonitorDetect(): Using value 0x%x for constant gamma value...\n", gammaCorrectConstant));
|
||||
}
|
||||
|
||||
@@ -1426,13 +1426,13 @@ setDelays:
|
||||
|
||||
// Override with environment variables
|
||||
if(GETENV(("SSTV2_FT_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_FT_CLKDEL")), "%i", &ft_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_FT_CLKDEL")), "%ld", &ft_clkdel);
|
||||
if(GETENV(("SSTV2_TF0_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_TF0_CLKDEL")), "%i", &tf0_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_TF0_CLKDEL")), "%ld", &tf0_clkdel);
|
||||
if(GETENV(("SSTV2_TF1_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_TF1_CLKDEL")), "%i", &tf1_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_TF1_CLKDEL")), "%ld", &tf1_clkdel);
|
||||
if(GETENV(("SSTV2_TF2_CLKDEL")))
|
||||
SSCANF(GETENV(("SSTV2_TF2_CLKDEL")), "%i", &tf2_clkdel);
|
||||
SSCANF(GETENV(("SSTV2_TF2_CLKDEL")), "%ld", &tf2_clkdel);
|
||||
|
||||
INIT_PRINTF(("sst1InitSetClkDelays(): Setting FBI-to-TREX clock delay to 0x%x...\n", ft_clkdel));
|
||||
INIT_PRINTF(("sst1InitSetClkDelays(): Setting TREX#0 TREX-to-FBI clock delay to 0x%x\n",
|
||||
@@ -1462,4 +1462,6 @@ setDelays:
|
||||
return(FXTRUE);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma optimize ("",on)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user