I’m trying to reverse engineer some methods used for drawing textured triangles. I’m having an issue identifying certain values so I can properly name them.
All of the top fields from “a” to “i” are the most concerning.
Can anyone help me identify these?
// The difference between these points?
sceneX1 = sceneX0 - sceneX1;
sceneY1 = sceneY0 - sceneY1;
sceneZ1 = sceneZ0 - sceneZ1;
// Now what are these?
sceneX2 -= sceneX0;
sceneY2 -= sceneY0;
sceneZ2 -= sceneZ0;
// This is looking so difficult because I can't tell what the previous
// values are about..
int a = ((sceneX2 * sceneY0) - (sceneY2 * sceneX0)) << 14;
int b = ((sceneX1 * sceneY0) - (sceneY1 * sceneX0)) << 14;
int c = ((sceneY1 * sceneX2 - sceneX1 * sceneY2)) << 14;
int d = ((sceneY2 * sceneZ0) - (sceneZ2 * sceneY0)) << 8;
int e = ((sceneY1 * sceneZ0) - (sceneZ1 * sceneY0)) << 8;
int f = ((sceneZ1 * sceneY2) - (sceneY1 * sceneZ2)) << 8;
int g = ((sceneZ2 * sceneX0) - (sceneX2 * sceneZ0)) << 5;
int h = ((sceneZ1 * sceneX0) - (sceneX1 * sceneZ0)) << 5;
int i = ((sceneX1 * sceneZ2) - (sceneZ1 * sceneX2)) << 5;
(Was incredibly massive in my post so I puush’d it.)
Code: http://puu.sh/dBNEq/8060548eea.txt