sst1/sst96: some whitespace/style cleanup.
also removed commented out code from glide3x _grChromaRangeExt(), guGammaCorrectionRGB() and grLoadGammaTable(). the djgpp dxe output is still exactly the same.
This commit is contained in:
@@ -223,7 +223,7 @@
|
||||
#include <glidesys.h>
|
||||
#include <sst1vid.h>
|
||||
|
||||
#if ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_SST96)
|
||||
#include <init.h>
|
||||
#endif
|
||||
|
||||
@@ -255,8 +255,8 @@ _grInt10Handler() {
|
||||
|
||||
#ifdef H3D
|
||||
#include <windows.h>
|
||||
#define F_PATTERN 0 // flippy pattern (sst96)
|
||||
#define T_PATTERN 1 // tippy pattern (sst1)
|
||||
#define F_PATTERN 0 /* flippy pattern (sst96) */
|
||||
#define T_PATTERN 1 /* tippy pattern (sst1) */
|
||||
|
||||
typedef struct patColor_t { unsigned char r,g,b; } patColor;
|
||||
|
||||
@@ -400,7 +400,6 @@ void setAutoflip(int enable) {
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
|
||||
|
||||
grBufferSwap(1);
|
||||
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
grSstOrigin(GR_ORIGIN_UPPER_LEFT);
|
||||
@@ -772,7 +771,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
|
||||
_grReCacheFifo( 0 );
|
||||
# elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
|
||||
gc->hwDep.sst96Dep.writesSinceFence = 0;
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) && defined(GLIDE_DEBUG)
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && defined(GLIDE_DEBUG)
|
||||
/* Set int 10h interrupt handler */
|
||||
gc->hwDep.sst96Dep.int10Called = FXFALSE;
|
||||
gc->hwDep.sst96Dep.prevInt10 = NULL;
|
||||
@@ -1159,7 +1158,6 @@ GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
|
||||
#endif
|
||||
return ctrlflag;
|
||||
#endif
|
||||
|
||||
}
|
||||
GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME));
|
||||
return FXTRUE;
|
||||
@@ -1343,11 +1341,6 @@ GR_ENTRY(grSstIdle, void, (void))
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstOrigin - Set the orgin orientation of the screen.
|
||||
**
|
||||
** Returns:
|
||||
**
|
||||
** Notes:
|
||||
**
|
||||
*/
|
||||
|
||||
GR_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin ))
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include "init.h"
|
||||
@@ -224,7 +223,6 @@ initEnumHardware( InitHWEnumCallback *cb )
|
||||
vgDriverInit( &contexts[INIT_VOODOO] );
|
||||
vg96DriverInit( &contexts[INIT_VG96] );
|
||||
|
||||
|
||||
/* Mark the library as initialized */
|
||||
libInitialized = FXTRUE;
|
||||
}
|
||||
@@ -348,15 +346,13 @@ initGetDeviceInfo( FxU32 devNumber, InitDeviceInfo *info )
|
||||
FxBool
|
||||
initDeviceSelect( FxU32 devNumber )
|
||||
{
|
||||
FxBool rv = FXFALSE;
|
||||
|
||||
if ( devNumber < numDevicesInSystem ) {
|
||||
context = &contexts[hwInfo[devNumber].hwClass];
|
||||
context->info = hwInfo[devNumber];
|
||||
rv = FXTRUE;
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
return FXFALSE;
|
||||
|
||||
}/* initDeviceSelect */
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
@@ -88,16 +87,13 @@ static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
|
||||
|
||||
static void renderBuffer( InitBuffer_t buffer ) {
|
||||
init96RenderBuffer( buffer, context->writeMethod );
|
||||
return;
|
||||
}
|
||||
|
||||
static void origin( InitOriginLocation_t origin ) {
|
||||
init96Origin( origin, context->writeMethod );
|
||||
return;
|
||||
}
|
||||
|
||||
static void ioCtl( FxU32 token, void *argument ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static FxBool control( FxU32 code ) {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
@@ -26,6 +25,8 @@
|
||||
#include <sst1init.h>
|
||||
#include <sst.h>
|
||||
|
||||
#include <stddef.h> /* NULL */
|
||||
|
||||
static FxBool setVideo( FxU32 hWnd,
|
||||
GrScreenResolution_t sRes,
|
||||
GrScreenRefresh_t vRefresh,
|
||||
@@ -37,10 +38,11 @@ static FxBool setVideo( FxU32 hWnd,
|
||||
int *yres,
|
||||
int *fbStride,
|
||||
sst1VideoTimingStruct *vidTimings) {
|
||||
FxBool rv;
|
||||
|
||||
static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512};
|
||||
static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256};
|
||||
|
||||
FxBool rv;
|
||||
rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr,
|
||||
sRes,
|
||||
vRefresh,
|
||||
@@ -115,19 +117,16 @@ static void idle( void ) {
|
||||
}
|
||||
|
||||
static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void renderBuffer( InitBuffer_t buffer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static void origin( InitOriginLocation_t origin ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static void ioCtl( FxU32 token, void *argument ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static FxBool control( FxU32 code ) {
|
||||
|
||||
@@ -411,12 +411,6 @@ GR_DIENTRY(_grChromaRangeExt, void , (GrColor_t color, GrColor_t range, GrChroma
|
||||
#define FN_NAME "_grChromaRangeExt"
|
||||
GR_BEGIN_NOFIFOCHECK("_grChromaRangeExt",85);
|
||||
|
||||
#if 0
|
||||
GR_CHECK_F(myName,
|
||||
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
|
||||
"grChromaRange not supported.");
|
||||
#endif
|
||||
|
||||
INVALIDATE(chromaKey);
|
||||
|
||||
STOREARG(grChromakeyValue, color);
|
||||
|
||||
@@ -247,11 +247,11 @@
|
||||
#include <glidesys.h>
|
||||
#include <sst1vid.h>
|
||||
|
||||
#if ( GLIDE_PLATFORM & GLIDE_SST_SIM)
|
||||
#if (GLIDE_PLATFORM & GLIDE_SST_SIM)
|
||||
#include <gsim.h>
|
||||
#endif
|
||||
|
||||
#if ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_SST96)
|
||||
#include <init.h>
|
||||
#endif
|
||||
|
||||
@@ -283,8 +283,8 @@ _grInt10Handler() {
|
||||
|
||||
#ifdef H3D
|
||||
#include <windows.h>
|
||||
#define F_PATTERN 0 // flippy pattern (sst96)
|
||||
#define T_PATTERN 1 // tippy pattern (sst1)
|
||||
#define F_PATTERN 0 /* flippy pattern (sst96) */
|
||||
#define T_PATTERN 1 /* tippy pattern (sst1) */
|
||||
|
||||
typedef struct patColor_t { unsigned char r,g,b; } patColor;
|
||||
|
||||
@@ -428,7 +428,6 @@ void setAutoflip(int enable) {
|
||||
grRenderBuffer(GR_BUFFER_BACKBUFFER);
|
||||
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
|
||||
|
||||
grBufferSwap(1);
|
||||
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
grSstOrigin(GR_ORIGIN_UPPER_LEFT);
|
||||
@@ -633,7 +632,8 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
|
||||
oemi.linearAddress = gc->base_ptr;
|
||||
oemi.slaveAddress = NULL;
|
||||
if ((gc->oemInit = LoadLibrary("fxoem2x.dll")) != NULL) {
|
||||
if ((oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) != NULL) {
|
||||
oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
|
||||
if (oemInitMapBoard) {
|
||||
oemInitMapBoard(&oemi);
|
||||
}
|
||||
}
|
||||
@@ -678,7 +678,6 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
|
||||
if (resolution == GR_RESOLUTION_NONE) {
|
||||
goto BAILOUT;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef H3D
|
||||
@@ -807,7 +806,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
|
||||
_grReCacheFifo( 0 );
|
||||
# elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
|
||||
gc->hwDep.sst96Dep.writesSinceFence = 0;
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) && GLIDE_DEBUG10
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && GLIDE_DEBUG10
|
||||
/* Set int 10h interrupt handler */
|
||||
gc->hwDep.sst96Dep.int10Called = FXFALSE;
|
||||
gc->hwDep.sst96Dep.prevInt10 = NULL;
|
||||
@@ -1256,7 +1255,6 @@ _grSstControl(GrControl_t code)
|
||||
#endif
|
||||
return ctrlflag;
|
||||
#endif
|
||||
|
||||
}
|
||||
GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME));
|
||||
return FXTRUE;
|
||||
@@ -1418,7 +1416,6 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
|
||||
/*
|
||||
** FIXME!!!
|
||||
*/
|
||||
#if 1
|
||||
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80);
|
||||
GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",r, g, b));
|
||||
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO)
|
||||
@@ -1426,28 +1423,6 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
|
||||
else
|
||||
initGamma(r);
|
||||
GR_END();
|
||||
#else
|
||||
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionValue",80);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%g %g %g)\n",r, g, b);
|
||||
|
||||
GR_CHECK_F(myName,
|
||||
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2)
|
||||
|| (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
|
||||
"grGammaCorrectionRGB not supported.");
|
||||
|
||||
#if GLIDE_INIT_HAL
|
||||
fxHalInitGamma(hw, gamma);
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
/* dpc - 5 sep 1997 - FixMe!
|
||||
* The old way
|
||||
*
|
||||
* initGamma(gam);
|
||||
*/
|
||||
sst1InitGammaRGB(gc->reg_ptr, r, g, b);
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
GR_END();
|
||||
#endif
|
||||
} /* guGammaCorrectionRGB */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
@@ -1466,24 +1441,11 @@ GR_DIENTRY(grLoadGammaTable, void, (FxU32 nentries, FxU32 *red, FxU32 *green, Fx
|
||||
/*
|
||||
** FIXME!!
|
||||
*/
|
||||
#if 1
|
||||
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80);
|
||||
GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",red, green, blue));
|
||||
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO)
|
||||
initGammaTable(nentries, red, green, blue);
|
||||
GR_END();
|
||||
#else
|
||||
FxU32 max;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grLoadGammaTable",80);
|
||||
|
||||
grGet(GR_GAMMA_TABLE_ENTRIES, 4, &max);
|
||||
if (nentries > max)
|
||||
nentries = max;
|
||||
sst1InitGammaTable(gc->reg_ptr, nentries, red, green, blue);
|
||||
|
||||
GR_END();
|
||||
#endif
|
||||
#undef FN_NAME
|
||||
}
|
||||
|
||||
@@ -1536,11 +1498,6 @@ GR_ENTRY(grFlush, void, (void))
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstOrigin - Set the orgin orientation of the screen.
|
||||
**
|
||||
** Returns:
|
||||
**
|
||||
** Notes:
|
||||
**
|
||||
*/
|
||||
|
||||
GR_STATE_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin ))
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include "init.h"
|
||||
@@ -228,7 +227,6 @@ initEnumHardware( InitHWEnumCallback *cb )
|
||||
vgDriverInit( &contexts[INIT_VOODOO] );
|
||||
vg96DriverInit( &contexts[INIT_VG96] );
|
||||
|
||||
|
||||
/* Mark the library as initialized */
|
||||
libInitialized = FXTRUE;
|
||||
}
|
||||
@@ -352,15 +350,13 @@ initGetDeviceInfo( FxU32 devNumber, InitDeviceInfo *info )
|
||||
FxBool
|
||||
initDeviceSelect( FxU32 devNumber )
|
||||
{
|
||||
FxBool rv = FXFALSE;
|
||||
|
||||
if ( devNumber < numDevicesInSystem ) {
|
||||
context = &contexts[hwInfo[devNumber].hwClass];
|
||||
context->info = hwInfo[devNumber];
|
||||
rv = FXTRUE;
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
return rv;
|
||||
return FXFALSE;
|
||||
|
||||
}/* initDeviceSelect */
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
@@ -88,16 +87,13 @@ static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
|
||||
|
||||
static void renderBuffer( InitBuffer_t buffer ) {
|
||||
init96RenderBuffer( buffer, context->writeMethod );
|
||||
return;
|
||||
}
|
||||
|
||||
static void origin( InitOriginLocation_t origin ) {
|
||||
init96Origin( origin, context->writeMethod );
|
||||
return;
|
||||
}
|
||||
|
||||
static void ioCtl( FxU32 token, void *argument ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static FxBool control( FxU32 code ) {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
@@ -26,6 +25,8 @@
|
||||
#include <sst1init.h>
|
||||
#include <sst.h>
|
||||
|
||||
#include <stddef.h> /* NULL */
|
||||
|
||||
static FxBool setVideo( FxU32 hWnd,
|
||||
GrScreenResolution_t sRes,
|
||||
GrScreenRefresh_t vRefresh,
|
||||
@@ -37,10 +38,11 @@ static FxBool setVideo( FxU32 hWnd,
|
||||
int *yres,
|
||||
int *fbStride,
|
||||
sst1VideoTimingStruct *vidTimings) {
|
||||
FxBool rv;
|
||||
|
||||
static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512};
|
||||
static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256};
|
||||
|
||||
FxBool rv;
|
||||
rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr,
|
||||
sRes,
|
||||
vRefresh,
|
||||
@@ -115,19 +117,16 @@ static void idle( void ) {
|
||||
}
|
||||
|
||||
static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void renderBuffer( InitBuffer_t buffer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static void origin( InitOriginLocation_t origin ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static void ioCtl( FxU32 token, void *argument ) {
|
||||
return;
|
||||
}
|
||||
|
||||
static FxBool control( FxU32 code ) {
|
||||
|
||||
Reference in New Issue
Block a user