aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GPU2D.cpp2
-rw-r--r--src/GPU3D.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index e1419bf..d92d960 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -547,7 +547,7 @@ void GPU2D::DoCapture(u32 line, u32 width, u32* src)
dstaddr &= 0xFFFF;
srcBaddr &= 0xFFFF;
- switch ((DispCnt >> 29) & 0x3)
+ switch ((CaptureCnt >> 29) & 0x3)
{
case 0: // source A
{
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index b8eb2a2..dc08841 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -620,7 +620,7 @@ void SubmitPolygon()
normalX = (((s64)v0->Position[1] * v2->Position[3]) - ((s64)v0->Position[3] * v2->Position[1])) >> 12;
normalY = (((s64)v0->Position[3] * v2->Position[0]) - ((s64)v0->Position[0] * v2->Position[3])) >> 12;
normalZ = (((s64)v0->Position[0] * v2->Position[1]) - ((s64)v0->Position[1] * v2->Position[0])) >> 12;
- dot = ((s64)(v1->Position[0] >> 0) * normalX) + ((s64)(v1->Position[1] >> 0) * normalY) + ((s64)(v1->Position[3] >> 0) * normalZ);
+ dot = ((s64)v1->Position[0] * normalX) + ((s64)v1->Position[1] * normalY) + ((s64)v1->Position[3] * normalZ);
bool facingview = (dot < 0);
@@ -805,6 +805,7 @@ void SubmitPolygon()
// determine bounds of the polygon
// also determine the W shift and normalize W
+ // TODO: normalization works both ways
u32 vtop = 0, vbot = 0;
s32 ytop = 192, ybot = 0;