diff --git a/GPU3D.cpp b/GPU3D.cpp index e713252a..7c1faae5 100644 --- a/GPU3D.cpp +++ b/GPU3D.cpp @@ -47,6 +47,8 @@ // Z-buffering mode: val = ((Z * 0x800 * 0x1000) / W) + 0x7FFCFF // W-buffering mode: val = W - 0x1FF // TODO: confirm W, because it's weird +// ... nope, that shit above isn't right +// also, the formula for the clear depth on GBAtek appears to be wrong namespace GPU3D diff --git a/GPU3D_Soft.cpp b/GPU3D_Soft.cpp index 0f8ef69b..d7960487 100644 --- a/GPU3D_Soft.cpp +++ b/GPU3D_Soft.cpp @@ -498,6 +498,10 @@ void RenderPolygon(Polygon* polygon) s32 tr = ((perspfactorr1 * vrcur->TexCoords[1]) + (perspfactorr2 * vrnext->TexCoords[1])) / (perspfactorr1 + perspfactorr2); if (xr == xl) xr++; + + // temp. + if (xl > 255) continue; + s32 xdiv = 0x1000 / (xr - xl); //printf("y%d: %d->%d %08X %08X\n", y, xl, xr, lfactor, rfactor); diff --git a/main.cpp b/main.cpp index 8f21d53f..3e713dac 100644 --- a/main.cpp +++ b/main.cpp @@ -265,7 +265,7 @@ int main() SetWindowText(melon, melontitle); } } - + printf("deinit\n"); NDS::DeInit(); return 0; diff --git a/melonDS.depend b/melonDS.depend index 4e93ed75..cecccb8e 100644 --- a/melonDS.depend +++ b/melonDS.depend @@ -1,5 +1,5 @@ # depslib dependency file v1.0 -1487356459 source:c:\documents\sources\melonds\main.cpp +1488636452 source:c:\documents\sources\melonds\main.cpp "NDS.h" @@ -10,7 +10,7 @@ 1481161027 c:\documents\sources\melonds\types.h -1488635272 source:c:\documents\sources\melonds\nds.cpp +1488635597 source:c:\documents\sources\melonds\nds.cpp "NDS.h" @@ -87,7 +87,7 @@ "NDS.h" "SPI.h" -1488594249 source:c:\documents\sources\melonds\gpu2d.cpp +1488635396 source:c:\documents\sources\melonds\gpu2d.cpp "NDS.h" @@ -148,7 +148,7 @@ 1488497796 c:\documents\sources\melonds\gpu3d.h -1488594938 source:c:\documents\sources\melonds\gpu3d.cpp +1488637250 source:c:\documents\sources\melonds\gpu3d.cpp "NDS.h"