projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed clang-format and clang_complete files from the repo
[dosdemo]
/
src
/
3dgfx
/
polytmpl.h
diff --git
a/src/3dgfx/polytmpl.h
b/src/3dgfx/polytmpl.h
index
167d5e1
..
f601623
100644
(file)
--- 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;
#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;
#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
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<nverts; i++) {
if(pv[i].y < pv[topidx].y) topidx = i;
if(pv[i].y > pv[botidx].y) botidx = i;
for(i=1; i<nverts; i++) {
if(pv[i].y < pv[topidx].y) topidx = i;
if(pv[i].y > pv[botidx].y) botidx = i;