From: <jo...@us...> - 2003-09-11 09:15:17
|
Update of /cvsroot/crystal/CS/libs/cstool In directory sc8-pr-cvs1:/tmp/cvs-serv6795/libs/cstool Modified Files: rendermeshlist.cpp Log Message: - Jorrit fixed a bug in csRenderMeshList with front2back and back2front sorting. The sorting functions were casting the pointers wrong. Index: rendermeshlist.cpp =================================================================== RCS file: /cvsroot/crystal/CS/libs/cstool/rendermeshlist.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- rendermeshlist.cpp 10 Sep 2003 20:51:21 -0000 1.5 +++ rendermeshlist.cpp 11 Sep 2003 09:15:14 -0000 1.6 @@ -100,11 +100,11 @@ return 0; } -int SortMeshBack2Front (void const* item1, +static int SortMeshBack2Front (void const* item1, void const* item2) { - csRenderMesh* m1 = (csRenderMesh*) item1; - csRenderMesh* m2 = (csRenderMesh*) item2; + csRenderMesh* m1 = *(csRenderMesh**) item1; + csRenderMesh* m2 = *(csRenderMesh**) item2; if (m1->transform->GetOrigin ().z < m2->transform->GetOrigin().z) return -1; @@ -113,11 +113,11 @@ return 0; } -int SortMeshFront2Back (void const* item1, +static int SortMeshFront2Back (void const* item1, void const* item2) { - csRenderMesh* m1 = (csRenderMesh*) item1; - csRenderMesh* m2 = (csRenderMesh*) item2; + csRenderMesh* m1 = *(csRenderMesh**) item1; + csRenderMesh* m2 = *(csRenderMesh**) item2; if (m1->transform->GetOrigin ().z < m2->transform->GetOrigin().z) return 1; |