aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-06-04 23:45:36 +0200
committerStrangerke2012-06-04 23:45:36 +0200
commita1f6f8ceb19d65619dfd8e2477bffad773ba49ba (patch)
treee867c4e4393b2b4a0eb7c151968f648120ae2704
parentc17af63aacda4b18ca6e756fb710cecb3b25fc88 (diff)
downloadscummvm-rg350-a1f6f8ceb19d65619dfd8e2477bffad773ba49ba.tar.gz
scummvm-rg350-a1f6f8ceb19d65619dfd8e2477bffad773ba49ba.tar.bz2
scummvm-rg350-a1f6f8ceb19d65619dfd8e2477bffad773ba49ba.zip
TONY: Rename variables and functions in tony.h
-rw-r--r--engines/tony/custom.cpp70
-rw-r--r--engines/tony/detection.cpp2
-rw-r--r--engines/tony/font.cpp18
-rw-r--r--engines/tony/game.cpp62
-rw-r--r--engines/tony/gfxengine.cpp6
-rw-r--r--engines/tony/inventory.cpp32
-rw-r--r--engines/tony/loc.cpp10
-rw-r--r--engines/tony/mpal/mpal.cpp14
-rw-r--r--engines/tony/tony.cpp248
-rw-r--r--engines/tony/tony.h126
-rw-r--r--engines/tony/tonychar.cpp4
11 files changed, 294 insertions, 298 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 96b78d0e83..47089f3214 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -240,7 +240,7 @@ VoiceHeader *SearchVoiceHeader(uint32 codehi, uint32 codelo) {
return NULL;
for (i = 0; i < _vm->_voices.size(); i++)
- if (_vm->_voices[i].code == code)
+ if (_vm->_voices[i]._code == code)
return &_vm->_voices[i];
return NULL;
@@ -272,7 +272,7 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
_ctx->voice = NULL;
if (_ctx->curVoc) {
// Is positioned within the database of entries beginning at the first
- _ctx->curOffset = _ctx->curVoc->offset;
+ _ctx->curOffset = _ctx->curVoc->_offset;
// First time allocation
_vm->_vdbFP.seek(_ctx->curOffset);
@@ -509,7 +509,7 @@ DECLARE_CUSTOM_FUNCTION(CloseLocation)(CORO_PARAM, uint32, uint32, uint32, uint3
CORO_INVOKE_0(GLOBALS.WaitWipeEnd);
}
- _vm->StopMusic(4);
+ _vm->stopMusic(4);
// On exit, unload and unfreeze
CORO_INVOKE_2(GLOBALS.UnloadLocation, true, NULL);
@@ -532,7 +532,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint
}
if (GLOBALS.lastTappeto != GLOBALS.tappeti[nLoc]) {
- _vm->StopMusic(4);
+ _vm->stopMusic(4);
}
// On exit, unfreeze
@@ -547,7 +547,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeLocation)(CORO_PARAM, uint32 nLoc, uint32 tX, uint
if (GLOBALS.lastTappeto != GLOBALS.tappeti[nLoc]) {
GLOBALS.lastTappeto = GLOBALS.tappeti[nLoc];
if (GLOBALS.lastTappeto != 0)
- _vm->PlayMusic(4, tappetiFile[GLOBALS.lastTappeto], 0, true, 2000);
+ _vm->playMusic(4, tappetiFile[GLOBALS.lastTappeto], 0, true, 2000);
}
if (!GLOBALS.bNoOcchioDiBue) {
@@ -1281,7 +1281,7 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui
_ctx->startpt = GLOBALS.Loc->ScrollPosition();
- _ctx->dwStartTime = _vm->GetTime();
+ _ctx->dwStartTime = _vm->getTime();
if (sX)
_ctx->dwTotalTime = _ctx->dimx * (1000 / 35) / sX;
@@ -1289,7 +1289,7 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui
_ctx->dwTotalTime = _ctx->dimy * (1000 / 35) / sY;
while ((_ctx->lx != 0 || _ctx->ly != 0) && !GLOBALS.bSkipIdle) {
- _ctx->dwCurTime = _vm->GetTime() - _ctx->dwStartTime;
+ _ctx->dwCurTime = _vm->getTime() - _ctx->dwStartTime;
if (_ctx->dwCurTime > _ctx->dwTotalTime)
break;
@@ -1362,11 +1362,11 @@ DECLARE_CUSTOM_FUNCTION(ChangeHotspot)(CORO_PARAM, uint32 dwCode, uint32 nX, uin
DECLARE_CUSTOM_FUNCTION(AutoSave)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->AutoSave(coroParam);
+ _vm->autoSave(coroParam);
}
-DECLARE_CUSTOM_FUNCTION(Abort)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->Abort();
+DECLARE_CUSTOM_FUNCTION(AbortGame)(CORO_PARAM, uint32, uint32, uint32, uint32) {
+ _vm->abortGame();
}
DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32, uint32) {
@@ -1378,12 +1378,12 @@ DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32
CORO_BEGIN_CODE(_ctx);
- _ctx->curTime = _vm->GetTime();
+ _ctx->curTime = _vm->getTime();
_ctx->dirx = 1;
_ctx->diry = 1;
- while (_vm->GetTime() < _ctx->curTime + nScosse) {
+ while (_vm->getTime() < _ctx->curTime + nScosse) {
CORO_INVOKE_0(GLOBALS.WaitFrame);
GLOBALS.Freeze();
@@ -1482,8 +1482,8 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
_ctx->voice = NULL;
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
- _vm->_vdbFP.seek(_ctx->curVoc->offset);
- _ctx->curOffset = _ctx->curVoc->offset;
+ _vm->_vdbFP.seek(_ctx->curVoc->_offset);
+ _ctx->curOffset = _ctx->curVoc->_offset;
}
for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
@@ -1694,8 +1694,8 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
// fseek(_vm->m_vdbFP, curVoc->offset, SEEK_SET);
- _vm->_vdbFP.seek(_ctx->curVoc->offset);
- _ctx->curOffset = _ctx->curVoc->offset;
+ _vm->_vdbFP.seek(_ctx->curVoc->_offset);
+ _ctx->curOffset = _ctx->curVoc->_offset;
}
for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
@@ -1806,7 +1806,7 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
if (_ctx->curVoc) {
// Position within the database of entries, beginning at the first
- _vm->_vdbFP.seek(_ctx->curVoc->offset);
+ _vm->_vdbFP.seek(_ctx->curVoc->_offset);
_vm->_theSound.CreateSfx(&_ctx->voice);
_ctx->voice->LoadVoiceFromVDB(_vm->_vdbFP);
_ctx->voice->SetLoop(false);
@@ -2083,11 +2083,11 @@ void ThreadFadeInMusic(CORO_PARAM, const void *nMusic) {
debug("Start FadeIn Music");
for (_ctx->i = 0; _ctx->i < 16; _ctx->i++) {
- _vm->SetMusicVolume(nChannel, _ctx->i * 4);
+ _vm->setMusicVolume(nChannel, _ctx->i * 4);
CORO_INVOKE_1(CoroScheduler.sleep, 100);
}
- _vm->SetMusicVolume(nChannel, 64);
+ _vm->setMusicVolume(nChannel, 64);
debug("End FadeIn Music");
@@ -2106,23 +2106,23 @@ void ThreadFadeOutMusic(CORO_PARAM, const void *nMusic) {
CORO_BEGIN_CODE(_ctx);
- _ctx->startVolume = _vm->GetMusicVolume(nChannel);
+ _ctx->startVolume = _vm->getMusicVolume(nChannel);
debug("Start FadeOut Music");
for (_ctx->i = 16; _ctx->i > 0 && !GLOBALS.bFadeOutStop; _ctx->i--) {
if (_ctx->i * 4 < _ctx->startVolume)
- _vm->SetMusicVolume(nChannel, _ctx->i * 4);
+ _vm->setMusicVolume(nChannel, _ctx->i * 4);
CORO_INVOKE_1(CoroScheduler.sleep, 100);
}
if (!GLOBALS.bFadeOutStop)
- _vm->SetMusicVolume(nChannel, 0);
+ _vm->setMusicVolume(nChannel, 0);
// If there is a stacchetto, stop all
if (nChannel == 2)
- _vm->StopMusic(2);
+ _vm->stopMusic(2);
debug("End FadeOut Music");
@@ -2152,28 +2152,28 @@ DECLARE_CUSTOM_FUNCTION(FadeInStacchetto)(CORO_PARAM, uint32, uint32, uint32, ui
}
DECLARE_CUSTOM_FUNCTION(StopSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->StopMusic(GLOBALS.curSonoriz);
+ _vm->stopMusic(GLOBALS.curSonoriz);
}
DECLARE_CUSTOM_FUNCTION(StopStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->StopMusic(2);
+ _vm->stopMusic(2);
}
DECLARE_CUSTOM_FUNCTION(MuteSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->SetMusicVolume(GLOBALS.curSonoriz, 0);
+ _vm->setMusicVolume(GLOBALS.curSonoriz, 0);
}
DECLARE_CUSTOM_FUNCTION(DemuteSonoriz)(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS.bFadeOutStop = true;
- _vm->SetMusicVolume(GLOBALS.curSonoriz, 64);
+ _vm->setMusicVolume(GLOBALS.curSonoriz, 64);
}
DECLARE_CUSTOM_FUNCTION(MuteStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->SetMusicVolume(2, 0);
+ _vm->setMusicVolume(2, 0);
}
DECLARE_CUSTOM_FUNCTION(DemuteStacchetto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- _vm->SetMusicVolume(2, 64);
+ _vm->setMusicVolume(2, 64);
}
@@ -2288,7 +2288,7 @@ DECLARE_CUSTOM_FUNCTION(OpenInitLoadMenu)(CORO_PARAM, uint32, uint32, uint32, ui
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- CORO_INVOKE_0(_vm->OpenInitLoadMenu);
+ CORO_INVOKE_0(_vm->openInitLoadMenu);
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -2301,7 +2301,7 @@ DECLARE_CUSTOM_FUNCTION(OpenInitOptions)(CORO_PARAM, uint32, uint32, uint32, uin
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- CORO_INVOKE_0(_vm->OpenInitOptions);
+ CORO_INVOKE_0(_vm->openInitOptions);
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -2357,13 +2357,13 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
GLOBALS.LinkGraphicTask(&_ctx->text[_ctx->i]);
}
- _ctx->startTime = _vm->GetTime();
+ _ctx->startTime = _vm->getTime();
- while (_ctx->startTime + dwTime * 1000 > _vm->GetTime()) {
+ while (_ctx->startTime + dwTime * 1000 > _vm->getTime()) {
CORO_INVOKE_0(GLOBALS.WaitFrame);
if (GLOBALS.Input->MouseLeftClicked() || GLOBALS.Input->MouseRightClicked())
break;
- if (_vm->GetEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB))
+ if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB))
break;
}
@@ -2510,7 +2510,7 @@ ASSIGN(130, StacchettoFadeEnd)
ASSIGN(120, TremaSchermo)
ASSIGN(121, AutoSave)
-ASSIGN(122, Abort)
+ASSIGN(122, AbortGame)
ASSIGN(131, NoOcchioDiBue)
ASSIGN(132, SendFullscreenMsgStart)
ASSIGN(133, SendFullscreenMsgEnd)
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
index 1de1b70968..be45aba19f 100644
--- a/engines/tony/detection.cpp
+++ b/engines/tony/detection.cpp
@@ -146,7 +146,7 @@ int TonyMetaEngine::getMaximumSaveSlot() const {
}
void TonyMetaEngine::removeSaveState(const char *target, int slot) const {
- Common::String filename = Tony::TonyEngine::GetSaveStateFileName(slot);
+ Common::String filename = Tony::TonyEngine::getSaveStateFileName(slot);
g_system->getSavefileManager()->removeSavefile(filename);
}
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 6b6778044d..567da3041c 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -2079,14 +2079,14 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
if (GLOBALS.bCfgTimerizedText) {
if (!m_bForceNoTime) {
- if (_vm->GetTime() > (uint32)m_time + m_startTime)
+ if (_vm->getTime() > (uint32)m_time + m_startTime)
return;
}
}
}
if (!m_bNoTab) {
- if (_vm->GetEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB))
+ if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_TAB))
return;
}
@@ -2100,14 +2100,14 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
// Erase the background
else if (!(GLOBALS.bCfgDubbing && hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
if (!m_bForceNoTime) {
- if (_vm->GetTime() > (uint32)m_time + m_startTime)
+ if (_vm->getTime() > (uint32)m_time + m_startTime)
return;
}
}
// If time is forced
if (m_bForceTime) {
- if (_vm->GetTime() > (uint32)m_time + m_startTime)
+ if (_vm->getTime() > (uint32)m_time + m_startTime)
return;
}
@@ -2143,7 +2143,7 @@ void RMTextDialog::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *p
CORO_BEGIN_CODE(_ctx);
if (m_startTime == 0)
- m_startTime = _vm->GetTime();
+ m_startTime = _vm->getTime();
if (m_bShowed) {
if (GLOBALS.bCfgSottotitoli || m_bAlwaysDisplay) {
@@ -2483,7 +2483,7 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
if (0) {
m_bShow = true;
} else {
- _ctx->starttime = _vm->GetTime();
+ _ctx->starttime = _vm->getTime();
_ctx->deltay = 480 - m_ptDrawPos.y;
_ctx->destpt = m_ptDrawPos;
m_ptDrawPos.Set(0, 480);
@@ -2496,7 +2496,7 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
while (_ctx->elaps < 700) {
CORO_INVOKE_0(MainWaitFrame);
MainFreeze();
- _ctx->elaps = _vm->GetTime() - _ctx->starttime;
+ _ctx->elaps = _vm->getTime() - _ctx->starttime;
m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * _ctx->elaps) / 100;
MainUnfreeze();
}
@@ -2533,14 +2533,14 @@ void RMDialogChoice::Hide(CORO_PARAM) {
CORO_BEGIN_CODE(_ctx);
if (1) {
- _ctx->starttime = _vm->GetTime();
+ _ctx->starttime = _vm->getTime();
_ctx->deltay = 480 - m_ptDrawPos.y;
_ctx->elaps = 0;
while (_ctx->elaps < 700) {
CORO_INVOKE_0(MainWaitFrame);
MainFreeze();
- _ctx->elaps = _vm->GetTime() - _ctx->starttime;
+ _ctx->elaps = _vm->getTime() - _ctx->starttime;
m_ptDrawPos.y = 480 - ((_ctx->deltay * 100) / 700 * (700 - _ctx->elaps)) / 100;
MainUnfreeze();
}
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index a1954b95b2..42c33f2259 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -47,75 +47,75 @@ using namespace MPAL;
/****************************************/
uint32 MainLoadLocation(int nLoc, RMPoint pt, RMPoint start) {
- return _vm->GetEngine()->LoadLocation(nLoc, pt, start);
+ return _vm->getEngine()->LoadLocation(nLoc, pt, start);
}
void MainUnloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
- _vm->GetEngine()->UnloadLocation(coroParam, bDoOnExit, result);
+ _vm->getEngine()->UnloadLocation(coroParam, bDoOnExit, result);
}
void MainLinkGraphicTask(RMGfxTask *task) {
- _vm->GetEngine()->LinkGraphicTask(task);
+ _vm->getEngine()->LinkGraphicTask(task);
}
void MainFreeze(void) {
- _vm->GetEngine()->Freeze();
+ _vm->getEngine()->Freeze();
}
void MainUnfreeze(void) {
- _vm->GetEngine()->Unfreeze();
+ _vm->getEngine()->Unfreeze();
}
void MainWaitFrame(CORO_PARAM) {
- CoroScheduler.waitForSingleObject(coroParam, _vm->m_hEndOfFrame, CORO_INFINITE);
+ CoroScheduler.waitForSingleObject(coroParam, _vm->_hEndOfFrame, CORO_INFINITE);
}
void MainShowMouse(void) {
- _vm->GetEngine()->EnableMouse();
+ _vm->getEngine()->EnableMouse();
}
void MainHideMouse(void) {
- _vm->GetEngine()->DisableMouse();
+ _vm->getEngine()->DisableMouse();
}
void MainPlayMusic(int nChannel, const char *filename, int nFX, bool bLoop, int nSync) {
- _vm->PlayMusic(nChannel, filename, nFX, bLoop, nSync);
+ _vm->playMusic(nChannel, filename, nFX, bLoop, nSync);
}
void MainDisableInput(void) {
- _vm->GetEngine()->DisableInput();
+ _vm->getEngine()->DisableInput();
}
void MainEnableInput(void) {
- _vm->GetEngine()->EnableInput();
+ _vm->getEngine()->EnableInput();
}
void MainInitWipe(int type) {
- _vm->GetEngine()->InitWipe(type);
+ _vm->getEngine()->InitWipe(type);
}
void MainCloseWipe(void) {
- _vm->GetEngine()->CloseWipe();
+ _vm->getEngine()->CloseWipe();
}
void MainWaitWipeEnd(CORO_PARAM) {
- _vm->GetEngine()->WaitWipeEnd(coroParam);
+ _vm->getEngine()->WaitWipeEnd(coroParam);
}
void MainEnableGUI(void) {
- _vm->GetEngine()->m_bGUIInterface = true;
- _vm->GetEngine()->m_bGUIInventory = true;
- _vm->GetEngine()->m_bGUIOption = true;
+ _vm->getEngine()->m_bGUIInterface = true;
+ _vm->getEngine()->m_bGUIInventory = true;
+ _vm->getEngine()->m_bGUIOption = true;
}
void MainDisableGUI(void) {
- _vm->GetEngine()->m_bGUIInterface = false;
- _vm->GetEngine()->m_bGUIInventory = false;
- _vm->GetEngine()->m_bGUIOption = false;
+ _vm->getEngine()->m_bGUIInterface = false;
+ _vm->getEngine()->m_bGUIInventory = false;
+ _vm->getEngine()->m_bGUIOption = false;
}
void MainSetPalesati(bool bPalesati) {
- _vm->GetEngine()->SetPalesati(bPalesati);
+ _vm->getEngine()->SetPalesati(bPalesati);
}
/****************************************************************************\
@@ -491,7 +491,7 @@ void RMOptionScreen::RefreshAll(CORO_PARAM) {
if (m_bEditSaveName) {
_ctx->thumb = new RMGfxSourceBuffer16;
- _ctx->thumb->Init((byte *)_vm->GetThumbnail(), 640 / 4, 480 / 4);
+ _ctx->thumb->Init((byte *)_vm->getThumbnail(), 640 / 4, 480 / 4);
if (m_nEditPos == 0)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(48, 57)));
@@ -989,7 +989,7 @@ bool RMOptionScreen::Close(void) {
// Start fade out
m_FadeStep++;
- m_FadeTime = _vm->GetTime();
+ m_FadeTime = _vm->getTime();
return true;
}
@@ -1097,7 +1097,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
}
}
-#define KEYPRESS(c) (_vm->GetEngine()->GetInput().GetAsyncKeyState(c))
+#define KEYPRESS(c) (_vm->getEngine()->GetInput().GetAsyncKeyState(c))
#define PROCESS_CHAR(cod,c) if (KEYPRESS(cod)) { \
m_EditName[strlen(m_EditName) +1 ] = '\0'; m_EditName[strlen(m_EditName)] = c; _ctx->bRefresh = true; }
@@ -1154,7 +1154,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
// OK
if (KEYPRESS(Common::KEYCODE_RETURN)) {
m_bEditSaveName = false;
- _vm->SaveState(m_statePos + m_nEditPos, m_EditName);
+ _vm->saveState(m_statePos + m_nEditPos, m_EditName);
Close();
}
@@ -1190,7 +1190,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
// There by saving or loading!!!
if (m_nState == MENULOAD && m_curThumb[_ctx->i] != NULL) {
// Caricamento
- CORO_INVOKE_1(_vm->LoadState, m_statePos + _ctx->i);
+ CORO_INVOKE_1(_vm->loadState, m_statePos + _ctx->i);
Close();
} else if (m_nState == MENUSAVE && (m_statePos != 0 || _ctx->i != 0)) {
// Turn on edit mode
@@ -1214,7 +1214,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
m_bQuitConfirm = false;
_ctx->bRefresh = true;
- _vm->Quit();
+ _vm->quitGame();
}
} else {
if (m_ButtonQuit->IsActive()) {
@@ -1280,7 +1280,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
CORO_BEGIN_CODE(_ctx);
- _ctx->curTime = _vm->GetTime();
+ _ctx->curTime = _vm->getTime();
#define FADE_SPEED 20
#define SYNC (_ctx->curTime-m_FadeTime) / 25
@@ -1336,7 +1336,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
if (m_FadeY > 480) {
m_FadeY = 480;
m_FadeStep++;
- _vm->HideLocation();
+ _vm->hideLocation();
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
@@ -1346,7 +1346,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
} else if (m_FadeStep == 7) {
// Menu OFF
- _vm->ShowLocation();
+ _vm->showLocation();
m_FadeStep++;
} else if (m_FadeStep == 8) {
@@ -1398,7 +1398,7 @@ bool RMOptionScreen::LoadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
diff = 10;
// Get the savegame filename for the given slot
- buf = _vm->GetSaveStateFileName(nState);
+ buf = _vm->getSaveStateFileName(nState);
// Try and open the savegame
f = g_system->getSavefileManager()->openForLoading(buf);
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index 3fa33d78ff..4642ee0ab7 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -109,7 +109,7 @@ void RMGfxEngine::OpenOptionScreen(CORO_PARAM, int type) {
CORO_INVOKE_3(m_opt.InitSaveMenuOnly, m_bigBuf, false, _ctx->bRes);
if (_ctx->bRes) {
- _vm->PauseSound(true);
+ _vm->pauseSound(true);
DisableInput();
m_inv.EndCombine();
@@ -119,7 +119,7 @@ void RMGfxEngine::OpenOptionScreen(CORO_PARAM, int type) {
m_point.SetSpecialPointer(RMPointer::PTR_NONE);
m_point.SetCustomPointer(NULL);
EnableMouse();
- _vm->GrabThumbnail();
+ _vm->grabThumbnail();
// Exists the IDLE to avoid premature death in loading
m_bMustEnterMenu = true;
@@ -161,7 +161,7 @@ void RMGfxEngine::DoFrame(CORO_PARAM, bool bDrawLocation) {
DisableMouse();
EnableInput();
mpalStartIdlePoll(m_nCurLoc);
- _vm->PauseSound(false);
+ _vm->pauseSound(false);
}
}
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index 539dd4e81b..1a245d9aba 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -343,7 +343,7 @@ bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
m_nCombine = m_inv[n - 1 + m_curPos];
nCombineObj = m_nCombine + 10000;
- _vm->PlayUtilSFX(1);
+ _vm->playUtilSFX(1);
return true;
}
}
@@ -409,7 +409,7 @@ void RMInventory::RightClick(const RMPoint &mpos) {
miniAction = 0;
m_nSelectObj = n - 1;
- _vm->PlayUtilSFX(0);
+ _vm->playUtilSFX(0);
}
}
@@ -530,7 +530,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
g_system->unlockMutex(m_csModifyInterface);
}
- if (_vm->GetEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_i)) {
+ if (_vm->getEngine()->GetInput().GetAsyncKeyState(Common::KEYCODE_i)) {
GLOBALS.bCfgInvLocked = !GLOBALS.bCfgInvLocked;
}
@@ -544,7 +544,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (!GLOBALS.bCfgInvNoScroll) {
m_state = OPENING;
m_curPutY = RM_SY - 1;
- m_curPutTime = _vm->GetTime();
+ m_curPutTime = _vm->getTime();
} else {
m_state = OPENED;
m_curPutY = RM_SY - 68;
@@ -554,13 +554,13 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (!GLOBALS.bCfgInvNoScroll) {
m_state = CLOSING;
m_curPutY = RM_SY - 68;
- m_curPutTime = _vm->GetTime();
+ m_curPutTime = _vm->getTime();
} else {
m_state = CLOSED;
}
}
} else if (m_state == OPENING) {
- while (m_curPutTime + INVSPEED < _vm->GetTime()) {
+ while (m_curPutTime + INVSPEED < _vm->getTime()) {
m_curPutY -= 3;
m_curPutTime += INVSPEED;
}
@@ -571,7 +571,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
}
} else if (m_state == CLOSING) {
- while (m_curPutTime + INVSPEED < _vm->GetTime()) {
+ while (m_curPutTime + INVSPEED < _vm->getTime()) {
m_curPutY += 3;
m_curPutTime += INVSPEED;
}
@@ -584,7 +584,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (!GLOBALS.bCfgInvNoScroll) {
m_state = OPENING;
m_curPutY = - 68;
- m_curPutTime = _vm->GetTime();
+ m_curPutTime = _vm->getTime();
} else {
m_state = OPENED;
m_curPutY = 0;
@@ -594,13 +594,13 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (!GLOBALS.bCfgInvNoScroll) {
m_state = CLOSING;
m_curPutY = -2;
- m_curPutTime = _vm->GetTime();
+ m_curPutTime = _vm->getTime();
} else {
m_state = CLOSED;
}
}
} else if (m_state == OPENING) {
- while (m_curPutTime + INVSPEED < _vm->GetTime()) {
+ while (m_curPutTime + INVSPEED < _vm->getTime()) {
m_curPutY += 3;
m_curPutTime += INVSPEED;
}
@@ -610,7 +610,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
m_curPutY = 0;
}
} else if (m_state == CLOSING) {
- while (m_curPutTime + INVSPEED < _vm->GetTime()) {
+ while (m_curPutTime + INVSPEED < _vm->getTime()) {
m_curPutY -= 3;
m_curPutTime += INVSPEED;
}
@@ -635,19 +635,19 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (miniAction != 1) {
miniInterface.SetPattern(2);
miniAction = 1;
- _vm->PlayUtilSFX(1);
+ _vm->playUtilSFX(1);
}
} else if (mpos.x >= startx + 40 && mpos.x < startx + 80) {
if (miniAction != 2) {
miniInterface.SetPattern(3);
miniAction = 2;
- _vm->PlayUtilSFX(1);
+ _vm->playUtilSFX(1);
}
} else if (mpos.x >= startx + 80 && mpos.x < startx + 108) {
if (miniAction != 3) {
miniInterface.SetPattern(4);
miniAction = 3;
- _vm->PlayUtilSFX(1);
+ _vm->playUtilSFX(1);
}
} else {
miniInterface.SetPattern(1);
@@ -799,7 +799,7 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
if (m_lastHotZone != _ctx->h) {
m_lastHotZone = _ctx->h;
- _vm->PlayUtilSFX(1);
+ _vm->playUtilSFX(1);
}
if (GLOBALS.bCfgInterTips) {
@@ -836,7 +836,7 @@ void RMInterface::Clicked(const RMPoint &mousepos) {
if (m_openStart.y + m_dimy > RM_SY) m_openStart.y = RM_SY - m_dimy;
// Play the sound effect
- _vm->PlayUtilSFX(0);
+ _vm->playUtilSFX(0);
}
bool RMInterface::Released(const RMPoint &mousepos, RMTonyAction &action) {
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index 512c28605e..b3768ca330 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -156,7 +156,7 @@ int RMPattern::Init(RMSfx *sfx, bool bPlayP0, byte *bFlag) {
int i;
// Read the current time
- m_nStartTime = _vm->GetTime();
+ m_nStartTime = _vm->getTime();
m_nCurSlot = 0;
// Find the first frame of the pattern
@@ -209,7 +209,7 @@ int RMPattern::Init(RMSfx *sfx, bool bPlayP0, byte *bFlag) {
}
int RMPattern::Update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx) {
- int CurTime = _vm->GetTime();
+ int CurTime = _vm->getTime();
// If the speed is 0, then the pattern never advances
if (m_speed == 0) {
@@ -420,7 +420,7 @@ void RMSfx::ReadFromStream(RMDataStream &ds, bool bLOX) {
ds.Read(raw, size);
// Create the sound effect
- m_fx = _vm->CreateSFX(raw);
+ m_fx = _vm->createSFX(raw);
m_fx->SetLoop(false);
// Close the read buffer which is no longer needed
@@ -2085,10 +2085,10 @@ bool RMLocation::Load(RMDataStream &ds) {
m_items = new RMItem[m_nItems];
- _vm->FreezeTime();
+ _vm->freezeTime();
for (i = 0; i < m_nItems && !ds.IsError(); i++)
ds >> m_items[i];
- _vm->UnfreezeTime();
+ _vm->unfreezeTime();
return ds.IsError();
}
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 12fc78c60c..16c530206c 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -621,7 +621,7 @@ void ScriptThread(CORO_PARAM, const void *param) {
CORO_BEGIN_CODE(_ctx);
- _ctx->dwStartTime = _vm->GetTime();
+ _ctx->dwStartTime = _vm->getTime();
_ctx->numHandles = 0;
// debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Moments: %u\n",s->nMoments);
@@ -629,9 +629,9 @@ void ScriptThread(CORO_PARAM, const void *param) {
// Sleep for the required time
if (s->Moment[_ctx->i].dwTime == -1) {
CORO_INVOKE_4(CoroScheduler.waitForMultipleObjects, _ctx->numHandles, cfHandles, true, CORO_INFINITE);
- _ctx->dwStartTime = _vm->GetTime();
+ _ctx->dwStartTime = _vm->getTime();
} else {
- _ctx->dwCurTime = _vm->GetTime();
+ _ctx->dwCurTime = _vm->getTime();
if (_ctx->dwCurTime < _ctx->dwStartTime + (s->Moment[_ctx->i].dwTime * 100)) {
// debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Sleeping %lums\n",_ctx->dwStartTime+(s->Moment[_ctx->i].dwTime*100)-_ctx->dwCurTime);
CORO_INVOKE_1(CoroScheduler.sleep, _ctx->dwStartTime+(s->Moment[_ctx->i].dwTime * 100) - _ctx->dwCurTime);
@@ -771,7 +771,7 @@ void ShutUpActionThread(CORO_PARAM, const void *param) {
_ctx->slotNumber = _vm->_initialLoadSlotNumber;
_vm->_initialLoadSlotNumber = -1;
- CORO_INVOKE_1(_vm->LoadState, _ctx->slotNumber);
+ CORO_INVOKE_1(_vm->loadState, _ctx->slotNumber);
}
@@ -903,7 +903,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
CopyMemory(_ctx->MyActions[_ctx->k].CmdNum, _ctx->curItem->Action[_ctx->j].CmdNum,
MAX_COMMANDS_PER_ACTION * sizeof(uint16));
- _ctx->MyActions[_ctx->k].dwLastTime = _vm->GetTime();
+ _ctx->MyActions[_ctx->k].dwLastTime = _vm->getTime();
_ctx->k++;
}
}
@@ -918,7 +918,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
while (1) {
/* Cerchiamo tra tutte le idle actions quella a cui manca meno tempo per
l'esecuzione */
- _ctx->curTime = _vm->GetTime();
+ _ctx->curTime = _vm->getTime();
_ctx->dwSleepTime = (uint32)-1L;
for (_ctx->k = 0;_ctx->k<_ctx->nIdleActions;_ctx->k++)
@@ -944,7 +944,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
_ctx->MyThreads[_ctx->i].nItem = 0;
}
- _ctx->curTime = _vm->GetTime();
+ _ctx->curTime = _vm->getTime();
/* Loop through all the necessary idle actions */
for (_ctx->k = 0; _ctx->k < _ctx->nIdleActions; _ctx->k++)
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index da63c23bab..c2350d14e4 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -59,7 +59,7 @@ TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Eng
TonyEngine::~TonyEngine() {
// Close the voice database
- CloseVoiceDatabase();
+ closeVoiceDatabase();
// Reset the coroutine scheduler
CoroScheduler.reset();
@@ -71,12 +71,12 @@ TonyEngine::~TonyEngine() {
* Run the game
*/
Common::Error TonyEngine::run() {
- Common::ErrorCode result = Init();
+ Common::ErrorCode result = init();
if (result != Common::kNoError)
return result;
- Play();
- Close();
+ play();
+ close();
return Common::kNoError;
}
@@ -84,7 +84,7 @@ Common::Error TonyEngine::run() {
/**
* Initialise the game
*/
-Common::ErrorCode TonyEngine::Init() {
+Common::ErrorCode TonyEngine::init() {
if (isCompressed()) {
Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember("data1.cab");
if (!stream)
@@ -97,11 +97,11 @@ Common::ErrorCode TonyEngine::Init() {
SearchMan.add("data1.cab", cabinet);
}
- m_hEndOfFrame = CoroScheduler.createEvent(false, false);
+ _hEndOfFrame = CoroScheduler.createEvent(false, false);
- m_bPaused = false;
- m_bDrawLocation = true;
- m_startTime = g_system->getMillis();
+ _bPaused = false;
+ _bDrawLocation = true;
+ _startTime = g_system->getMillis();
// Init static class fields
RMText::InitStatics();
@@ -114,8 +114,8 @@ Common::ErrorCode TonyEngine::Init() {
_window.Init();
// Initialise the function list
- Common::fill(FuncList, FuncList + 300, (LPCUSTOMFUNCTION)NULL);
- InitCustomFunctionMap();
+ Common::fill(_funcList, _funcList + 300, (LPCUSTOMFUNCTION)NULL);
+ initCustomFunctionMap();
// Initializes MPAL system, passing the custom functions list
Common::File f;
@@ -123,17 +123,17 @@ Common::ErrorCode TonyEngine::Init() {
return Common::kReadingFailed;
f.close();
- if (!mpalInit("ROASTED.MPC", "ROASTED.MPR", FuncList, FuncListStrings))
+ if (!mpalInit("ROASTED.MPC", "ROASTED.MPR", _funcList, _funcListStrings))
return Common::kUnknownError;
// Initialise the update resources
_resUpdate.Init("ROASTED.MPU");
// Initialise the music
- InitMusic();
+ initMusic();
// Initialise the voices database
- if (!OpenVoiceDatabase())
+ if (!openVoiceDatabase())
return Common::kReadingFailed;
// Initialise the boxes
@@ -144,7 +144,7 @@ Common::ErrorCode TonyEngine::Init() {
_theEngine.Init();
// Allocate space for thumbnails when saving the game
- m_curThumbnail = new uint16[160 * 120];
+ _curThumbnail = new uint16[160 * 120];
// Set up global defaults
GLOBALS.bCfgInvLocked = false;
@@ -164,13 +164,13 @@ Common::ErrorCode TonyEngine::Init() {
GLOBALS.nCfgDubbingVolume = 10;
GLOBALS.nCfgMusicVolume = 7;
GLOBALS.nCfgSFXVolume = 10;
- m_bQuitNow = false;
+ _bQuitNow = false;
return Common::kNoError;
}
-void TonyEngine::InitCustomFunctionMap() {
- INIT_CUSTOM_FUNCTION(FuncList, FuncListStrings);
+void TonyEngine::initCustomFunctionMap() {
+ INIT_CUSTOM_FUNCTION(_funcList, _funcListStrings);
}
/**
@@ -180,8 +180,8 @@ void TonyEngine::GUIError(const Common::String &msg) {
GUIErrorMessage(msg);
}
-void TonyEngine::PlayMusic(int nChannel, const char *fn, int nFX, bool bLoop, int nSync) {
- warning("TODO: TonyEngine::PlayMusic");
+void TonyEngine::playMusic(int nChannel, const char *fn, int nFX, bool bLoop, int nSync) {
+ warning("TODO: TonyEngine::playMusic");
// g_system->lockMutex(csMusic);
if (nChannel < 4)
@@ -192,8 +192,8 @@ void TonyEngine::PlayMusic(int nChannel, const char *fn, int nFX, bool bLoop, in
case 0:
case 1:
case 2:
- m_stream[nChannel]->Stop();
- m_stream[nChannel]->UnloadFile();
+ _stream[nChannel]->Stop();
+ _stream[nChannel]->UnloadFile();
break;
case 22:
@@ -222,7 +222,7 @@ void TonyEngine::PlayMusic(int nChannel, const char *fn, int nFX, bool bLoop, in
else
nextChannel = nChannel + 1;
DWORD id;
- HANDLE hThread = CreateThread(NULL, 10240, (LPTHREAD_START_ROUTINE)DoNextMusic, m_stream, 0, &id);
+ HANDLE hThread = CreateThread(NULL, 10240, (LPTHREAD_START_ROUTINE)DoNextMusic, _stream, 0, &id);
SetThreadPriority(hThread, THREAD_PRIORITY_HIGHEST);
} else if (nFX == 44) { // Cambia canale e lascia finire il primo
if (flipflop)
@@ -230,103 +230,103 @@ void TonyEngine::PlayMusic(int nChannel, const char *fn, int nFX, bool bLoop, in
else
nextChannel = nChannel + 1;
- m_stream[nextChannel]->Stop();
- m_stream[nextChannel]->UnloadFile();
+ _stream[nextChannel]->Stop();
+ _stream[nextChannel]->UnloadFile();
if (!getIsDemo()) {
- if (!m_stream[nextChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync))
+ if (!_stream[nextChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync))
theGame.Abort();
} else {
- m_stream[nextChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync);
+ _stream[nextChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync);
}
- m_stream[nextChannel]->SetLoop(bLoop);
- m_stream[nextChannel]->Play();
+ _stream[nextChannel]->SetLoop(bLoop);
+ _stream[nextChannel]->Play();
flipflop = 1 - flipflop;
} else {
if (!getIsDemo()) {
- if (!m_stream[nChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync))
+ if (!_stream[nChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync))
theGame.Abort();
} else {
- m_stream[nChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync);
+ _stream[nChannel]->LoadFile(path_buffer, FPCODEC_ADPCM, nSync);
}
- m_stream[nChannel]->SetLoop(bLoop);
- m_stream[nChannel]->Play();
+ _stream[nChannel]->SetLoop(bLoop);
+ _stream[nChannel]->Play();
}
#endif
// g_system->unlockMutex(csMusic);
}
-void TonyEngine::PlaySFX(int nChannel, int nFX) {
- if (m_sfx[nChannel] == NULL)
+void TonyEngine::playSFX(int nChannel, int nFX) {
+ if (_sfx[nChannel] == NULL)
return;
switch (nFX) {
case 0:
- m_sfx[nChannel]->SetLoop(false);
+ _sfx[nChannel]->SetLoop(false);
break;
case 1:
- m_sfx[nChannel]->SetLoop(true);
+ _sfx[nChannel]->SetLoop(true);
break;
}
- m_sfx[nChannel]->Play();
+ _sfx[nChannel]->Play();
}
-void TonyEngine::StopMusic(int nChannel) {
+void TonyEngine::stopMusic(int nChannel) {
// g_system->lockMutex(csMusic);
if (nChannel < 4)
- m_stream[nChannel + GLOBALS.flipflop]->Stop();
+ _stream[nChannel + GLOBALS.flipflop]->Stop();
else
- m_stream[nChannel]->Stop();
+ _stream[nChannel]->Stop();
// g_system->unlockMutex(csMusic);
}
-void TonyEngine::StopSFX(int nChannel) {
- m_sfx[nChannel]->Stop();
+void TonyEngine::stopSFX(int nChannel) {
+ _sfx[nChannel]->Stop();
}
-void TonyEngine::PlayUtilSFX(int nChannel, int nFX) {
- if (m_utilSfx[nChannel] == NULL)
+void TonyEngine::playUtilSFX(int nChannel, int nFX) {
+ if (_utilSfx[nChannel] == NULL)
return;
switch (nFX) {
case 0:
- m_utilSfx[nChannel]->SetLoop(false);
+ _utilSfx[nChannel]->SetLoop(false);
break;
case 1:
- m_utilSfx[nChannel]->SetLoop(true);
+ _utilSfx[nChannel]->SetLoop(true);
break;
}
- m_utilSfx[nChannel]->SetVolume(52);
- m_utilSfx[nChannel]->Play();
+ _utilSfx[nChannel]->SetVolume(52);
+ _utilSfx[nChannel]->Play();
}
-void TonyEngine::StopUtilSFX(int nChannel) {
- m_utilSfx[nChannel]->Stop();
+void TonyEngine::stopUtilSFX(int nChannel) {
+ _utilSfx[nChannel]->Stop();
}
-void TonyEngine::PreloadSFX(int nChannel, const char *fn) {
- if (m_sfx[nChannel] != NULL) {
- m_sfx[nChannel]->Stop();
- m_sfx[nChannel]->Release();
- m_sfx[nChannel] = NULL;
+void TonyEngine::preloadSFX(int nChannel, const char *fn) {
+ if (_sfx[nChannel] != NULL) {
+ _sfx[nChannel]->Stop();
+ _sfx[nChannel]->Release();
+ _sfx[nChannel] = NULL;
}
- _theSound.CreateSfx(&m_sfx[nChannel]);
+ _theSound.CreateSfx(&_sfx[nChannel]);
- m_sfx[nChannel]->LoadFile(fn, FPCODEC_ADPCM);
+ _sfx[nChannel]->LoadFile(fn, FPCODEC_ADPCM);
}
-FPSFX *TonyEngine::CreateSFX(byte *buf) {
+FPSFX *TonyEngine::createSFX(byte *buf) {
FPSFX *sfx;
_theSound.CreateSfx(&sfx);
@@ -334,106 +334,105 @@ FPSFX *TonyEngine::CreateSFX(byte *buf) {
return sfx;
}
-void TonyEngine::PreloadUtilSFX(int nChannel, const char *fn) {
- warning("TonyEngine::PreloadUtilSFX");
+void TonyEngine::preloadUtilSFX(int nChannel, const char *fn) {
+ warning("TonyEngine::preloadUtilSFX");
}
-void TonyEngine::UnloadAllSFX(void) {
- warning("TonyEngine::UnloadAllSFX");
+void TonyEngine::unloadAllSFX(void) {
+ warning("TonyEngine::unloadAllSFX");
}
-void TonyEngine::UnloadAllUtilSFX(void) {
- warning("TonyEngine::UnloadAllUtilSFX");
+void TonyEngine::unloadAllUtilSFX(void) {
+ warning("TonyEngine::unloadAllUtilSFX");
}
-void TonyEngine::InitMusic() {
+void TonyEngine::initMusic() {
int i;
_theSound.Init(/*_window*/);
_theSound.SetMasterVolume(63);
for (i = 0; i < 6; i++)
- _theSound.CreateStream(&m_stream[i]);
+ _theSound.CreateStream(&_stream[i]);
for (i = 0; i < MAX_SFX_CHANNELS; i++) {
- m_sfx[i] = m_utilSfx[i] = NULL;
+ _sfx[i] = _utilSfx[i] = NULL;
}
// Create the mutex for controlling music access
// csMusic = g_system->createMutex();
// Preload sound effects
- PreloadUtilSFX(0, "U01.ADP"); // Reversed!!
- PreloadUtilSFX(1, "U02.ADP");
+ preloadUtilSFX(0, "U01.ADP"); // Reversed!!
+ preloadUtilSFX(1, "U02.ADP");
}
-void TonyEngine::CloseMusic() {
+void TonyEngine::closeMusic() {
for (int i = 0; i < 6; i++) {
- m_stream[i]->Stop();
- m_stream[i]->UnloadFile();
- m_stream[i]->Release();
+ _stream[i]->Stop();
+ _stream[i]->UnloadFile();
+ _stream[i]->Release();
}
// g_system->deleteMutex(csMusic);
- UnloadAllSFX();
- UnloadAllUtilSFX();
+ unloadAllSFX();
+ unloadAllUtilSFX();
}
-void TonyEngine::PauseSound(bool bPause) {
+void TonyEngine::pauseSound(bool bPause) {
}
-void TonyEngine::SetMusicVolume(int nChannel, int volume) {
+void TonyEngine::setMusicVolume(int nChannel, int volume) {
}
-int TonyEngine::GetMusicVolume(int nChannel) {
+int TonyEngine::getMusicVolume(int nChannel) {
return 255;
}
-
-Common::String TonyEngine::GetSaveStateFileName(int n) {
+Common::String TonyEngine::getSaveStateFileName(int n) {
return Common::String::format("tony.%03d", n);
}
-void TonyEngine::AutoSave(CORO_PARAM) {
+void TonyEngine::autoSave(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
Common::String buf;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- GrabThumbnail();
+ grabThumbnail();
CORO_INVOKE_0(MainWaitFrame);
CORO_INVOKE_0(MainWaitFrame);
MainFreeze();
- _ctx->buf = GetSaveStateFileName(0);
- _theEngine.SaveState(_ctx->buf, (byte *)m_curThumbnail, "Autosave");
+ _ctx->buf = getSaveStateFileName(0);
+ _theEngine.SaveState(_ctx->buf, (byte *)_curThumbnail, "Autosave");
MainUnfreeze();
CORO_END_CODE;
}
-void TonyEngine::SaveState(int n, const char *name) {
- Common::String buf = GetSaveStateFileName(n);
- _theEngine.SaveState(buf.c_str(), (byte *)m_curThumbnail, name);
+void TonyEngine::saveState(int n, const char *name) {
+ Common::String buf = getSaveStateFileName(n);
+ _theEngine.SaveState(buf.c_str(), (byte *)_curThumbnail, name);
}
-void TonyEngine::LoadState(CORO_PARAM, int n) {
+void TonyEngine::loadState(CORO_PARAM, int n) {
CORO_BEGIN_CONTEXT;
Common::String buf;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- _ctx->buf = GetSaveStateFileName(n);
+ _ctx->buf = getSaveStateFileName(n);
CORO_INVOKE_1(_theEngine.LoadState, _ctx->buf.c_str());
CORO_END_CODE;
}
-bool TonyEngine::OpenVoiceDatabase() {
+bool TonyEngine::openVoiceDatabase() {
char id[4];
uint32 numfiles;
@@ -459,9 +458,9 @@ bool TonyEngine::OpenVoiceDatabase() {
for (uint32 i = 0; i < numfiles; ++i) {
VoiceHeader vh;
- vh.offset = _vdbFP.readUint32LE();
- vh.code = _vdbFP.readUint32LE();
- vh.parts = _vdbFP.readUint32LE();
+ vh._offset = _vdbFP.readUint32LE();
+ vh._code = _vdbFP.readUint32LE();
+ vh._parts = _vdbFP.readUint32LE();
_voices.push_back(vh);
}
@@ -469,7 +468,7 @@ bool TonyEngine::OpenVoiceDatabase() {
return true;
}
-void TonyEngine::CloseVoiceDatabase() {
+void TonyEngine::closeVoiceDatabase() {
if (_vdbFP.isOpen())
_vdbFP.close();
@@ -477,23 +476,23 @@ void TonyEngine::CloseVoiceDatabase() {
_voices.clear();
}
-void TonyEngine::GrabThumbnail(void) {
- _window.GrabThumbnail(m_curThumbnail);
+void TonyEngine::grabThumbnail(void) {
+ _window.GrabThumbnail(_curThumbnail);
}
-void TonyEngine::OptionScreen(void) {
+void TonyEngine::optionScreen(void) {
}
-void TonyEngine::OpenInitLoadMenu(CORO_PARAM) {
+void TonyEngine::openInitLoadMenu(CORO_PARAM) {
_theEngine.OpenOptionScreen(coroParam, 1);
}
-void TonyEngine::OpenInitOptions(CORO_PARAM) {
+void TonyEngine::openInitOptions(CORO_PARAM) {
_theEngine.OpenOptionScreen(coroParam, 2);
}
-void TonyEngine::Abort(void) {
- m_bQuitNow = true;
+void TonyEngine::abortGame(void) {
+ _bQuitNow = true;
}
/**
@@ -504,7 +503,7 @@ void TonyEngine::Abort(void) {
* process. If it ever proves a problem, we may have to look into whether it's feasible to have it still remain
* in the outer 'main' process.
*/
-void TonyEngine::PlayProcess(CORO_PARAM, const void *param) {
+void TonyEngine::playProcess(CORO_PARAM, const void *param) {
CORO_BEGIN_CONTEXT;
Common::String fn;
CORO_END_CONTEXT(_ctx);
@@ -517,7 +516,7 @@ void TonyEngine::PlayProcess(CORO_PARAM, const void *param) {
for (;;) {
// If a savegame needs to be loaded, then do so
if (_vm->_loadSlotNumber != -1 && GLOBALS.GfxEngine != NULL) {
- _ctx->fn = GetSaveStateFileName(_vm->_loadSlotNumber);
+ _ctx->fn = getSaveStateFileName(_vm->_loadSlotNumber);
CORO_INVOKE_1(GLOBALS.GfxEngine->LoadState, _ctx->fn);
_vm->_loadSlotNumber = -1;
}
@@ -526,13 +525,13 @@ void TonyEngine::PlayProcess(CORO_PARAM, const void *param) {
CORO_INVOKE_1(CoroScheduler.sleep, 50);
// Call the engine to handle the next frame
- CORO_INVOKE_1(_vm->_theEngine.DoFrame, _vm->m_bDrawLocation);
+ CORO_INVOKE_1(_vm->_theEngine.DoFrame, _vm->_bDrawLocation);
// Warns that a frame is finished
- CoroScheduler.pulseEvent(_vm->m_hEndOfFrame);
+ CoroScheduler.pulseEvent(_vm->_hEndOfFrame);
// Handle drawing the frame
- if (!_vm->m_bPaused) {
+ if (!_vm->_bPaused) {
if (!_vm->_theEngine.m_bWiping)
_vm->_window.GetNewFrame(_vm->_theEngine, NULL);
else
@@ -552,12 +551,12 @@ void TonyEngine::PlayProcess(CORO_PARAM, const void *param) {
/**
* Play the game
*/
-void TonyEngine::Play(void) {
+void TonyEngine::play(void) {
// Create the game player process
- CoroScheduler.createProcess(PlayProcess, NULL);
+ CoroScheduler.createProcess(playProcess, NULL);
// Loop through calling the scheduler until it's time for the game to quit
- while (!shouldQuit() && !m_bQuitNow) {
+ while (!shouldQuit() && !_bQuitNow) {
// Delay for a brief amount
g_system->delayMillis(10);
@@ -566,18 +565,16 @@ void TonyEngine::Play(void) {
}
}
-
-
-void TonyEngine::Close(void) {
- CloseMusic();
- CoroScheduler.closeEvent(m_hEndOfFrame);
+void TonyEngine::close(void) {
+ closeMusic();
+ CoroScheduler.closeEvent(_hEndOfFrame);
_theBoxes.Close();
_theEngine.Close();
_window.Close();
- delete[] m_curThumbnail;
+ delete[] _curThumbnail;
}
-void TonyEngine::SwitchFullscreen(bool bFull) {
+void TonyEngine::switchFullscreen(bool bFull) {
_window.SwitchFullscreen(bFull);
_theEngine.SwitchFullscreen(bFull);
}
@@ -586,21 +583,20 @@ void TonyEngine::GDIControl(bool bCon) {
_theEngine.GDIControl(bCon);
}
-
-void TonyEngine::FreezeTime(void) {
- m_bTimeFreezed = true;
- m_nTimeFreezed = GetTime() - m_startTime;
+void TonyEngine::freezeTime(void) {
+ _bTimeFreezed = true;
+ _nTimeFreezed = getTime() - _startTime;
}
-void TonyEngine::UnfreezeTime(void) {
- m_bTimeFreezed = false;
+void TonyEngine::unfreezeTime(void) {
+ _bTimeFreezed = false;
}
/**
* Returns the millisecond timer
*/
-uint32 TonyEngine::GetTime() {
+uint32 TonyEngine::getTime() {
return g_system->getMillis();
}
@@ -621,9 +617,9 @@ Common::Error TonyEngine::saveGameState(int slot, const Common::String &desc) {
return Common::kUnknownError;
RMSnapshot s;
- s.GrabScreenshot(*GLOBALS.GfxEngine, 4, m_curThumbnail);
+ s.GrabScreenshot(*GLOBALS.GfxEngine, 4, _curThumbnail);
- GLOBALS.GfxEngine->SaveState(GetSaveStateFileName(slot), (byte *)m_curThumbnail, desc);
+ GLOBALS.GfxEngine->SaveState(getSaveStateFileName(slot), (byte *)_curThumbnail, desc);
return Common::kNoError;
}
diff --git a/engines/tony/tony.h b/engines/tony/tony.h
index 78e9abd476..83543f8022 100644
--- a/engines/tony/tony.h
+++ b/engines/tony/tony.h
@@ -72,32 +72,32 @@ struct TonyGameDescription;
#define MAX_SFX_CHANNELS 32
struct VoiceHeader {
- int offset;
- int code;
- int parts;
+ int _offset;
+ int _code;
+ int _parts;
};
#define VOICE_HEADER_SIZE 12
class TonyEngine : public Engine {
private:
- Common::ErrorCode Init();
- void InitMusic();
- void CloseMusic();
- bool OpenVoiceDatabase();
- void CloseVoiceDatabase();
- void InitCustomFunctionMap();
- static void PlayProcess(CORO_PARAM, const void *param);
+ Common::ErrorCode init();
+ void initMusic();
+ void closeMusic();
+ bool openVoiceDatabase();
+ void closeVoiceDatabase();
+ void initCustomFunctionMap();
+ static void playProcess(CORO_PARAM, const void *param);
protected:
// Engine APIs
virtual Common::Error run();
virtual bool hasFeature(EngineFeature f) const;
public:
- LPCUSTOMFUNCTION FuncList[300];
- Common::String FuncListStrings[300];
+ LPCUSTOMFUNCTION _funcList[300];
+ Common::String _funcListStrings[300];
Common::RandomSource _randomSource;
MPAL::MemoryManager _memoryManager;
RMResUpdate _resUpdate;
- uint32 m_hEndOfFrame;
+ uint32 _hEndOfFrame;
Common::File _vdbFP;
Common::Array<VoiceHeader> _voices;
FPSOUND _theSound;
@@ -115,14 +115,14 @@ public:
DD_BASE2
};
- FPSTREAM *m_stream[6];
- FPSFX *m_sfx[MAX_SFX_CHANNELS];
- FPSFX *m_utilSfx[MAX_SFX_CHANNELS];
- RMFont *fonts[2];
- bool m_bPaused;
- bool m_bDrawLocation;
- int m_startTime;
- uint16 *m_curThumbnail;
+ FPSTREAM *_stream[6];
+ FPSFX *_sfx[MAX_SFX_CHANNELS];
+ FPSFX *_utilSfx[MAX_SFX_CHANNELS];
+// RMFont *_fonts[2];
+ bool _bPaused;
+ bool _bDrawLocation;
+ int _startTime;
+ uint16 *_curThumbnail;
int _initialLoadSlotNumber;
int _loadSlotNumber;
@@ -131,9 +131,9 @@ public:
RMWindow _window;
RMGfxEngine _theEngine;
- bool m_bQuitNow;
- bool m_bTimeFreezed;
- int m_nTimeFreezed;
+ bool _bQuitNow;
+ bool _bTimeFreezed;
+ int _nTimeFreezed;
public:
TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc);
virtual ~TonyEngine();
@@ -144,7 +144,7 @@ public:
uint16 getVersion() const;
bool getIsDemo() const;
bool isCompressed() const;
- RMGfxEngine *GetEngine() {
+ RMGfxEngine *getEngine() {
return &_theEngine;
}
void GUIError(const Common::String &msg);
@@ -157,70 +157,70 @@ public:
// Warn when are being controlled by the GDI
void GDIControl(bool bCon);
- void Play();
- void Close();
- void Abort();
+ void play();
+ void close();
+ void abortGame();
- void GetDataDirectory(DATADIR dir, char *path);
+ void getDataDirectory(DATADIR dir, char *path);
- void SwitchFullscreen(bool bFull);
- void OptionScreen(void);
+ void switchFullscreen(bool bFull);
+ void optionScreen(void);
- void ShowLocation(void) {
- m_bDrawLocation = true;
+ void showLocation(void) {
+ _bDrawLocation = true;
}
- void HideLocation(void) {
- m_bDrawLocation = false;
+ void hideLocation(void) {
+ _bDrawLocation = false;
}
// Reads the time
- uint32 GetTime(void);
- void FreezeTime(void);
- void UnfreezeTime(void);
+ uint32 getTime(void);
+ void freezeTime(void);
+ void unfreezeTime(void);
// Music
// ******
- void PlayMusic(int nChannel, const char *fn, int nFX, bool bLoop, int nSync);
- void StopMusic(int nChannel);
+ void playMusic(int nChannel, const char *fn, int nFX, bool bLoop, int nSync);
+ void stopMusic(int nChannel);
- void PlaySFX(int nSfx, int nFX = 0);
- void StopSFX(int nSfx);
+ void playSFX(int nSfx, int nFX = 0);
+ void stopSFX(int nSfx);
- void PlayUtilSFX(int nSfx, int nFX = 0);
- void StopUtilSFX(int nSfx);
+ void playUtilSFX(int nSfx, int nFX = 0);
+ void stopUtilSFX(int nSfx);
- FPSFX *CreateSFX(byte *buf);
+ FPSFX *createSFX(byte *buf);
- void PreloadSFX(int nSfx, const char *fn);
- void UnloadAllSFX(void);
+ void preloadSFX(int nSfx, const char *fn);
+ void unloadAllSFX(void);
- void PreloadUtilSFX(int nSfx, const char *fn);
- void UnloadAllUtilSFX(void);
+ void preloadUtilSFX(int nSfx, const char *fn);
+ void unloadAllUtilSFX(void);
// Stop all the audio
- void PauseSound(bool bPause);
+ void pauseSound(bool bPause);
- void SetMusicVolume(int nChannel, int volume);
- int GetMusicVolume(int nChannel);
+ void setMusicVolume(int nChannel, int volume);
+ int getMusicVolume(int nChannel);
// Handle saving
- void AutoSave(CORO_PARAM);
- void SaveState(int n, const char *name);
- void LoadState(CORO_PARAM, int n);
- static Common::String GetSaveStateFileName(int n);
+ void autoSave(CORO_PARAM);
+ void saveState(int n, const char *name);
+ void loadState(CORO_PARAM, int n);
+ static Common::String getSaveStateFileName(int n);
// Get a thumbnail
- void GrabThumbnail(void);
- uint16 *GetThumbnail(void) {
- return m_curThumbnail;
+ void grabThumbnail(void);
+ uint16 *getThumbnail(void) {
+ return _curThumbnail;
}
- void Quit(void) {
- m_bQuitNow = true;
+ void quitGame(void) {
+ _bQuitNow = true;
}
- void OpenInitLoadMenu(CORO_PARAM);
- void OpenInitOptions(CORO_PARAM);
+ void openInitLoadMenu(CORO_PARAM);
+ void openInitOptions(CORO_PARAM);
};
// Global reference to the TonyEngine object
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index 71f95f8133..212899cde3 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -119,7 +119,7 @@ void RMTony::Init(void) {
ds.Close();
m_body.SetPattern(0);
- m_nTimeLastStep = _vm->GetTime();
+ m_nTimeLastStep = _vm->getTime();
}
@@ -141,7 +141,7 @@ void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
SetSpeed(GLOBALS.nCfgTonySpeed);
// Runs the normal character movement
- _ctx->time = _vm->GetTime();
+ _ctx->time = _vm->getTime();
do {
m_nTimeLastStep += (1000 / 40);