aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wintermute/Ad/AdEntity.cpp2
-rw-r--r--engines/wintermute/Ad/AdGame.cpp16
-rw-r--r--engines/wintermute/Ad/AdScene.cpp14
-rw-r--r--engines/wintermute/Base/BActiveRect.cpp2
-rw-r--r--engines/wintermute/Base/BGame.cpp228
-rw-r--r--engines/wintermute/Base/BGame.h90
-rw-r--r--engines/wintermute/Base/BObject.cpp4
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp2
-rw-r--r--engines/wintermute/Base/BScriptHolder.cpp4
-rw-r--r--engines/wintermute/Base/BSurfaceSDL.cpp6
-rw-r--r--engines/wintermute/Base/scriptables/ScEngine.cpp18
-rw-r--r--engines/wintermute/Base/scriptables/ScScript.cpp42
-rw-r--r--engines/wintermute/PlatformSDL.cpp4
-rw-r--r--engines/wintermute/UI/UIObject.cpp4
-rw-r--r--engines/wintermute/UI/UIWindow.cpp12
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.cpp8
-rw-r--r--engines/wintermute/wintermute.cpp4
17 files changed, 230 insertions, 230 deletions
diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp
index d3074c1562..89506045b8 100644
--- a/engines/wintermute/Ad/AdEntity.cpp
+++ b/engines/wintermute/Ad/AdEntity.cpp
@@ -603,7 +603,7 @@ HRESULT CAdEntity::update() {
if (_theora) {
int OffsetX, OffsetY;
- Game->GetOffset(&OffsetX, &OffsetY);
+ Game->getOffset(&OffsetX, &OffsetY);
_theora->_posX = _posX - OffsetX;
_theora->_posY = _posY - OffsetY;
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp
index ee8e3ca6c1..cd493c9471 100644
--- a/engines/wintermute/Ad/AdGame.cpp
+++ b/engines/wintermute/Ad/AdGame.cpp
@@ -206,7 +206,7 @@ HRESULT CAdGame::InitLoop() {
HRESULT res;
- res = CBGame::InitLoop();
+ res = CBGame::initLoop();
if (FAILED(res)) return res;
if (_scene) res = _scene->initLoop();
@@ -1105,10 +1105,10 @@ HRESULT CAdGame::showCursor() {
}
if (_activeObject && _selectedItem->_cursorHover && _activeObject->getExtendedFlag("usable")) {
if (!_smartItemCursor || _activeObject->canHandleEvent(_selectedItem->_name))
- return DrawCursor(_selectedItem->_cursorHover);
+ return drawCursor(_selectedItem->_cursorHover);
else
- return DrawCursor(_selectedItem->_cursorNormal);
- } else return DrawCursor(_selectedItem->_cursorNormal);
+ return drawCursor(_selectedItem->_cursorNormal);
+ } else return drawCursor(_selectedItem->_cursorNormal);
} else return CBGame::showCursor();
}
@@ -1316,7 +1316,7 @@ HRESULT CAdGame::persist(CBPersistMgr *persistMgr) {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdGame::LoadGame(const char *Filename) {
HRESULT ret = CBGame::LoadGame(Filename);
- if (SUCCEEDED(ret)) CSysClassRegistry::getInstance()->enumInstances(AfterLoadRegion, "CAdRegion", NULL);
+ if (SUCCEEDED(ret)) CSysClassRegistry::getInstance()->enumInstances(afterLoadRegion, "CAdRegion", NULL);
return ret;
}
@@ -1710,7 +1710,7 @@ HRESULT CAdGame::DisplayContent(bool Update, bool DisplayAll) {
if (Update) _scEngine->Tick();
POINT p;
- GetMousePos(&p);
+ getMousePos(&p);
_scene->update();
_scene->display();
@@ -1720,14 +1720,14 @@ HRESULT CAdGame::DisplayContent(bool Update, bool DisplayAll) {
DisplayWindows(true);
if (_inventoryBox) _inventoryBox->display();
if (_stateEx == GAME_WAITING_RESPONSE) _responseBox->display();
- if (_indicatorDisplay) DisplayIndicator();
+ if (_indicatorDisplay) displayIndicator();
if (Update || DisplayAll) {
// display normal windows
DisplayWindows(false);
- SetActiveObject(Game->_renderer->getObjectAt(p.x, p.y));
+ setActiveObject(Game->_renderer->getObjectAt(p.x, p.y));
// textual info
DisplaySentences(_state == GAME_FROZEN);
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp
index 04d3887f6c..205f7f12a5 100644
--- a/engines/wintermute/Ad/AdScene.cpp
+++ b/engines/wintermute/Ad/AdScene.cpp
@@ -870,10 +870,10 @@ HRESULT CAdScene::traverseNodes(bool Update) {
// prepare viewport
bool PopViewport = false;
if (_viewport && !Game->_editorMode) {
- Game->PushViewport(_viewport);
+ Game->pushViewport(_viewport);
PopViewport = true;
} else if (AdGame->_sceneViewport && !Game->_editorMode) {
- Game->PushViewport(AdGame->_sceneViewport);
+ Game->pushViewport(AdGame->_sceneViewport);
PopViewport = true;
}
@@ -934,7 +934,7 @@ HRESULT CAdScene::traverseNodes(bool Update) {
double HeightRatio = ScrollableY <= 0 ? 0 : ((double)(_offsetTop) / (double)ScrollableY);
int OrigX, OrigY;
- Game->GetOffset(&OrigX, &OrigY);
+ Game->getOffset(&OrigX, &OrigY);
@@ -965,14 +965,14 @@ HRESULT CAdScene::traverseNodes(bool Update) {
if (_paralaxScrolling) {
int OffsetX = (int)(WidthRatio * (_layers[j]->_width - ViewportWidth) - ViewportX);
int OffsetY = (int)(HeightRatio * (_layers[j]->_height - ViewportHeight) - ViewportY);
- Game->SetOffset(OffsetX, OffsetY);
+ Game->setOffset(OffsetX, OffsetY);
Game->_offsetPercentX = (float)OffsetX / ((float)_layers[j]->_width - ViewportWidth) * 100.0f;
Game->_offsetPercentY = (float)OffsetY / ((float)_layers[j]->_height - ViewportHeight) * 100.0f;
//Game->QuickMessageForm("%d %f", OffsetX+ViewportX, Game->_offsetPercentX);
} else {
- Game->SetOffset(_offsetLeft - ViewportX, _offsetTop - ViewportY);
+ Game->setOffset(_offsetLeft - ViewportX, _offsetTop - ViewportY);
Game->_offsetPercentX = (float)(_offsetLeft - ViewportX) / ((float)_layers[j]->_width - ViewportWidth) * 100.0f;
Game->_offsetPercentY = (float)(_offsetTop - ViewportY) / ((float)_layers[j]->_height - ViewportHeight) * 100.0f;
@@ -1017,7 +1017,7 @@ HRESULT CAdScene::traverseNodes(bool Update) {
// restore state
- Game->SetOffset(OrigX, OrigY);
+ Game->setOffset(OrigX, OrigY);
Game->_renderer->setup2D();
// display/update fader
@@ -1026,7 +1026,7 @@ HRESULT CAdScene::traverseNodes(bool Update) {
else _fader->display();
}
- if (PopViewport) Game->PopViewport();
+ if (PopViewport) Game->popViewport();
return S_OK;
}
diff --git a/engines/wintermute/Base/BActiveRect.cpp b/engines/wintermute/Base/BActiveRect.cpp
index 46dd6ed51f..72962dbf1e 100644
--- a/engines/wintermute/Base/BActiveRect.cpp
+++ b/engines/wintermute/Base/BActiveRect.cpp
@@ -88,7 +88,7 @@ CBActiveRect::~CBActiveRect() {
void CBActiveRect::clipRect() {
RECT rc;
bool CustomViewport;
- Game->GetCurrentViewportRect(&rc, &CustomViewport);
+ Game->getCurrentViewportRect(&rc, &CustomViewport);
CBRenderer *Rend = Game->_renderer;
if (!CustomViewport) {
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 93c063a3b3..92c611698b 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -284,7 +284,7 @@ CBGame::~CBGame() {
LOG(0, "");
LOG(0, "Shutting down...");
- GetDebugMgr()->OnGameShutdown();
+ getDebugMgr()->OnGameShutdown();
_registry->WriteBool("System", "LastRun", true);
@@ -597,19 +597,19 @@ void CBGame::LOG(HRESULT res, LPCSTR fmt, ...) {
//////////////////////////////////////////////////////////////////////////
-void CBGame::SetEngineLogCallback(ENGINE_LOG_CALLBACK callback, void *data) {
+void CBGame::setEngineLogCallback(ENGINE_LOG_CALLBACK callback, void *data) {
_engineLogCallback = callback;
_engineLogCallbackData = data;
}
//////////////////////////////////////////////////////////////////////
-HRESULT CBGame::InitLoop() {
+HRESULT CBGame::initLoop() {
_viewportSP = -1;
_currentTime = CBPlatform::GetTime();
- GetDebugMgr()->OnGameTick();
+ getDebugMgr()->OnGameTick();
_renderer->initLoop();
_soundMgr->initLoop();
UpdateMusicCrossfade();
@@ -643,7 +643,7 @@ HRESULT CBGame::InitLoop() {
}
//Game->LOG(0, "%d", _fps);
- GetMousePos(&_mousePos);
+ getMousePos(&_mousePos);
_focusedWindow = NULL;
for (int i = _windows.GetSize() - 1; i >= 0; i--) {
@@ -662,25 +662,25 @@ HRESULT CBGame::InitLoop() {
//////////////////////////////////////////////////////////////////////
-HRESULT CBGame::InitInput(HINSTANCE hInst, HWND hWnd) {
+HRESULT CBGame::initInput(HINSTANCE hInst, HWND hWnd) {
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-int CBGame::GetSequence() {
+int CBGame::getSequence() {
return ++_sequence;
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::SetOffset(int offsetX, int offsetY) {
+void CBGame::setOffset(int offsetX, int offsetY) {
_offsetX = offsetX;
_offsetY = offsetY;
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::GetOffset(int *offsetX, int *offsetY) {
+void CBGame::getOffset(int *offsetX, int *offsetY) {
if (offsetX != NULL) *offsetX = _offsetX;
if (offsetY != NULL) *offsetY = _offsetY;
}
@@ -1002,7 +1002,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Msg") == 0) {
stack->correctParams(1);
- QuickMessage(stack->pop()->getString());
+ quickMessage(stack->pop()->getString());
stack->pushNULL();
return S_OK;
}
@@ -1130,7 +1130,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
uint32 LoopStart = (uint32)(ValLoopStart->isNULL() ? 0 : ValLoopStart->getInt());
- if (FAILED(PlayMusic(channel, filename, Looping, LoopStart))) stack->pushBool(false);
+ if (FAILED(playMusic(channel, filename, Looping, LoopStart))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -1147,7 +1147,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
channel = stack->pop()->getInt();
}
- if (FAILED(StopMusic(channel))) stack->pushBool(false);
+ if (FAILED(stopMusic(channel))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -1164,7 +1164,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
channel = stack->pop()->getInt();
}
- if (FAILED(PauseMusic(channel))) stack->pushBool(false);
+ if (FAILED(pauseMusic(channel))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -1180,7 +1180,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
channel = stack->pop()->getInt();
}
- if (FAILED(ResumeMusic(channel))) stack->pushBool(false);
+ if (FAILED(resumeMusic(channel))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
}
@@ -1214,9 +1214,9 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
channel = stack->pop()->getInt();
}
- uint32 Time = stack->pop()->getInt();
+ uint32 time = stack->pop()->getInt();
- if (FAILED(SetMusicStartTime(channel, Time))) stack->pushBool(false);
+ if (FAILED(setMusicStartTime(channel, time))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
@@ -1930,7 +1930,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetWaitCursor") == 0) {
stack->correctParams(1);
- if (SUCCEEDED(SetWaitCursor(stack->pop()->getString()))) stack->pushBool(true);
+ if (SUCCEEDED(setWaitCursor(stack->pop()->getString()))) stack->pushBool(true);
else stack->pushBool(false);
return S_OK;
@@ -2570,7 +2570,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseX") == 0) {
_mousePos.x = value->getInt();
- ResetMousePos();
+ resetMousePos();
return S_OK;
}
@@ -2579,7 +2579,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseY") == 0) {
_mousePos.y = value->getInt();
- ResetMousePos();
+ resetMousePos();
return S_OK;
}
@@ -2785,7 +2785,7 @@ HRESULT CBGame::DisplayQuickMsg() {
#define MAX_QUICK_MSG 5
//////////////////////////////////////////////////////////////////////////
-void CBGame::QuickMessage(const char *text) {
+void CBGame::quickMessage(const char *text) {
if (_quickMessages.GetSize() >= MAX_QUICK_MSG) {
delete _quickMessages[0];
_quickMessages.RemoveAt(0);
@@ -2795,7 +2795,7 @@ void CBGame::QuickMessage(const char *text) {
//////////////////////////////////////////////////////////////////////////
-void CBGame::QuickMessageForm(LPSTR fmt, ...) {
+void CBGame::quickMessageForm(LPSTR fmt, ...) {
char buff[256];
va_list va;
@@ -2803,7 +2803,7 @@ void CBGame::QuickMessageForm(LPSTR fmt, ...) {
vsprintf(buff, fmt, va);
va_end(va);
- QuickMessage(buff);
+ quickMessage(buff);
}
@@ -2844,7 +2844,7 @@ HRESULT CBGame::UnregisterObject(CBObject *object) {
for (i = 0; i < _regObjects.GetSize(); i++) {
if (_regObjects[i] == object) {
_regObjects.RemoveAt(i);
- if (!_loadInProgress) CSysClassRegistry::getInstance()->enumInstances(InvalidateValues, "CScValue", (void *)object);
+ if (!_loadInProgress) CSysClassRegistry::getInstance()->enumInstances(invalidateValues, "CScValue", (void *)object);
delete object;
return S_OK;
}
@@ -2855,7 +2855,7 @@ HRESULT CBGame::UnregisterObject(CBObject *object) {
//////////////////////////////////////////////////////////////////////////
-void CBGame::InvalidateValues(void *value, void *data) {
+void CBGame::invalidateValues(void *value, void *data) {
CScValue *val = (CScValue *)value;
if (val->isNative() && val->getNative() == data) {
if (!val->_persistent && ((CBScriptable *)data)->_refCount == 1) {
@@ -3149,8 +3149,8 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Debug") == 0) {
stack->correctParams(0);
- if (Game->GetDebugMgr()->_enabled) {
- Game->GetDebugMgr()->OnScriptHitBreakpoint(script);
+ if (Game->getDebugMgr()->_enabled) {
+ Game->getDebugMgr()->OnScriptHitBreakpoint(script);
script->Sleep(0);
}
stack->pushNULL();
@@ -3212,12 +3212,12 @@ HRESULT CBGame::showCursor() {
if (_cursorHidden) return S_OK;
if (!_interactive && Game->_state == GAME_RUNNING) {
- if (_cursorNoninteractive) return DrawCursor(_cursorNoninteractive);
+ if (_cursorNoninteractive) return drawCursor(_cursorNoninteractive);
} else {
if (_activeObject && !FAILED(_activeObject->showCursor())) return S_OK;
else {
- if (_activeObject && _activeCursor && _activeObject->getExtendedFlag("usable")) return DrawCursor(_activeCursor);
- else if (_cursor) return DrawCursor(_cursor);
+ if (_activeObject && _activeCursor && _activeObject->getExtendedFlag("usable")) return drawCursor(_activeCursor);
+ else if (_cursor) return drawCursor(_cursor);
}
}
return E_FAIL;
@@ -3287,7 +3287,7 @@ HRESULT CBGame::LoadGame(int slot) {
//////////////////////////////////////////////////////////////////////////
HRESULT CBGame::LoadGame(const char *filename) {
LOG(0, "Loading game '%s'...", filename);
- GetDebugMgr()->OnGameShutdown();
+ getDebugMgr()->OnGameShutdown();
HRESULT ret;
@@ -3322,7 +3322,7 @@ HRESULT CBGame::LoadGame(const char *filename) {
DisplayContent(true, false);
//_renderer->flip();
- GetDebugMgr()->OnGameInit();
+ getDebugMgr()->OnGameInit();
load_finish:
_dEBUG_AbsolutePathWarning = true;
@@ -3342,11 +3342,11 @@ load_finish:
//////////////////////////////////////////////////////////////////////////
HRESULT CBGame::InitAfterLoad() {
- CSysClassRegistry::getInstance()->enumInstances(AfterLoadRegion, "CBRegion", NULL);
- CSysClassRegistry::getInstance()->enumInstances(AfterLoadSubFrame, "CBSubFrame", NULL);
- CSysClassRegistry::getInstance()->enumInstances(AfterLoadSound, "CBSound", NULL);
- CSysClassRegistry::getInstance()->enumInstances(AfterLoadFont, "CBFontTT", NULL);
- CSysClassRegistry::getInstance()->enumInstances(AfterLoadScript, "CScScript", NULL);
+ CSysClassRegistry::getInstance()->enumInstances(afterLoadRegion, "CBRegion", NULL);
+ CSysClassRegistry::getInstance()->enumInstances(afterLoadSubFrame, "CBSubFrame", NULL);
+ CSysClassRegistry::getInstance()->enumInstances(afterLoadSound, "CBSound", NULL);
+ CSysClassRegistry::getInstance()->enumInstances(afterLoadFont, "CBFontTT", NULL);
+ CSysClassRegistry::getInstance()->enumInstances(afterLoadScript, "CScScript", NULL);
_scEngine->RefreshScriptBreakpoints();
if (_store) _store->afterLoad();
@@ -3355,35 +3355,35 @@ HRESULT CBGame::InitAfterLoad() {
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AfterLoadRegion(void *Region, void *Data) {
- ((CBRegion *)Region)->CreateRegion();
+void CBGame::afterLoadRegion(void *region, void *data) {
+ ((CBRegion *)region)->CreateRegion();
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AfterLoadSubFrame(void *Subframe, void *Data) {
- ((CBSubFrame *)Subframe)->setSurfaceSimple();
+void CBGame::afterLoadSubFrame(void *subframe, void *data) {
+ ((CBSubFrame *)subframe)->setSurfaceSimple();
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AfterLoadSound(void *Sound, void *Data) {
- ((CBSound *)Sound)->setSoundSimple();
+void CBGame::afterLoadSound(void *sound, void *data) {
+ ((CBSound *)sound)->setSoundSimple();
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AfterLoadFont(void *Font, void *Data) {
- ((CBFont *)Font)->afterLoad();
+void CBGame::afterLoadFont(void *font, void *data) {
+ ((CBFont *)font)->afterLoad();
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AfterLoadScript(void *script, void *data) {
+void CBGame::afterLoadScript(void *script, void *data) {
((CScScript *)script)->afterLoad();
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::DisplayWindows(bool InGame) {
+HRESULT CBGame::DisplayWindows(bool inGame) {
HRESULT res;
int i;
@@ -3401,7 +3401,7 @@ HRESULT CBGame::DisplayWindows(bool InGame) {
// display all windows
for (i = 0; i < _windows.GetSize(); i++) {
- if (_windows[i]->_visible && _windows[i]->_inGame == InGame) {
+ if (_windows[i]->_visible && _windows[i]->_inGame == inGame) {
res = _windows[i]->display();
if (FAILED(res)) return res;
@@ -3413,7 +3413,7 @@ HRESULT CBGame::DisplayWindows(bool InGame) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::PlayMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
+HRESULT CBGame::playMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
if (channel >= NUM_MUSIC_CHANNELS) {
Game->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
return E_FAIL;
@@ -3439,7 +3439,7 @@ HRESULT CBGame::PlayMusic(int channel, const char *filename, bool looping, uint3
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::StopMusic(int channel) {
+HRESULT CBGame::stopMusic(int channel) {
if (channel >= NUM_MUSIC_CHANNELS) {
Game->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
return E_FAIL;
@@ -3455,7 +3455,7 @@ HRESULT CBGame::StopMusic(int channel) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::PauseMusic(int channel) {
+HRESULT CBGame::pauseMusic(int channel) {
if (channel >= NUM_MUSIC_CHANNELS) {
Game->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
return E_FAIL;
@@ -3467,7 +3467,7 @@ HRESULT CBGame::PauseMusic(int channel) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::ResumeMusic(int channel) {
+HRESULT CBGame::resumeMusic(int channel) {
if (channel >= NUM_MUSIC_CHANNELS) {
Game->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
return E_FAIL;
@@ -3479,21 +3479,21 @@ HRESULT CBGame::ResumeMusic(int channel) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::SetMusicStartTime(int channel, uint32 Time) {
+HRESULT CBGame::setMusicStartTime(int channel, uint32 time) {
if (channel >= NUM_MUSIC_CHANNELS) {
Game->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
return E_FAIL;
}
- _musicStartTime[channel] = Time;
- if (_music[channel] && _music[channel]->isPlaying()) return _music[channel]->setPositionTime(Time);
+ _musicStartTime[channel] = time;
+ if (_music[channel] && _music[channel]->isPlaying()) return _music[channel]->setPositionTime(time);
else return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::LoadSettings(const char *filename) {
+HRESULT CBGame::loadSettings(const char *filename) {
TOKEN_TABLE_START(commands)
TOKEN_TABLE(SETTINGS)
TOKEN_TABLE(GAME)
@@ -3712,7 +3712,7 @@ HRESULT CBGame::persist(CBPersistMgr *persistMgr) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::FocusWindow(CUIWindow *Window) {
+HRESULT CBGame::focusWindow(CUIWindow *Window) {
CUIWindow *Prev = _focusedWindow;
int i;
@@ -3726,7 +3726,7 @@ HRESULT CBGame::FocusWindow(CUIWindow *Window) {
}
if (Window->_mode == WINDOW_NORMAL && Prev != Window && Game->ValidObject(Prev) && (Prev->_mode == WINDOW_EXCLUSIVE || Prev->_mode == WINDOW_SYSTEM_EXCLUSIVE))
- return FocusWindow(Prev);
+ return focusWindow(Prev);
else return S_OK;
}
}
@@ -3735,10 +3735,10 @@ HRESULT CBGame::FocusWindow(CUIWindow *Window) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::Freeze(bool IncludingMusic) {
+HRESULT CBGame::freeze(bool includingMusic) {
if (_freezeLevel == 0) {
_scEngine->PauseAll();
- _soundMgr->pauseAll(IncludingMusic);
+ _soundMgr->pauseAll(includingMusic);
_origState = _state;
_origInteractive = _interactive;
_interactive = true;
@@ -3751,7 +3751,7 @@ HRESULT CBGame::Freeze(bool IncludingMusic) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::Unfreeze() {
+HRESULT CBGame::unfreeze() {
if (_freezeLevel == 0) return S_OK;
_freezeLevel--;
@@ -3957,17 +3957,17 @@ HRESULT CBGame::EmptySaveSlot(int Slot) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::SetActiveObject(CBObject *Obj) {
+HRESULT CBGame::setActiveObject(CBObject *obj) {
// not-active when game is frozen
- if (Obj && !Game->_interactive && !Obj->_nonIntMouseEvents) {
- Obj = NULL;
+ if (obj && !Game->_interactive && !obj->_nonIntMouseEvents) {
+ obj = NULL;
}
- if (Obj == _activeObject) return S_OK;
+ if (obj == _activeObject) return S_OK;
if (_activeObject) _activeObject->applyEvent("MouseLeave");
//if(ValidObject(_activeObject)) _activeObject->applyEvent("MouseLeave");
- _activeObject = Obj;
+ _activeObject = obj;
if (_activeObject) {
_activeObject->applyEvent("MouseEntry");
}
@@ -3977,19 +3977,19 @@ HRESULT CBGame::SetActiveObject(CBObject *Obj) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::PushViewport(CBViewport *Viewport) {
+HRESULT CBGame::pushViewport(CBViewport *viewport) {
_viewportSP++;
- if (_viewportSP >= _viewportStack.GetSize()) _viewportStack.Add(Viewport);
- else _viewportStack[_viewportSP] = Viewport;
+ if (_viewportSP >= _viewportStack.GetSize()) _viewportStack.Add(viewport);
+ else _viewportStack[_viewportSP] = viewport;
- _renderer->setViewport(Viewport->getRect());
+ _renderer->setViewport(viewport->getRect());
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::PopViewport() {
+HRESULT CBGame::popViewport() {
_viewportSP--;
if (_viewportSP < -1) Game->LOG(0, "Fatal: Viewport stack underflow!");
@@ -4004,18 +4004,18 @@ HRESULT CBGame::PopViewport() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::GetCurrentViewportRect(RECT *Rect, bool *Custom) {
- if (Rect == NULL) return E_FAIL;
+HRESULT CBGame::getCurrentViewportRect(RECT *rect, bool *custom) {
+ if (rect == NULL) return E_FAIL;
else {
if (_viewportSP >= 0) {
- CBPlatform::CopyRect(Rect, _viewportStack[_viewportSP]->getRect());
- if (Custom) *Custom = true;
+ CBPlatform::CopyRect(rect, _viewportStack[_viewportSP]->getRect());
+ if (custom) *custom = true;
} else {
- CBPlatform::SetRect(Rect, _renderer->_drawOffsetX,
+ CBPlatform::SetRect(rect, _renderer->_drawOffsetX,
_renderer->_drawOffsetY,
_renderer->_width + _renderer->_drawOffsetX,
_renderer->_height + _renderer->_drawOffsetY);
- if (Custom) *Custom = false;
+ if (custom) *custom = false;
}
return S_OK;
@@ -4024,13 +4024,13 @@ HRESULT CBGame::GetCurrentViewportRect(RECT *Rect, bool *Custom) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::GetCurrentViewportOffset(int *OffsetX, int *OffsetY) {
+HRESULT CBGame::getCurrentViewportOffset(int *offsetX, int *offsetY) {
if (_viewportSP >= 0) {
- if (OffsetX) *OffsetX = _viewportStack[_viewportSP]->_offsetX;
- if (OffsetY) *OffsetY = _viewportStack[_viewportSP]->_offsetY;
+ if (offsetX) *offsetX = _viewportStack[_viewportSP]->_offsetX;
+ if (offsetY) *offsetY = _viewportStack[_viewportSP]->_offsetY;
} else {
- if (OffsetX) *OffsetX = 0;
- if (OffsetY) *OffsetY = 0;
+ if (offsetX) *offsetX = 0;
+ if (offsetY) *offsetY = 0;
}
return S_OK;
@@ -4038,26 +4038,26 @@ HRESULT CBGame::GetCurrentViewportOffset(int *OffsetX, int *OffsetY) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::WindowLoadHook(CUIWindow *Win, char **Buf, char **Params) {
+HRESULT CBGame::WindowLoadHook(CUIWindow *win, char **Buf, char **Params) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::WindowScriptMethodHook(CUIWindow *Win, CScScript *script, CScStack *stack, const char *name) {
+HRESULT CBGame::WindowScriptMethodHook(CUIWindow *win, CScScript *script, CScStack *stack, const char *name) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::SetInteractive(bool State) {
- _interactive = State;
- if (_transMgr) _transMgr->_origInteractive = State;
+void CBGame::SetInteractive(bool state) {
+ _interactive = state;
+ if (_transMgr) _transMgr->_origInteractive = state;
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::ResetMousePos() {
+void CBGame::resetMousePos() {
POINT p;
p.x = _mousePos.x + _renderer->_drawOffsetX;
p.y = _mousePos.y + _renderer->_drawOffsetY;
@@ -4067,8 +4067,8 @@ void CBGame::ResetMousePos() {
//////////////////////////////////////////////////////////////////////////
-void CBGame::SetResourceModule(HMODULE ResModule) {
- _resourceModule = ResModule;
+void CBGame::setResourceModule(HMODULE resModule) {
+ _resourceModule = resModule;
}
@@ -4082,14 +4082,14 @@ HRESULT CBGame::DisplayContent(bool update, bool displayAll) {
HRESULT CBGame::DisplayContentSimple() {
// fill black
_renderer->fill(0, 0, 0);
- if (_indicatorDisplay) DisplayIndicator();
+ if (_indicatorDisplay) displayIndicator();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::DisplayIndicator() {
+HRESULT CBGame::displayIndicator() {
if (_saveLoadImage) {
RECT rc;
CBPlatform::SetRect(&rc, 0, 0, _saveLoadImage->getWidth(), _saveLoadImage->getHeight());
@@ -4180,7 +4180,7 @@ void CBGame::DEBUG_DumpClassRegistry() {
f->close();
delete f;
- Game->QuickMessage("Classes dump completed.");
+ Game->quickMessage("Classes dump completed.");
}
@@ -4202,7 +4202,7 @@ HRESULT CBGame::restoreDeviceObjects() {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::SetWaitCursor(const char *filename) {
+HRESULT CBGame::setWaitCursor(const char *filename) {
delete _cursorNoninteractive;
_cursorNoninteractive = NULL;
@@ -4234,7 +4234,7 @@ HRESULT CBGame::StopVideo() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::DrawCursor(CBSprite *Cursor) {
+HRESULT CBGame::drawCursor(CBSprite *Cursor) {
if (!Cursor) return E_FAIL;
if (Cursor != _lastCursor) {
Cursor->Reset();
@@ -4253,8 +4253,8 @@ HRESULT CBGame::OnActivate(bool Activate, bool RefreshMouse) {
if (RefreshMouse) {
POINT p;
- GetMousePos(&p);
- SetActiveObject(_renderer->getObjectAt(p.x, p.y));
+ getMousePos(&p);
+ setActiveObject(_renderer->getObjectAt(p.x, p.y));
}
if (Activate) _soundMgr->resumeAll();
@@ -4443,18 +4443,18 @@ HRESULT CBGame::DisplayDebugInfo() {
}
//////////////////////////////////////////////////////////////////////////
-CBDebugger *CBGame::GetDebugMgr() {
+CBDebugger *CBGame::getDebugMgr() {
if (!_debugMgr) _debugMgr = new CBDebugger(this);
return _debugMgr;
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::GetMousePos(POINT *Pos) {
- CBPlatform::GetCursorPos(Pos);
+void CBGame::getMousePos(POINT *pos) {
+ CBPlatform::GetCursorPos(pos);
- Pos->x -= _renderer->_drawOffsetX;
- Pos->y -= _renderer->_drawOffsetY;
+ pos->x -= _renderer->_drawOffsetX;
+ pos->y -= _renderer->_drawOffsetY;
/*
// Windows can squish maximized window if it's larger than desktop
@@ -4470,19 +4470,19 @@ void CBGame::GetMousePos(POINT *Pos) {
*/
if (_mouseLockRect.left != 0 && _mouseLockRect.right != 0 && _mouseLockRect.top != 0 && _mouseLockRect.bottom != 0) {
- if (!CBPlatform::PtInRect(&_mouseLockRect, *Pos)) {
- Pos->x = MAX(_mouseLockRect.left, Pos->x);
- Pos->y = MAX(_mouseLockRect.top, Pos->y);
+ if (!CBPlatform::PtInRect(&_mouseLockRect, *pos)) {
+ pos->x = MAX(_mouseLockRect.left, pos->x);
+ pos->y = MAX(_mouseLockRect.top, pos->y);
- Pos->x = MIN(_mouseLockRect.right, Pos->x);
- Pos->y = MIN(_mouseLockRect.bottom, Pos->y);
+ pos->x = MIN(_mouseLockRect.right, pos->x);
+ pos->y = MIN(_mouseLockRect.bottom, pos->y);
- POINT NewPos = *Pos;
+ POINT newPos = *pos;
- NewPos.x += _renderer->_drawOffsetX;
- NewPos.y += _renderer->_drawOffsetY;
+ newPos.x += _renderer->_drawOffsetX;
+ newPos.y += _renderer->_drawOffsetY;
- CBPlatform::SetCursorPos(NewPos.x, NewPos.y);
+ CBPlatform::SetCursorPos(newPos.x, newPos.y);
}
}
}
@@ -4504,12 +4504,12 @@ HRESULT CBGame::OnScriptShutdown(CScScript *script) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBGame::IsLeftDoubleClick() {
+bool CBGame::isLeftDoubleClick() {
return IsDoubleClick(0);
}
//////////////////////////////////////////////////////////////////////////
-bool CBGame::IsRightDoubleClick() {
+bool CBGame::isRightDoubleClick() {
return IsDoubleClick(1);
}
@@ -4543,7 +4543,7 @@ bool CBGame::IsDoubleClick(int buttonIndex) {
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AutoSaveOnExit() {
+void CBGame::autoSaveOnExit() {
_soundMgr->saveSettings();
_registry->SaveValues();
@@ -4554,7 +4554,7 @@ void CBGame::AutoSaveOnExit() {
}
//////////////////////////////////////////////////////////////////////////
-void CBGame::AddMem(int bytes) {
+void CBGame::addMem(int bytes) {
_usedMem += bytes;
}
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h
index 00cb8c16cf..799abc7b5c 100644
--- a/engines/wintermute/Base/BGame.h
+++ b/engines/wintermute/Base/BGame.h
@@ -81,8 +81,8 @@ public:
virtual HRESULT OnPaint();
virtual HRESULT OnWindowClose();
- bool IsLeftDoubleClick();
- bool IsRightDoubleClick();
+ bool isLeftDoubleClick();
+ bool isRightDoubleClick();
bool _autorunDisabled;
@@ -91,7 +91,7 @@ public:
virtual HRESULT MiniUpdate();
- void GetMousePos(POINT *Pos);
+ void getMousePos(POINT *Pos);
RECT _mouseLockRect;
bool _shuttingDown;
@@ -113,7 +113,7 @@ public:
virtual HRESULT ResetContent();
void DEBUG_DumpClassRegistry();
- HRESULT SetWaitCursor(const char *Filename);
+ HRESULT setWaitCursor(const char *Filename);
char *_localSaveDir;
bool _saveDirChecked;
@@ -137,32 +137,32 @@ public:
int _loadImageY;
CBSurface *_saveLoadImage;
- HRESULT DisplayIndicator();
+ HRESULT displayIndicator();
int _thumbnailWidth;
int _thumbnailHeight;
bool _reportTextureFormat;
HMODULE _resourceModule;
- void SetResourceModule(HMODULE ResModule);
+ void setResourceModule(HMODULE ResModule);
- void SetEngineLogCallback(ENGINE_LOG_CALLBACK Callback = NULL, void *Data = NULL);
+ void setEngineLogCallback(ENGINE_LOG_CALLBACK Callback = NULL, void *Data = NULL);
ENGINE_LOG_CALLBACK _engineLogCallback;
void *_engineLogCallbackData;
bool _editorMode;
bool _doNotExpandStrings;
- void GetOffset(int *OffsetX, int *OffsetY);
- void SetOffset(int OffsetX, int OffsetY);
- int GetSequence();
+ void getOffset(int *offsetX, int *offsetY);
+ void setOffset(int offsetX, int offsetY);
+ int getSequence();
int _offsetY;
int _offsetX;
float _offsetPercentX;
float _offsetPercentY;
CBObject *_mainObject;
- HRESULT InitInput(HINSTANCE hInst, HWND hWnd);
- HRESULT InitLoop();
+ HRESULT initInput(HINSTANCE hInst, HWND hWnd);
+ HRESULT initLoop();
uint32 _currentTime;
uint32 _deltaTime;
CBFont *_systemFont;
@@ -172,7 +172,7 @@ public:
HRESULT initialize3();
CBFileManager *_fileManager;
CBTransitionMgr *_transMgr;
- CBDebugger *GetDebugMgr();
+ CBDebugger *getDebugMgr();
void LOG(HRESULT res, LPCSTR fmt, ...);
@@ -187,13 +187,13 @@ public:
virtual ~CBGame();
void DEBUG_DebugDisable();
- void DEBUG_DebugEnable(const char *Filename = NULL);
+ void DEBUG_DebugEnable(const char *filename = NULL);
bool _dEBUG_DebugMode;
bool _dEBUG_AbsolutePathWarning;
void *_dEBUG_LogFile;
int _sequence;
- virtual HRESULT loadFile(const char *Filename);
+ virtual HRESULT loadFile(const char *filename);
virtual HRESULT loadBuffer(byte *Buffer, bool Complete = true);
CBArray<CBQuickMsg *, CBQuickMsg *> _quickMessages;
CBArray<CUIWindow *, CUIWindow *> _windows;
@@ -260,27 +260,27 @@ public:
virtual bool handleKeypress(Common::Event *event, bool printable = false);
virtual void handleKeyRelease(Common::Event *event);
int _freezeLevel;
- HRESULT Unfreeze();
- HRESULT Freeze(bool IncludingMusic = true);
- HRESULT FocusWindow(CUIWindow *Window);
+ HRESULT unfreeze();
+ HRESULT freeze(bool IncludingMusic = true);
+ HRESULT focusWindow(CUIWindow *Window);
CVidPlayer *_videoPlayer;
CVidTheoraPlayer *_theoraPlayer;
bool _loadInProgress;
CUIWindow *_focusedWindow;
bool _editorForceScripts;
- static void AfterLoadRegion(void *Region, void *Data);
- static void AfterLoadSubFrame(void *Subframe, void *Data);
- static void AfterLoadSound(void *Sound, void *Data);
- static void AfterLoadFont(void *Font, void *Data);
- static void AfterLoadScript(void *script, void *data);
- static void InvalidateValues(void *Value, void *Data);
-
- HRESULT LoadSettings(const char *Filename);
- HRESULT ResumeMusic(int Channel);
- HRESULT SetMusicStartTime(int Channel, uint32 Time);
- HRESULT PauseMusic(int Channel);
- HRESULT StopMusic(int Channel);
- HRESULT PlayMusic(int Channel, const char *Filename, bool Looping = true, uint32 LoopStart = 0);
+ static void afterLoadRegion(void *Region, void *Data);
+ static void afterLoadSubFrame(void *Subframe, void *Data);
+ static void afterLoadSound(void *Sound, void *Data);
+ static void afterLoadFont(void *Font, void *Data);
+ static void afterLoadScript(void *script, void *data);
+ static void invalidateValues(void *Value, void *Data);
+
+ HRESULT loadSettings(const char *Filename);
+ HRESULT resumeMusic(int Channel);
+ HRESULT setMusicStartTime(int Channel, uint32 Time);
+ HRESULT pauseMusic(int Channel);
+ HRESULT stopMusic(int Channel);
+ HRESULT playMusic(int Channel, const char *Filename, bool Looping = true, uint32 LoopStart = 0);
CBSound *_music[NUM_MUSIC_CHANNELS];
bool _musicCrossfadeRunning;
bool _musicCrossfadeSwap;
@@ -314,11 +314,11 @@ public:
CBObject *_capturedObject;
POINT _mousePos;
- bool ValidObject(CBObject *Object);
- HRESULT UnregisterObject(CBObject *Object);
- HRESULT RegisterObject(CBObject *Object);
- void QuickMessage(const char *Text);
- void QuickMessageForm(LPSTR fmt, ...);
+ bool ValidObject(CBObject *object);
+ HRESULT UnregisterObject(CBObject *object);
+ HRESULT RegisterObject(CBObject *object);
+ void quickMessage(const char *text);
+ void quickMessageForm(LPSTR fmt, ...);
HRESULT DisplayQuickMsg();
uint32 _fps;
HRESULT UpdateMusicCrossfade();
@@ -331,23 +331,23 @@ public:
virtual HRESULT DisplayContent(bool Update = true, bool DisplayAll = false);
virtual HRESULT DisplayContentSimple();
bool _forceNonStreamedSounds;
- void ResetMousePos();
+ void resetMousePos();
int _subtitlesSpeed;
void SetInteractive(bool State);
virtual HRESULT WindowLoadHook(CUIWindow *Win, char **Buf, char **Params);
virtual HRESULT WindowScriptMethodHook(CUIWindow *Win, CScScript *script, CScStack *stack, const char *name);
- HRESULT GetCurrentViewportOffset(int *OffsetX = NULL, int *OffsetY = NULL);
- HRESULT GetCurrentViewportRect(RECT *Rect, bool *Custom = NULL);
- HRESULT PopViewport();
- HRESULT PushViewport(CBViewport *Viewport);
- HRESULT SetActiveObject(CBObject *Obj);
+ HRESULT getCurrentViewportOffset(int *OffsetX = NULL, int *OffsetY = NULL);
+ HRESULT getCurrentViewportRect(RECT *Rect, bool *Custom = NULL);
+ HRESULT popViewport();
+ HRESULT pushViewport(CBViewport *Viewport);
+ HRESULT setActiveObject(CBObject *Obj);
CBSprite *_lastCursor;
- HRESULT DrawCursor(CBSprite *Cursor);
+ HRESULT drawCursor(CBSprite *Cursor);
virtual HRESULT InitAfterLoad();
CBSaveThumbHelper *_cachedThumbnail;
AnsiString GetDataDir();
- void AddMem(int bytes);
+ void addMem(int bytes);
bool _touchInterface;
bool _constrainedMemory;
@@ -380,7 +380,7 @@ protected:
bool _cursorHidden;
public:
- void AutoSaveOnExit();
+ void autoSaveOnExit();
};
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp
index ab30ce33b0..a352b11bf0 100644
--- a/engines/wintermute/Base/BObject.cpp
+++ b/engines/wintermute/Base/BObject.cpp
@@ -63,7 +63,7 @@ CBObject::CBObject(CBGame *inGame): CBScriptHolder(inGame) {
_soundEvent = NULL;
- _iD = Game->GetSequence();
+ _iD = Game->getSequence();
CBPlatform::SetRectEmpty(&_rect);
_rectSet = false;
@@ -852,7 +852,7 @@ const char *CBObject::scToString() {
//////////////////////////////////////////////////////////////////////////
HRESULT CBObject::showCursor() {
- if (_cursor) return Game->DrawCursor(_cursor);
+ if (_cursor) return Game->drawCursor(_cursor);
else return E_FAIL;
}
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index 2f2db5e10b..1427b31aae 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -299,7 +299,7 @@ HRESULT CBRenderSDL::fadeToColor(uint32 Color, Common::Rect *rect) {
fillRect.setHeight(rect->height());
} else {
RECT rc;
- Game->GetCurrentViewportRect(&rc);
+ Game->getCurrentViewportRect(&rc);
fillRect.left = (int16)rc.left;
fillRect.top = (int16)rc.top;
fillRect.setWidth((int16)(rc.right - rc.left));
diff --git a/engines/wintermute/Base/BScriptHolder.cpp b/engines/wintermute/Base/BScriptHolder.cpp
index 6165008bc1..b6495931aa 100644
--- a/engines/wintermute/Base/BScriptHolder.cpp
+++ b/engines/wintermute/Base/BScriptHolder.cpp
@@ -297,7 +297,7 @@ HRESULT CBScriptHolder::addScript(const char *Filename) {
scr->_owner = this;
_scripts.Add(scr);
Game->_scEngine->_scripts.Add(scr);
- Game->GetDebugMgr()->OnScriptInit(scr);
+ Game->getDebugMgr()->OnScriptInit(scr);
return S_OK;
}
@@ -436,7 +436,7 @@ CScScript *CBScriptHolder::invokeMethodThread(const char *methodName) {
HRESULT ret = thread->CreateMethodThread(_scripts[i], methodName);
if (SUCCEEDED(ret)) {
_scripts[i]->_engine->_scripts.Add(thread);
- Game->GetDebugMgr()->OnScriptMethodThreadInit(thread, _scripts[i], methodName);
+ Game->getDebugMgr()->OnScriptMethodThreadInit(thread, _scripts[i], methodName);
return thread;
} else {
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp
index 8dbe7c75b6..34f47b5d64 100644
--- a/engines/wintermute/Base/BSurfaceSDL.cpp
+++ b/engines/wintermute/Base/BSurfaceSDL.cpp
@@ -66,7 +66,7 @@ CBSurfaceSDL::~CBSurfaceSDL() {
delete[] _alphaMask;
_alphaMask = NULL;
- Game->AddMem(-_width * _height * 4);
+ Game->addMem(-_width * _height * 4);
CBRenderSDL *renderer = static_cast<CBRenderSDL *>(Game->_renderer);
renderer->invalidateTicketsFromSurface(this);
}
@@ -203,7 +203,7 @@ HRESULT CBSurfaceSDL::create(const char *filename, bool default_ck, byte ck_red,
_valid = true;
- Game->AddMem(_width * _height * 4);
+ Game->addMem(_width * _height * 4);
delete image;
@@ -302,7 +302,7 @@ HRESULT CBSurfaceSDL::create(int width, int height) {
_width = width;
_height = height;
- Game->AddMem(_width * _height * 4);
+ Game->addMem(_width * _height * 4);
_valid = true;
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp
index 8aca4c9edf..b7ab360b82 100644
--- a/engines/wintermute/Base/scriptables/ScEngine.cpp
+++ b/engines/wintermute/Base/scriptables/ScEngine.cpp
@@ -257,7 +257,7 @@ CScScript *CScEngine::RunScript(const char *Filename, CBScriptHolder *Owner) {
script->_globals->setProp("this", &val);
_scripts.Add(script);
- Game->GetDebugMgr()->OnScriptInit(script);
+ Game->getDebugMgr()->OnScriptInit(script);
return script;
}
@@ -324,7 +324,7 @@ byte *CScEngine::GetCompiledScript(const char *Filename, uint32 *OutSize, bool I
CompBuffer = ExtCompileFile(tempFileName, &CompSize);
delete[] tempFileName;
if (!CompBuffer) {
- Game->QuickMessage("Script compiler error. View log for details.");
+ Game->quickMessage("Script compiler error. View log for details.");
delete [] Buffer;
return NULL;
}
@@ -490,7 +490,7 @@ HRESULT CScEngine::RemoveFinishedScripts() {
for (int i = 0; i < _scripts.GetSize(); i++) {
if (_scripts[i]->_state == SCRIPT_FINISHED || _scripts[i]->_state == SCRIPT_ERROR) {
if (!_scripts[i]->_thread && _scripts[i]->_owner) _scripts[i]->_owner->removeScript(_scripts[i]);
- Game->GetDebugMgr()->OnScriptShutdown(_scripts[i]);
+ Game->getDebugMgr()->OnScriptShutdown(_scripts[i]);
delete _scripts[i];
_scripts.RemoveAt(i);
i--;
@@ -674,7 +674,7 @@ HRESULT CScEngine::DbgSendScripts(IWmeDebugClient *Client) {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::AddBreakpoint(const char *ScriptFilename, int Line) {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
CScBreakpoint *Bp = NULL;
for (int i = 0; i < _breakpoints.GetSize(); i++) {
@@ -701,7 +701,7 @@ HRESULT CScEngine::AddBreakpoint(const char *ScriptFilename, int Line) {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::RemoveBreakpoint(const char *ScriptFilename, int Line) {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
for (int i = 0; i < _breakpoints.GetSize(); i++) {
if (scumm_stricmp(_breakpoints[i]->_filename.c_str(), ScriptFilename) == 0) {
@@ -726,7 +726,7 @@ HRESULT CScEngine::RemoveBreakpoint(const char *ScriptFilename, int Line) {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::RefreshScriptBreakpoints() {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
for (int i = 0; i < _scripts.GetSize(); i++) {
RefreshScriptBreakpoints(_scripts[i]);
@@ -736,7 +736,7 @@ HRESULT CScEngine::RefreshScriptBreakpoints() {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::RefreshScriptBreakpoints(CScScript *script) {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
if (!script || !script->_filename) return E_FAIL;
@@ -753,7 +753,7 @@ HRESULT CScEngine::RefreshScriptBreakpoints(CScScript *script) {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::SaveBreakpoints() {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
char Text[512];
@@ -776,7 +776,7 @@ HRESULT CScEngine::SaveBreakpoints() {
//////////////////////////////////////////////////////////////////////////
HRESULT CScEngine::LoadBreakpoints() {
- if (!Game->GetDebugMgr()->_enabled) return S_OK;
+ if (!Game->getDebugMgr()->_enabled) return S_OK;
char Key[100];
diff --git a/engines/wintermute/Base/scriptables/ScScript.cpp b/engines/wintermute/Base/scriptables/ScScript.cpp
index 217233534c..f255d2aa8a 100644
--- a/engines/wintermute/Base/scriptables/ScScript.cpp
+++ b/engines/wintermute/Base/scriptables/ScScript.cpp
@@ -490,12 +490,12 @@ HRESULT CScScript::ExecuteInstruction() {
dw = GetDWORD();
if (_scopeStack->_sP < 0) {
_globals->setProp(_symbols[dw], _operand);
- if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCRIPT, this, NULL, _globals->getProp(_symbols[dw]), _symbols[dw]);
+ if (Game->getDebugMgr()->_enabled)
+ Game->getDebugMgr()->OnVariableInit(WME_DBGVAR_SCRIPT, this, NULL, _globals->getProp(_symbols[dw]), _symbols[dw]);
} else {
_scopeStack->getTop()->setProp(_symbols[dw], _operand);
- if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCOPE, this, _scopeStack->getTop(), _scopeStack->getTop()->getProp(_symbols[dw]), _symbols[dw]);
+ if (Game->getDebugMgr()->_enabled)
+ Game->getDebugMgr()->OnVariableInit(WME_DBGVAR_SCOPE, this, _scopeStack->getTop(), _scopeStack->getTop()->getProp(_symbols[dw]), _symbols[dw]);
}
break;
@@ -509,21 +509,21 @@ HRESULT CScScript::ExecuteInstruction() {
_operand->setNULL();
_engine->_globals->setProp(_symbols[dw], _operand, false, inst == II_DEF_CONST_VAR);
- if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_GLOBAL, this, NULL, _engine->_globals->getProp(_symbols[dw]), _symbols[dw]);
+ if (Game->getDebugMgr()->_enabled)
+ Game->getDebugMgr()->OnVariableInit(WME_DBGVAR_GLOBAL, this, NULL, _engine->_globals->getProp(_symbols[dw]), _symbols[dw]);
}
break;
}
case II_RET:
if (_scopeStack->_sP >= 0 && _callStack->_sP >= 0) {
- Game->GetDebugMgr()->OnScriptShutdownScope(this, _scopeStack->getTop());
+ Game->getDebugMgr()->OnScriptShutdownScope(this, _scopeStack->getTop());
_scopeStack->pop();
_iP = (uint32)_callStack->pop()->getInt();
- if (_scopeStack->_sP < 0) Game->GetDebugMgr()->OnScriptChangeScope(this, NULL);
- else Game->GetDebugMgr()->OnScriptChangeScope(this, _scopeStack->getTop());
+ if (_scopeStack->_sP < 0) Game->getDebugMgr()->OnScriptChangeScope(this, NULL);
+ else Game->getDebugMgr()->OnScriptChangeScope(this, _scopeStack->getTop());
} else {
if (_thread) {
_state = SCRIPT_THREAD_FINISHED;
@@ -640,8 +640,8 @@ HRESULT CScScript::ExecuteInstruction() {
_operand->setNULL();
_scopeStack->push(_operand);
- if (_scopeStack->_sP < 0) Game->GetDebugMgr()->OnScriptChangeScope(this, NULL);
- else Game->GetDebugMgr()->OnScriptChangeScope(this, _scopeStack->getTop());
+ if (_scopeStack->_sP < 0) Game->getDebugMgr()->OnScriptChangeScope(this, NULL);
+ else Game->getDebugMgr()->OnScriptChangeScope(this, _scopeStack->getTop());
break;
@@ -691,8 +691,8 @@ HRESULT CScScript::ExecuteInstruction() {
}
}
- if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableChangeValue(var, val);
+ if (Game->getDebugMgr()->_enabled)
+ Game->getDebugMgr()->OnVariableChangeValue(var, val);
}
break;
@@ -757,8 +757,8 @@ HRESULT CScScript::ExecuteInstruction() {
var->setNULL();
} else var->setProp(str, val);
- if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableChangeValue(var, NULL);
+ if (Game->getDebugMgr()->_enabled)
+ Game->getDebugMgr()->OnVariableChangeValue(var, NULL);
break;
}
@@ -1022,17 +1022,17 @@ HRESULT CScScript::ExecuteInstruction() {
int NewLine = GetDWORD();
if (NewLine != _currentLine) {
_currentLine = NewLine;
- if (Game->GetDebugMgr()->_enabled) {
- Game->GetDebugMgr()->OnScriptChangeLine(this, _currentLine);
+ if (Game->getDebugMgr()->_enabled) {
+ Game->getDebugMgr()->OnScriptChangeLine(this, _currentLine);
for (int i = 0; i < _breakpoints.GetSize(); i++) {
if (_breakpoints[i] == _currentLine) {
- Game->GetDebugMgr()->OnScriptHitBreakpoint(this);
+ Game->getDebugMgr()->OnScriptHitBreakpoint(this);
Sleep(0);
break;
}
}
if (_tracingMode) {
- Game->GetDebugMgr()->OnScriptHitBreakpoint(this);
+ Game->getDebugMgr()->OnScriptHitBreakpoint(this);
Sleep(0);
break;
}
@@ -1180,7 +1180,7 @@ void CScScript::RuntimeError(LPCSTR fmt, ...) {
Game->LOG(0, " %s", buff);
if (!Game->_suppressScriptErrors)
- Game->QuickMessage("Script runtime error. View log for details.");
+ Game->quickMessage("Script runtime error. View log for details.");
}
@@ -1259,7 +1259,7 @@ CScScript *CScScript::InvokeEventHandler(const char *EventName, bool Unbreakable
if (SUCCEEDED(ret)) {
thread->_unbreakable = Unbreakable;
_engine->_scripts.Add(thread);
- Game->GetDebugMgr()->OnScriptEventThreadInit(thread, this, EventName);
+ Game->getDebugMgr()->OnScriptEventThreadInit(thread, this, EventName);
return thread;
} else {
delete thread;
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp
index 6f330e35e8..5f373498aa 100644
--- a/engines/wintermute/PlatformSDL.cpp
+++ b/engines/wintermute/PlatformSDL.cpp
@@ -54,13 +54,13 @@ void CBPlatform::HandleEvent(Common::Event *event) {
case Common::EVENT_LBUTTONDOWN:
if (Game) {
- if (Game->IsLeftDoubleClick()) Game->OnMouseLeftDblClick();
+ if (Game->isLeftDoubleClick()) Game->OnMouseLeftDblClick();
else Game->OnMouseLeftDown();
}
break;
case Common::EVENT_RBUTTONDOWN:
if (Game) {
- if (Game->IsRightDoubleClick()) Game->OnMouseRightDblClick();
+ if (Game->isRightDoubleClick()) Game->OnMouseRightDblClick();
else Game->OnMouseRightDown();
}
break;
diff --git a/engines/wintermute/UI/UIObject.cpp b/engines/wintermute/UI/UIObject.cpp
index 0a387c48c8..7a3cd3e8a0 100644
--- a/engines/wintermute/UI/UIObject.cpp
+++ b/engines/wintermute/UI/UIObject.cpp
@@ -71,7 +71,7 @@ CUIObject::CUIObject(CBGame *inGame): CBObject(inGame) {
//////////////////////////////////////////////////////////////////////////
CUIObject::~CUIObject() {
- if (!Game->_loadInProgress) CSysClassRegistry::getInstance()->enumInstances(CBGame::InvalidateValues, "CScValue", (void *)this);
+ if (!Game->_loadInProgress) CSysClassRegistry::getInstance()->enumInstances(CBGame::invalidateValues, "CScValue", (void *)this);
if (_back) delete _back;
if (_font && !_sharedFonts) Game->_fontStorage->RemoveFont(_font);
@@ -526,7 +526,7 @@ HRESULT CUIObject::focus() {
if (obj->_parent) {
if (!obj->_disable && obj->_canFocus) obj->_parent->_focusedWidget = obj;
} else {
- if (obj->_type == UI_WINDOW) Game->FocusWindow((CUIWindow *)obj);
+ if (obj->_type == UI_WINDOW) Game->focusWindow((CUIWindow *)obj);
}
obj = obj->_parent;
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp
index ffa3df97c4..5ed33ffd7a 100644
--- a/engines/wintermute/UI/UIWindow.cpp
+++ b/engines/wintermute/UI/UIWindow.cpp
@@ -161,7 +161,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) {
if (!_viewport) _viewport = new CBViewport(Game);
if (_viewport) {
_viewport->setRect(_posX + OffsetX, _posY + OffsetY, _posX + _width + OffsetX, _posY + _height + OffsetY);
- Game->PushViewport(_viewport);
+ Game->pushViewport(_viewport);
PopViewport = true;
}
}
@@ -193,7 +193,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) {
if (_alphaColor != 0) Game->_renderer->_forceAlphaColor = 0;
- if (PopViewport) Game->PopViewport();
+ if (PopViewport) Game->popViewport();
return S_OK;
}
@@ -1230,7 +1230,7 @@ HRESULT CUIWindow::goExclusive() {
_mode = WINDOW_EXCLUSIVE;
_visible = true;
_disable = false;
- Game->FocusWindow(this);
+ Game->focusWindow(this);
return S_OK;
} else return E_FAIL;
}
@@ -1246,9 +1246,9 @@ HRESULT CUIWindow::goSystemExclusive() {
_ready = false;
_visible = true;
_disable = false;
- Game->FocusWindow(this);
+ Game->focusWindow(this);
- Game->Freeze(_pauseMusic);
+ Game->freeze(_pauseMusic);
return S_OK;
}
@@ -1256,7 +1256,7 @@ HRESULT CUIWindow::goSystemExclusive() {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIWindow::close() {
if (_mode == WINDOW_SYSTEM_EXCLUSIVE) {
- Game->Unfreeze();
+ Game->unfreeze();
}
_mode = WINDOW_NORMAL;
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp
index 219cc295d9..2c93e2ee33 100644
--- a/engines/wintermute/video/VidTheoraPlayer.cpp
+++ b/engines/wintermute/video/VidTheoraPlayer.cpp
@@ -357,7 +357,7 @@ HRESULT CVidTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGam
_freezeGame = freezeGame;
if (!_playbackStarted && _freezeGame)
- Game->Freeze(freezeMusic);
+ Game->freeze(freezeMusic);
_playbackStarted = false;
float width, height;
@@ -455,7 +455,7 @@ HRESULT CVidTheoraPlayer::stop() {
_theoraDecoder->close();
_state = THEORA_STATE_FINISHED;
if (_freezeGame) {
- Game->Unfreeze();
+ Game->unfreeze();
}
#if 0
if (m_Sound) m_Sound->Stop();
@@ -483,7 +483,7 @@ HRESULT CVidTheoraPlayer::update() {
warning("Finished movie");
_state = THEORA_STATE_FINISHED;
_playbackStarted = false;
- if (_freezeGame) Game->Unfreeze();
+ if (_freezeGame) Game->unfreeze();
}
if (_state == THEORA_STATE_PLAYING) {
if (_theoraDecoder->getTimeToNextFrame() == 0) {
@@ -500,7 +500,7 @@ HRESULT CVidTheoraPlayer::update() {
// end playback
if (!_looping) {
_state = THEORA_STATE_FINISHED;
- if (_freezeGame) Game->Unfreeze();
+ if (_freezeGame) Game->unfreeze();
return S_OK;
} else {
resetStream();
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index fe8e653ca9..031b081075 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -189,7 +189,7 @@ int WinterMuteEngine::init() {
_game->initialize1();
- if (FAILED(_game->LoadSettings("startup.settings"))) {
+ if (FAILED(_game->loadSettings("startup.settings"))) {
_game->LOG(0, "Error loading game settings.");
delete _game;
_game = NULL;
@@ -200,7 +200,7 @@ int WinterMuteEngine::init() {
_game->initialize2();
- _game->GetDebugMgr()->OnGameInit();
+ _game->getDebugMgr()->OnGameInit();
_game->_scEngine->LoadBreakpoints();