From 75a0b0c6296af6600ce1a4e585fb7c5b9a0ea203 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 23 May 2012 00:19:46 +0200 Subject: TONY: Some more code formatting --- engines/tony/mpal/mpal.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'engines/tony/mpal/mpal.cpp') diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index a5b7593e68..12fc78c60c 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -345,7 +345,7 @@ static char *DuplicateDialogPeriod(uint32 nPeriod) { const char *origmsg; char *clonemsg; LPMPALDIALOG dialog = GLOBALS.lpmdDialogs + GLOBALS.nExecutingDialog; - int i,j; + int i, j; for (j = 0; dialog->Periods[j] != NULL; j++) if (dialog->PeriodNums[j] == nPeriod) { @@ -457,7 +457,7 @@ static uint32 *GetItemList(uint32 nLoc) { LPMPALVAR v = GLOBALS.lpmvVars; num = 0; - for (i = 0; i < GLOBALS.nVars; i++,v++) { + for (i = 0; i < GLOBALS.nVars; i++, v++) { if (strncmp(v->lpszVarName,"Location",8) == 0 && v->dwVal == nLoc) num++; } @@ -468,8 +468,8 @@ static uint32 *GetItemList(uint32 nLoc) { v = GLOBALS.lpmvVars; j = 0; - for (i = 0; i < GLOBALS.nVars; i++,v++) { - if (strncmp(v->lpszVarName,"Location",8) == 0 && v->dwVal == nLoc) { + for (i = 0; i < GLOBALS.nVars; i++, v++) { + if (strncmp(v->lpszVarName, "Location", 8) == 0 && v->dwVal == nLoc) { sscanf(v->lpszVarName, "Location.%u", &il[j]); j++; } @@ -504,7 +504,7 @@ static LPITEM GetItemData(uint32 nOrdItem) { if (i >= 0x10) { // From 1.0, there's a destination point for each object ret->destX = (int16)READ_LE_UINT16(dat); ret->destY = (int16)READ_LE_UINT16(dat + 2); - dat+=4; + dat += 4; } if (i >= 0x11) { // From 1.1, there's animation speed @@ -514,9 +514,9 @@ static LPITEM GetItemData(uint32 nOrdItem) { ret->speed = 150; } - ret->numframe=*dat++; - ret->numpattern=*dat++; - ret->Zvalue=*dat++; + ret->numframe = *dat++; + ret->numpattern = *dat++; + ret->Zvalue = *dat++; // Upload the left & top co-ordinates of each frame for (i = 0; i < ret->numframe; i++) { @@ -529,7 +529,7 @@ static LPITEM GetItemData(uint32 nOrdItem) { for (i = 0; i < ret->numframe; i++) { ret->frameslocations[i].right = (int16)READ_LE_UINT16(dat) + ret->frameslocations[i].left; ret->frameslocations[i].bottom = (int16)READ_LE_UINT16(dat + 2) + ret->frameslocations[i].top; - dat+=4; + dat += 4; } // Upload the bounding boxes of each frame @@ -538,12 +538,12 @@ static LPITEM GetItemData(uint32 nOrdItem) { ret->bbox[i].top = (int16)READ_LE_UINT16(dat + 2); ret->bbox[i].right = (int16)READ_LE_UINT16(dat + 4); ret->bbox[i].bottom = (int16)READ_LE_UINT16(dat + 6); - dat+=8; + dat += 8; } // Load the animation pattern patlength = dat; - dat+=ret->numpattern; + dat += ret->numpattern; for (i = 1; i < ret->numpattern; i++) { for (j = 0; j < patlength[i]; j++) @@ -639,7 +639,7 @@ void ScriptThread(CORO_PARAM, const void *param) { } _ctx->numHandles = 0; - for (_ctx->j = 0; _ctx->jMoment[_ctx->i].nCmds; _ctx->j++) { + for (_ctx->j = 0; _ctx->j < s->Moment[_ctx->i].nCmds; _ctx->j++) { _ctx->k = s->Moment[_ctx->i].CmdNum[_ctx->j]; if (s->Command[_ctx->k].type == 1) { @@ -1048,9 +1048,6 @@ void LocationPollThread(CORO_PARAM, const void *param) { } - - - /** * Wait for the end of the dialog execution thread, and then restore global * variables indicating that the dialogue has finished. @@ -1847,7 +1844,7 @@ HANDLE mpalQueryHANDLE(uint16 wQueryType, ...) { n = GETARG(char *); buf = Common::String::format("Status.%u", x); if (varGetValue(buf.c_str()) <= 0) - n[0]='\0'; + n[0] = '\0'; else { LockItems(); y = itemGetOrderFromNum(x); @@ -2288,7 +2285,7 @@ void mpalDumpMessages(void) { } // Now make a loop over all the periods - for (j = 0;j