X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2F3dgfx%2Fpolytmpl.h;h=f601623f8f35a88d153d16e7045741e49ecfa733;hb=HEAD;hp=01bbd01f4a6c71c3fc7eddeb9d084375049c0dca;hpb=659ca11730af4e7e5b1b350efa4198a9c42de287;p=dosdemo diff --git a/src/3dgfx/polytmpl.h b/src/3dgfx/polytmpl.h index 01bbd01..f601623 100644 --- a/src/3dgfx/polytmpl.h +++ b/src/3dgfx/polytmpl.h @@ -13,7 +13,7 @@ static uint32_t SCANEDGE(struct pvertex *v0, struct pvertex *v1, struct pvertex int32_t u, v, du, dv, uslope, vslope; #endif #ifdef ZBUF - int z, dz, zslope; + int32_t z, dz, zslope; #endif int32_t start_idx, end_idx; @@ -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; @@ -115,7 +112,12 @@ void POLYFILL(struct pvertex *pv, int nverts) int32_t u, v, du, dv, uslope, vslope; #endif #ifdef ZBUF - int z, dz, zslope; + 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