Changeset - r8948:c01eed5ce087
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2008-04-16 18:28:05
rubidium@openttd.org
(svn r12736) -Codechange: a (small) touch of coding style in viewport.cpp.
1 file changed with 4 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/viewport.cpp
Show inline comments
 
@@ -1341,17 +1341,15 @@ static void ViewportDrawTileSprites(cons
 

	
 
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(Pa
 
				}
 

	
 
				/* 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(Pa
 
					psd3++;
 
				} while (psd3 <= psd2);
 
			}
 
		} else {
 
			psd++;
 
		}
 
	}
 
}
 

	
0 comments (0 inline, 0 general)