projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- separated mesh algorithms in mesh.h/mesh.c
[dosdemo]
/
src
/
3dgfx.c
diff --git
a/src/3dgfx.c
b/src/3dgfx.c
index
17ddd93
..
673122d
100644
(file)
--- a/
src/3dgfx.c
+++ b/
src/3dgfx.c
@@
-470,7
+470,7
@@
void g3d_draw_indexed(int prim, const struct g3d_vertex *varr, int varr_size,
int32_t ay = pv[1].y - pv[0].y;
int32_t bx = pv[2].x - pv[0].x;
int32_t by = pv[2].y - pv[0].y;
int32_t ay = pv[1].y - pv[0].y;
int32_t bx = pv[2].x - pv[0].x;
int32_t by = pv[2].y - pv[0].y;
- int32_t cross_z = ax * (by >> 8) - ay * (bx >> 8);
+ int32_t cross_z = (ax >> 4) * (by >> 4) - (ay >> 4) * (bx >> 4);
int sign = (cross_z >> 31) & 1;
if(!(sign ^ st->frontface)) {
int sign = (cross_z >> 31) & 1;
if(!(sign ^ st->frontface)) {