glide2x, sst1, grDrawTriangle(): directly use the proc from xdraw.asm.

this makes it more like the glide3x version, and fixes windows build
and linkage.  only Watcom build is special-cased: don't know the reason
why it was adjusted that way in gdraw.c but I kept it that way for now.
This commit is contained in:
sezero
2018-08-18 22:32:02 +03:00
parent bc1d8f3932
commit d13007941b
3 changed files with 5 additions and 11 deletions

View File

@@ -336,10 +336,9 @@ all_done: /* come here on degenerate lines */
** grDrawTriangle
*/
#if !defined(__linux__) || defined(GLIDE_USE_C_TRISETUP) || defined(GLIDE_DEBUG)
#if defined(GLIDE_USE_C_TRISETUP) || defined(__WATCOMC__) /* why is Watcom special-case?? */
GR_ENTRY(grDrawTriangle, void, ( const GrVertex *a, const GrVertex *b, const GrVertex *c ))
{
#if defined(GLIDE_USE_C_TRISETUP) || defined( __WATCOMC__ ) || defined( GLIDE_DEBUG )
GR_BEGIN_NOFIFOCHECK("grDrawTriangle",92);
GDBG_INFO_MORE((gc->myLevel,"(0x%x,0x%x,0x%x)\n",a,b,c));
GR_CHECK_F(myName, !a || !b || !c, "NULL pointer passed");
@@ -380,15 +379,6 @@ if (0) { /* GMT: only use this if needed */
all_done:
GR_END();
#else
#if defined( __linux__ )
asm("jmp grDrawTriangle_asm");
#endif
# if defined( __MSC__ )
extern void grDrawTriangle_asm(void);
{_asm jmp grDrawTriangle_asm}
# endif
#endif
} /* grDrawTriangle */
#endif

View File

@@ -171,8 +171,10 @@ segment SEG_TEXT
;--------------------------------------------------------------------------
align 4
%if XOS != XOS_WATCD ; gdraw.c special-cases __WATCOMC__ , for what reason???
proc grDrawTriangle, 12
endp
%endif
%if XOS == XOS_WIN32
%ifdef __MINGW32__
; GNU LD fails with '_' prefix

View File

@@ -172,8 +172,10 @@ segment SEG_TEXT
;--------------------------------------------------------------------------
align 4
%if XOS != XOS_WATCD ; gdraw.c special-cases __WATCOMC__ , for what reason???
proc grDrawTriangle, 12
endp
%endif
%if XOS == XOS_WIN32
%ifdef __MINGW32__
; GNU LD fails with '_' prefix