corrected grDrawTriangle on MSVC
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.4.7 2004/10/05 14:47:15 dborca
|
||||
** conditional compilation a bit more sane
|
||||
**
|
||||
** Revision 1.2.4.6 2004/10/04 09:26:30 dborca
|
||||
** DOS/OpenWatcom support
|
||||
**
|
||||
@@ -1635,10 +1638,35 @@ _trisetup_noclip_valid(TRISETUPARGS);
|
||||
#define TRISETUP_RGB(__cullMode) TRISETUP_NORGB(__cullMode)
|
||||
#define TRISETUP_ARGB(__cullMode) TRISETUP_NORGB(__cullMode)
|
||||
|
||||
#if defined( __MSC__ )
|
||||
#if defined( __MSC__ )
|
||||
|
||||
#if (_MSC_VER < 1200)
|
||||
// TRISETUP Macro for pre-msvc 6.0
|
||||
#define TRISETUP \
|
||||
__asm { mov edx, gc }; \
|
||||
(*gc->triSetupProc)
|
||||
#else // _MSC_VER
|
||||
// TRISETUP Macro for msvc 6 or later
|
||||
#if defined(GLIDE_DEBUG) || GLIDE_USE_C_TRISETUP
|
||||
// MSVC6 Debug does funny stuff, so push our parms inline
|
||||
#define TRISETUP(_a, _b, _c) \
|
||||
__asm { \
|
||||
__asm mov edx, gc \
|
||||
__asm mov eax, _c \
|
||||
__asm push eax \
|
||||
__asm mov ebx, _b \
|
||||
__asm push ebx \
|
||||
__asm mov ecx, _a \
|
||||
__asm push ecx \
|
||||
} \
|
||||
((FxI32 (*)(void))*gc->triSetupProc)()
|
||||
#else // GLIDE_DEBUG
|
||||
// MSVC6 Retail does funny stuff too, but Larry figured it out:
|
||||
#define TRISETUP(_a, _b, _c) \
|
||||
__asm { mov edx, gc }; \
|
||||
((FxI32 (*)(const void *va, const void *vb, const void *vc, GrGC *gc))*gc->triSetupProc)(_a, _b, _c, gc)
|
||||
#endif // GLIDE_DEBUG
|
||||
#endif // _MSC_VER
|
||||
|
||||
#elif defined( __linux__ ) || defined(__DJGPP__)
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.2.6.4 2004/10/05 14:47:15 dborca
|
||||
** conditional compilation a bit more sane
|
||||
**
|
||||
** Revision 1.2.6.3 2004/10/04 09:26:31 dborca
|
||||
** DOS/OpenWatcom support
|
||||
**
|
||||
@@ -255,7 +258,11 @@ GR_ENTRY(grDrawLine, void, (const void *a, const void *b))
|
||||
/*---------------------------------------------------------------------------
|
||||
** grDrawTriangle
|
||||
*/
|
||||
|
||||
#if !defined(GLIDE_DEBUG) && !(GLIDE_PLATFORM & GLIDE_OS_UNIX) && !(GLIDE_PLATFORM & GLIDE_OS_DOS32)
|
||||
#if !(GLIDE_USE_C_TRISETUP)
|
||||
__declspec( naked )
|
||||
#endif
|
||||
#endif /* !defined(GLIDE_DEBUG) && !(GLIDE_PLATFORM & GLIDE_OS_UNIX) && !(GLIDE_PLATFORM & GLIDE_OS_DOS32) */
|
||||
GR_ENTRY(grDrawTriangle, void, (const void *a, const void *b, const void *c))
|
||||
{
|
||||
#define FN_NAME "grDrawTriangle"
|
||||
|
||||
Reference in New Issue
Block a user