h3,h5, gdraw.c: minor typo/whitespace fixes and some syncing.
This commit is contained in:
@@ -290,28 +290,27 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grDrawTriangle",92);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(0x%x,0x%x,0x%x)\n",a,b,c);
|
||||
|
||||
TRISETUP(a, b, c );
|
||||
|
||||
#if GLIDE_DEBUG
|
||||
/* HackAlert: Nuke the fifo ptr checking stuff here if we're just
|
||||
* debugging teh asm tri code.
|
||||
* debugging the asm tri code.
|
||||
*/
|
||||
gc->checkPtr = (FxU32)gc->cmdTransportInfo.fifoPtr;
|
||||
gc->checkCounter = 0;
|
||||
#endif /* GLIDE_DEBUG */
|
||||
GR_END();
|
||||
}
|
||||
|
||||
#elif defined(__MSC__)
|
||||
{
|
||||
_asm {
|
||||
mov eax, DWORD PTR fs:[WNT_TEB_PTR] ;
|
||||
__asm {
|
||||
mov eax, DWORD PTR fs:[WNT_TEB_PTR];
|
||||
add eax, DWORD PTR _GlideRoot.tlsOffset;
|
||||
mov edx, [eax];
|
||||
test edx, edx;
|
||||
je lostContext;
|
||||
mov eax, [edx + kLostContextOffset];
|
||||
test eax, eax
|
||||
test eax, eax;
|
||||
je lostContext;
|
||||
mov eax, [eax];
|
||||
test eax, 1;
|
||||
@@ -321,12 +320,14 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
}
|
||||
lostContext: ; /* <-- my, that's odd, but MSVC was insistent */
|
||||
}
|
||||
|
||||
#elif defined( __linux__ ) || defined(__FreeBSD__) || (GLIDE_PLATFORM & GLIDE_OS_DOS32)
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grDrawTriangle",92);
|
||||
TRISETUP(a, b, c);
|
||||
GR_END();
|
||||
}
|
||||
|
||||
#else
|
||||
#error "Write triangle proc dispatch for this compiler"
|
||||
#endif /* Triangle proc dispatch routine */
|
||||
@@ -506,7 +507,6 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
|
||||
/*
|
||||
* first cut of clip space coordinate code.
|
||||
*/
|
||||
|
||||
float oow;
|
||||
|
||||
while (count > 0) {
|
||||
@@ -1002,7 +1002,5 @@ _grDrawTriangles_Default(FxI32 mode, FxI32 count, void *pointers)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grDrawTriangles */
|
||||
|
||||
|
||||
@@ -275,17 +275,17 @@ GR_ENTRY(grDrawPoint, void, (const void *p))
|
||||
GR_ENTRY(grDrawLine, void, (const void *a, const void *b))
|
||||
{
|
||||
#define FN_NAME "grDrawLine"
|
||||
void *verts[2]; /**** FIXME: this needs to be const! ****/
|
||||
void *vertices[2]; /**** FIXME: this needs to be const! ****/
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
|
||||
GDBG_INFO_MORE(gc->myLevel, "(a = 0x%x, b = 0x%x)\n", a, b);
|
||||
|
||||
verts[0] = (void *)a; verts[1] = (void *)b; /** FIXME **/
|
||||
vertices[0] = (void *)a; vertices[1] = (void *)b; /* FIXME! */
|
||||
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode & GR_AA_ORDERED_LINES_MASK)
|
||||
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, verts);
|
||||
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, vertices);
|
||||
else
|
||||
_grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, verts);
|
||||
_grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, vertices);
|
||||
#undef FN_NAME
|
||||
} /* grDrawLine */
|
||||
|
||||
@@ -315,9 +315,7 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
GR_BEGIN_NOFIFOCHECK_NORET("grDrawTriangle",92);
|
||||
#endif /* GLIDE_DEBUG */
|
||||
GDBG_INFO_MORE(gc->myLevel,"(0x%x,0x%x,0x%x)\n",a,b,c);
|
||||
|
||||
TRISETUP(a, b, c );
|
||||
|
||||
#if GLIDE_DEBUG
|
||||
/* HackAlert: Nuke the fifo ptr checking stuff here if we're just
|
||||
* debugging the asm tri code.
|
||||
@@ -328,6 +326,7 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
GR_END();
|
||||
#endif /* GLIDE_DEBUG */
|
||||
}
|
||||
|
||||
#elif defined(__MSC__)
|
||||
{
|
||||
#if USE_STANDARD_TLS_FUNC
|
||||
@@ -365,6 +364,7 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
#endif
|
||||
lostContext: ; /* <-- my, that's odd, but MSVC was insistent */
|
||||
}
|
||||
|
||||
#elif (GLIDE_PLATFORM & GLIDE_OS_UNIX) || (GLIDE_PLATFORM & GLIDE_OS_DOS32)
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grDrawTriangle",92);
|
||||
@@ -379,6 +379,7 @@ GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
} /* grDrawTriangle */
|
||||
#endif
|
||||
|
||||
|
||||
#define DA_BEGIN \
|
||||
{ \
|
||||
FxU32* packetPtr = gc->cmdTransportInfo.fifoPtr; \
|
||||
@@ -445,7 +446,6 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
|
||||
*/
|
||||
#define kNumMantissaBits 12UL
|
||||
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "(count = %d, pointers = 0x%x)\n",
|
||||
@@ -522,7 +522,6 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
|
||||
|
||||
/* Upper right corner */
|
||||
y -= (0x01UL << (21UL - kNumMantissaBits));
|
||||
|
||||
DA_SET(x);
|
||||
dataElem = 0;
|
||||
DA_SET(y);
|
||||
@@ -657,7 +656,6 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
|
||||
/*
|
||||
* first cut of clip space coordinate code.
|
||||
*/
|
||||
|
||||
float oow;
|
||||
|
||||
while (count > 0) {
|
||||
@@ -725,7 +723,6 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
|
||||
DA_CONT(kSetupStrip | kSetupCullDisable, gc->cmdTransportInfo.paramMask,
|
||||
1, gc->state.vData.vSize, SSTCP_PKT3_DDDDDD);
|
||||
|
||||
|
||||
/*Upper left corner */
|
||||
fy -= 1.0f;
|
||||
DA_SETF(fx);
|
||||
|
||||
Reference in New Issue
Block a user