sezero / uhexen2

Hexen II: Hammer of Thyrion -- A cross-platform port of Hexen II game.
https://sourceforge.net/projects/uhexen2/
76 stars 14 forks source link

amiga: added 68k optimized polyset drawing functions #38

Closed BSzili closed 2 years ago

BSzili commented 2 years ago

This should take care of pretty much all the Polyset funcions. D_DrawNonSubdiv/D_RasterizeAliasPolySmooth was a bit tricky as I had to avoid poking into the entity_t structure that's different in Hexen II and HexenWold. I introduced a d_polysetdrawspans global var that is set by the D_PolysetDraw functions to the correct version of D_PolysetDrawSpans8. This avoids branching in the assembly version of D_RasterizeAliasPolySmooth too. I also cleaned up D_PolysetDrawFinalVerts from the old amiga_d_polyse68k.s and created translucent versions, which is now merged into d_polyset68k.s.

sezero commented 2 years ago

amiga_d_polyse68k.s is now obsolete: remove?

edgetable_t, edgetables[], and adivtab[] can always be made global (unless there is compelling reason not to..) Also, they need to be marked for C-linkage. Patch attached: patch_38a.txt

BSzili commented 2 years ago

I applied the patch, and removed amiga_d_polyse68k.s too. It had only one function (D_PolysetDrawFinalVerts), which is now in d_polyset68k.s with the new variants.

sezero commented 2 years ago

This is in, thanks.