1
0
Fork 0

(svn r12736) -Codechange: a (small) touch of coding style in viewport.cpp.

release/0.7
rubidium 2008-04-16 18:28:05 +00:00
parent 6ab158f9d9
commit 208dd15c91
1 changed files with 41 additions and 46 deletions

View File

@ -1341,17 +1341,15 @@ static void ViewportDrawTileSprites(const TileSpriteToDrawVector *tstdv)
static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
{
while (*psd != NULL) {
for (; *psd != NULL; psd++) {
ParentSpriteToDraw *ps = *psd;
if (!ps->comparison_done) {
ParentSpriteToDraw** psd2 = psd;
if (ps->comparison_done) continue;
ps->comparison_done = true;
while (*++psd2 != NULL) {
for (ParentSpriteToDraw **psd2 = psd + 1; *psd2 != NULL; psd2++) {
ParentSpriteToDraw *ps2 = *psd2;
ParentSpriteToDraw** psd3;
if (ps2->comparison_done) continue;
@ -1384,7 +1382,7 @@ static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
}
/* Swap the two sprites ps and ps2 using bubble-sort algorithm. */
psd3 = psd;
ParentSpriteToDraw **psd3 = psd;
do {
ParentSpriteToDraw* temp = *psd3;
*psd3 = ps2;
@ -1393,9 +1391,6 @@ static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
psd3++;
} while (psd3 <= psd2);
}
} else {
psd++;
}
}
}