From 58d2d84b0a37e1f3e0e0d678b9e208248ca9a575 Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Sat, 27 Dec 2008 23:49:08 +0000 Subject: [PATCH] fix matrixes cache handle in some games. zeromus check it --- desmume/src/gfx3d.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 59eb28666..f9299df07 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -628,13 +628,15 @@ static void SetVertex() POLY &poly = polylist->list[polylist->count]; //todo - dont overrun proj list - //see if the last entry in the proj list matches the current matrix, if there is one. if(projlist->count != 0 && //but as a speed hack, we consider the matrices different if the first element differs. //i think this should be good enough. - //!MatrixCompare(mtxCurrent[0],projlist->projMatrix[projlist->count-1]) - mtxCurrent[0][0] == projlist->projMatrix[projlist->count-1][0] + !MatrixCompare(mtxCurrent[0],projlist->projMatrix[projlist->count-1]) + + // if compare only one value this is broke some games + // zeromus check it please + //mtxCurrent[0][0] == projlist->projMatrix[projlist->count-1][0] ) { //it matches. use it poly.projIndex = projlist->count-1;