X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2F3dgfx%2Fpolytmpl.h;fp=src%2F3dgfx%2Fpolytmpl.h;h=f601623f8f35a88d153d16e7045741e49ecfa733;hp=62692fac7407d5acdac8ec7dddb12a2d65e4aea0;hb=23c14b0ba8bac4d39824ae1d848be3058e9f9073;hpb=d591d56c7214fe25f93bc7a439c37b47fc5e5aea diff --git a/src/3dgfx/polytmpl.h b/src/3dgfx/polytmpl.h index 62692fa..f601623 100644 --- a/src/3dgfx/polytmpl.h +++ b/src/3dgfx/polytmpl.h @@ -102,10 +102,6 @@ void POLYFILL(struct pvertex *pv, int nverts) int mid; int32_t dx, tmp; #endif -#if !defined(GOURAUD) && !defined(TEXMAP) - /* flat version, just pack the color now */ - color = G3D_PACK_RGB(pv[0].r, pv[0].g, pv[0].b); -#endif #ifdef GOURAUD int32_t r, g, b, dr, dg, db, rslope, gslope, bslope; #ifdef BLEND_ALPHA @@ -119,6 +115,11 @@ void POLYFILL(struct pvertex *pv, int nverts) int32_t z, dz, zslope; #endif +#if !defined(GOURAUD) && !defined(TEXMAP) + /* flat version, just pack the color now */ + color = G3D_PACK_RGB(pv[0].r, pv[0].g, pv[0].b); +#endif + for(i=1; i pv[botidx].y) botidx = i;