aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/function.cpp
diff options
context:
space:
mode:
authorMax Horn2007-09-10 13:17:20 +0000
committerMax Horn2007-09-10 13:17:20 +0000
commit4a302b25adb34e6357506a25cbfba6e182ac9209 (patch)
tree2d1f5ac4074c70e37c556c263b109d4b659c060e /engines/cruise/function.cpp
parent6419311a2e361c5e265ae3796ef425700694801f (diff)
downloadscummvm-rg350-4a302b25adb34e6357506a25cbfba6e182ac9209.tar.gz
scummvm-rg350-4a302b25adb34e6357506a25cbfba6e182ac9209.tar.bz2
scummvm-rg350-4a302b25adb34e6357506a25cbfba6e182ac9209.zip
Lots of source code formatting corrections
svn-id: r28887
Diffstat (limited to 'engines/cruise/function.cpp')
-rw-r--r--engines/cruise/function.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 7841a5e4ce..cfb579e331 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -1006,8 +1006,7 @@ actorStruct *addAnimation(actorStruct * pHead, int overlay, int objIdx, int para
return pNewElement;
}
-int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType)
-{
+int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType) {
actorStruct* pl;
actorStruct* pl2;
actorStruct* pl3;
@@ -1019,14 +1018,12 @@ int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType)
pl2 = pl;
pl = pl2->next;
- while(pl)
- {
+ while (pl) {
pl2 = pl;
- if(((pl->overlayNumber == overlay) || (overlay == -1)) &&
+ if (((pl->overlayNumber == overlay) || (overlay == -1)) &&
((pl->idx == objIdx) || (objIdx == -1)) &&
- ((pl->type == objType) || (objType == -1)))
- {
+ ((pl->type == objType) || (objType == -1))) {
pl->type = -1;
}
@@ -1037,29 +1034,25 @@ int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType)
pl2 = pl;
pl = pl2->next;
- while(pl)
- {
- if(pl->type == -1)
- {
+ while (pl) {
+ if (pl->type == -1) {
pl4 = pl->next;
pl2->next = pl4;
pl3 = pl4;
- if(pl3 == NULL)
+ if (pl3 == NULL)
pl3 = pHead;
pl3->prev = pl->prev;
dir = pl->startDirection;
- if(pl->idx >= 0)
+ if (pl->idx >= 0)
freePerso(pl->idx);
free(pl);
pl = pl4;
- }
- else
- {
+ } else {
pl2 = pl;
pl = pl2->next;
}