[Scummvm-cvs-logs] SF.net SVN: scummvm:[38996] scummvm/trunk/engines/cruise/backgroundIncrust. cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Mar 1 03:25:46 CET 2009
Revision: 38996
http://scummvm.svn.sourceforge.net/scummvm/?rev=38996&view=rev
Author: dreammaster
Date: 2009-03-01 02:25:46 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Formatting fixes
Modified Paths:
--------------
scummvm/trunk/engines/cruise/backgroundIncrust.cpp
Modified: scummvm/trunk/engines/cruise/backgroundIncrust.cpp
===================================================================
--- scummvm/trunk/engines/cruise/backgroundIncrust.cpp 2009-03-01 02:20:22 UTC (rev 38995)
+++ scummvm/trunk/engines/cruise/backgroundIncrust.cpp 2009-03-01 02:25:46 UTC (rev 38996)
@@ -36,9 +36,7 @@
// blit background to another one
void addBackgroundIncrustSub1(int fileIdx, int X, int Y, char *ptr2, int16 scale, char *destBuffer, char *dataPtr) {
- if (*dataPtr == 0) {
- ASSERT(0);
- }
+ assert(*dataPtr != 0);
buildPolyModel(X, Y, scale, ptr2, destBuffer, dataPtr);
}
@@ -53,7 +51,7 @@
pIncrust->ptr = (uint8*)malloc(width * height);
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
- pIncrust->ptr[i*width+j] = pBackground[(i+Y)*320+j+X];
+ pIncrust->ptr[i * width + j] = pBackground[(i+Y) * 320 + j + X];
}
}
}
@@ -75,7 +73,7 @@
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
- pBackground[(i+Y)*320+j+X] = pIncrust->ptr[i*width+j];
+ pBackground[(i+Y)* 320 + j + X] = pIncrust->ptr[i * width + j];
}
}
}
@@ -102,10 +100,7 @@
backgroundPtr = backgroundPtrtable[backgroundIdx];
- if (!backgroundPtr) {
- ASSERT(0);
- return NULL;
- }
+ assert(backgroundPtr != NULL);
currentHead = pHead;
currentHead2 = currentHead->next;
@@ -225,9 +220,8 @@
while (pCurrent) {
backgroundIncrustStruct *pNext = pCurrent->next;
- if (pCurrent->ptr) {
+ if (pCurrent->ptr)
free(pCurrent->ptr);
- }
free(pCurrent);
@@ -316,7 +310,6 @@
pl = pl2->next;
}
-
}
} // End of namespace Cruise
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list