- fix poly sort (zeromus, check it), now fix Harvest Moon, Orc & Elves, but some game broken (from rev 2230 - Lunar Knight, Orc & Elves no sprites);
This commit is contained in:
mtabachenko 2009-05-20 08:34:12 +00:00
parent 1c886d15b1
commit ca9f2fec36
1 changed files with 6 additions and 6 deletions

View File

@ -1405,21 +1405,21 @@ void gfx3d_glFlush(u32 v)
gfx3d_doFlush(); gfx3d_doFlush();
} }
static bool gfx3d_ysort_compare(int num1, int num2) static int gfx3d_ysort_compare(int num1, int num2)
{ {
const POLY &poly1 = polylist->list[num1]; const POLY &poly1 = polylist->list[num1];
const POLY &poly2 = polylist->list[num2]; const POLY &poly2 = polylist->list[num2];
if(poly1.maxy > poly2.maxy) if(poly1.maxy > poly2.maxy)
return true; return 1;
else if(poly1.maxy < poly2.maxy) else if(poly1.maxy < poly2.maxy)
return false; return -1;
else if(poly1.miny < poly2.miny) else if(poly1.miny < poly2.miny)
return true; return 1;
else if(poly1.miny > poly2.miny) else if(poly1.miny > poly2.miny)
return false; return -1;
else else
return false; //equal should always return false "strict weak ordering" return 0; //equal should always return false "strict weak ordering"
} }
static void gfx3d_doFlush() static void gfx3d_doFlush()