diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index b5dc79687a1d..9f725f252366 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 940fb2afe8aa..dd557efafd21 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 c6a54aa1efba..84e56a108dcf 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 610dd5998499..6ec08f9d268a 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;inActions;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;inActions;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;kAction[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 70b49a1fd92c..26c4283018f7 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))