X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2F3dgfx%2Fpolytmpl.h;h=f601623f8f35a88d153d16e7045741e49ecfa733;hb=HEAD;hp=167d5e1381105d50145d0109695963cf7c382cb8;hpb=7705fa326336feba1a66d5a6ca8a7c27771e4c5f;p=dosdemo diff --git a/src/3dgfx/polytmpl.h b/src/3dgfx/polytmpl.h index 167d5e1..f601623 100644 --- a/src/3dgfx/polytmpl.h +++ b/src/3dgfx/polytmpl.h @@ -101,9 +101,6 @@ void POLYFILL(struct pvertex *pv, int nverts) #if defined(GOURAUD) || defined(TEXMAP) || defined(ZBUF) int mid; int32_t dx, tmp; -#else - /* 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; @@ -118,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;