diff options
author | Paul Gilbert | 2012-05-04 22:09:24 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-04 22:09:24 +1000 |
commit | 9482eac1f2fc7202eb4aaa72f63552bd35f5c66e (patch) | |
tree | 3ea989b2aba6e9ba6c4eab650c7787452d76df15 /engines/tony | |
parent | 5498f9a0b770ed8985ace1da232b505c650d70a7 (diff) | |
download | scummvm-rg350-9482eac1f2fc7202eb4aaa72f63552bd35f5c66e.tar.gz scummvm-rg350-9482eac1f2fc7202eb4aaa72f63552bd35f5c66e.tar.bz2 scummvm-rg350-9482eac1f2fc7202eb4aaa72f63552bd35f5c66e.zip |
TONY: Some formatting fixes
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/gfxcore.cpp | 5 | ||||
-rw-r--r-- | engines/tony/gfxengine.cpp | 4 | ||||
-rw-r--r-- | engines/tony/loc.cpp | 2 | ||||
-rw-r--r-- | engines/tony/mpal/mpal.cpp | 70 | ||||
-rw-r--r-- | engines/tony/mpal/mpal.h | 2 |
5 files changed, 39 insertions, 44 deletions
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index b5dc79687a..9f725f2523 100644 --- a/engines/tony/gfxcore.cpp +++ b/engines/tony/gfxcore.cpp @@ -45,14 +45,11 @@ * * **************************************************************************/ -#include "tony/gfxEngine.h" +#include "tony/gfxengine.h" #include "tony/mpal/mpalutils.h" namespace Tony { -static char rcsid[] = "$Id: $"; - - /****************************************************************************\ * Metodi di RMGfxTask \****************************************************************************/ diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 940fb2afe8..dd557efafd 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -49,7 +49,7 @@ #include "tony/mpal/lzo.h" #include "tony/mpal/mpalutils.h" #include "tony/custom.h" -#include "tony/gfxEngine.h" +#include "tony/gfxengine.h" #include "tony/tony.h" namespace Tony { @@ -934,7 +934,7 @@ void RMGfxEngine::LoadState(const char *fn) { // Le versioni vecchie necessitano di On enter if (ver < 5) - mpalQueryDoAction(0,loc,0); + mpalQueryDoAction(0, loc, 0); else { // In quelle nuove, ci basta resettare gli mcode MCharResetCodes(); diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index c6a54aa1ef..84e56a108d 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -55,8 +55,6 @@ namespace Tony { using namespace ::Tony::MPAL; -static char rcsid[] = "$Id: $"; - extern bool bSkipSfxNoLoop; diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 610dd59984..6ec08f9d26 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -868,9 +868,9 @@ void PASCAL ScriptThread(LPMPALSCRIPT s) { // Dorme il tempo necessario per arrivare al momento successivo if (s->Moment[i].dwTime==-1) { WaitForMultipleObjects(numHandles,cfHandles,true,INFINITE); - dwStartTime=timeGetTime(); + dwStartTime = timeGetTime(); } else { - dwCurTime=timeGetTime(); + dwCurTime = timeGetTime(); if (dwCurTime < dwStartTime+(s->Moment[i].dwTime*100)) { // warning("PlayScript(): Sleeping %lums\n",dwStartTime+(s->Moment[i].dwTime*100)-dwCurTime); Sleep(dwStartTime+(s->Moment[i].dwTime*100)-dwCurTime); @@ -1043,23 +1043,23 @@ void PASCAL LocationPollThread(uint32 id) { /* Cerchiamo gli items della locazione senza idle actions e li eliminiamo dalla lista */ LockItems(); - nIdleActions=0; - nRealItems=0; - for (i=0;i<numitems;i++) { - int ord=itemGetOrderFromNum(il[i]); + nIdleActions = 0; + nRealItems = 0; + for (i = 0; i < numitems; i++) { + int ord = itemGetOrderFromNum(il[i]); - if (ord==-1) continue; + if (ord == -1) continue; - curItem=lpmiItems+ord; + curItem = lpmiItems + ord; k=0; - for (j=0;j<curItem->nActions;j++) - if (curItem->Action[j].num==0xFF) + for (j = 0; j < curItem->nActions; j++) + if (curItem->Action[j].num == 0xFF) k++; - nIdleActions+=k; + nIdleActions += k; - if (k==0) + if (k == 0) /* Possiamo eliminare questo item dalla lista */ il[i] = (uint32)NULL; else @@ -1068,28 +1068,28 @@ void PASCAL LocationPollThread(uint32 id) { UnlockItems(); /* Se non e' rimasto nessuno possiamo uscire */ - if (nRealItems==0) { + if (nRealItems == 0) { GlobalFree(il); ExitThread(0); // _endthread(); } - MyThreads=(MYTHREAD*)GlobalAlloc(GMEM_FIXED|GMEM_ZEROINIT,nRealItems*sizeof(MYTHREAD)); - if (MyThreads==NULL) { + MyThreads=(MYTHREAD *)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, nRealItems * sizeof(MYTHREAD)); + if (MyThreads == NULL) { GlobalFree(il); ExitThread(0); // _endthread(); } /* Inizializziamo le routine random */ - //curTime=timeGetTime(); + //curTime = timeGetTime(); //srand(curTime); /* Abbiamo appurato che esiste almeno un item che contiene idle actions. Ora creaiamo le copie speculari delle idle actions */ - MyActions=(MYACTION*)GlobalAlloc(GMEM_FIXED|GMEM_ZEROINIT,nIdleActions*sizeof(MYACTION)); - if (MyActions==NULL) { + MyActions = (MYACTION *)GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, nIdleActions * sizeof(MYACTION)); + if (MyActions == NULL) { GlobalFree(MyThreads); GlobalFree(il); ExitThread(0); @@ -1097,27 +1097,27 @@ void PASCAL LocationPollThread(uint32 id) { } LockItems(); - k=0; + k = 0; - for (i=0;i<numitems;i++) { - if (il[i]==0) + for (i = 0; i < numitems; i++) { + if (il[i] == 0) continue; - curItem=lpmiItems+itemGetOrderFromNum(il[i]); + curItem = lpmiItems + itemGetOrderFromNum(il[i]); - for (j=0;j<curItem->nActions;j++) - if (curItem->Action[j].num==0xFF) { - MyActions[k].nItem=il[i]; - MyActions[k].nAction=j; + for (j = 0; j < curItem->nActions; j++) + if (curItem->Action[j].num == 0xFF) { + MyActions[k].nItem = il[i]; + MyActions[k].nAction = j; - MyActions[k].wTime=curItem->Action[j].wTime; - MyActions[k].perc=curItem->Action[j].perc; - MyActions[k].when=curItem->Action[j].when; - MyActions[k].nCmds=curItem->Action[j].nCmds; + MyActions[k].wTime = curItem->Action[j].wTime; + MyActions[k].perc = curItem->Action[j].perc; + MyActions[k].when = curItem->Action[j].when; + MyActions[k].nCmds = curItem->Action[j].nCmds; CopyMemory(MyActions[k].CmdNum, curItem->Action[j].CmdNum, - MAX_COMMANDS_PER_ACTION*sizeof(uint16)); + MAX_COMMANDS_PER_ACTION * sizeof(uint16)); - MyActions[k].dwLastTime=timeGetTime(); + MyActions[k].dwLastTime = timeGetTime(); k++; } } @@ -1132,7 +1132,7 @@ void PASCAL LocationPollThread(uint32 id) { while (1) { /* Cerchiamo tra tutte le idle actions quella a cui manca meno tempo per l'esecuzione */ - curTime=timeGetTime(); + curTime = timeGetTime(); dwSleepTime=(uint32)-1L; for (k=0;k<nIdleActions;k++) @@ -1154,7 +1154,7 @@ void PASCAL LocationPollThread(uint32 id) { MyThreads[i].nItem=0; } - curTime=timeGetTime(); + curTime = timeGetTime(); /* Cerchiamo all'interno delle idle actions quale e' necessario eseguire */ for (k=0;k<nIdleActions;k++) @@ -1204,7 +1204,7 @@ void PASCAL LocationPollThread(uint32 id) { UnlockItems(); /* Copiamo l'azione nella #0 */ -// newItem->Action[0].nCmds=curItem->Action[j].nCmds; +// newItem->Action[0].nCmds = curItem->Action[j].nCmds; // CopyMemory(newItem->Action[0].CmdNum,curItem->Action[j].CmdNum,newItem->Action[0].nCmds*sizeof(newItem->Action[0].CmdNum[0])); newItem->dwRes=j; diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h index 70b49a1fd9..26c4283018 100644 --- a/engines/tony/mpal/mpal.h +++ b/engines/tony/mpal/mpal.h @@ -271,7 +271,7 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION; \****************************************************************************/ #define mpalQueryGlobalVar(lpszVarName) \ - (uint32)mpalQuery(MPQ_GLOBAL_VAR,(LPSTR)(lpszVarName)) + (uint32)mpalQuery(MPQ_GLOBAL_VAR,(const char *)(lpszVarName)) |