diff options
author | Einar Johan Trøan Sømåen | 2012-07-03 06:07:22 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-03 06:07:22 +0200 |
commit | 8596c6a91e7189a2c23d92c0282e8fbb8b66b08b (patch) | |
tree | dbc856cc287b51198527315d228ea64877cb7e1a /engines/wintermute/Base/scriptables | |
parent | 317e53aca7aafcd5ed356a25795ad994152a4fc8 (diff) | |
download | scummvm-rg350-8596c6a91e7189a2c23d92c0282e8fbb8b66b08b.tar.gz scummvm-rg350-8596c6a91e7189a2c23d92c0282e8fbb8b66b08b.tar.bz2 scummvm-rg350-8596c6a91e7189a2c23d92c0282e8fbb8b66b08b.zip |
WINTERMUTE: Rename most functions in BGame FuncName->funcName
Diffstat (limited to 'engines/wintermute/Base/scriptables')
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScScript.cpp | 42 |
2 files changed, 30 insertions, 30 deletions
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;
|