aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/scriptables/script_engine.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-23 03:01:05 +0200
committerEinar Johan Trøan Sømåen2012-07-23 03:10:41 +0200
commit448911930d8d6bf43a67769d50ee4048f296b7f4 (patch)
tree5617248f0227062e80e58e5f0b13679c74b935ae /engines/wintermute/base/scriptables/script_engine.cpp
parentdd6d093cf33f3ab3cf49f848ba6298733bad5831 (diff)
downloadscummvm-rg350-448911930d8d6bf43a67769d50ee4048f296b7f4.tar.gz
scummvm-rg350-448911930d8d6bf43a67769d50ee4048f296b7f4.tar.bz2
scummvm-rg350-448911930d8d6bf43a67769d50ee4048f296b7f4.zip
WINTERMUTE: Remove unused code from platform_osystem.h
Diffstat (limited to 'engines/wintermute/base/scriptables/script_engine.cpp')
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index e8544d8cd6..472e9d9fec 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -176,7 +176,7 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
if (!ignoreCache) {
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
if (_cachedScripts[i] && scumm_stricmp(_cachedScripts[i]->_filename.c_str(), filename) == 0) {
- _cachedScripts[i]->_timestamp = BasePlatform::getTime();
+ _cachedScripts[i]->_timestamp = g_system->getMillis();
*outSize = _cachedScripts[i]->_size;
return _cachedScripts[i]->_buffer;
}
@@ -216,7 +216,7 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig
CScCachedScript *cachedScript = new CScCachedScript(filename, compBuffer, compSize);
if (cachedScript) {
int index = 0;
- uint32 MinTime = BasePlatform::getTime();
+ uint32 MinTime = g_system->getMillis();
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
if (_cachedScripts[i] == NULL) {
index = i;
@@ -275,7 +275,7 @@ bool ScEngine::tick() {
case SCRIPT_SLEEPING: {
if (_scripts[i]->_waitFrozen) {
- if (_scripts[i]->_waitTime <= BasePlatform::getTime()) _scripts[i]->run();
+ if (_scripts[i]->_waitTime <= g_system->getMillis()) _scripts[i]->run();
} else {
if (_scripts[i]->_waitTime <= _gameRef->_timer) _scripts[i]->run();
}
@@ -314,25 +314,25 @@ bool ScEngine::tick() {
// time sliced script
if (_scripts[i]->_timeSlice > 0) {
- uint32 StartTime = BasePlatform::getTime();
- while (_scripts[i]->_state == SCRIPT_RUNNING && BasePlatform::getTime() - StartTime < _scripts[i]->_timeSlice) {
+ uint32 StartTime = g_system->getMillis();
+ while (_scripts[i]->_state == SCRIPT_RUNNING && g_system->getMillis() - StartTime < _scripts[i]->_timeSlice) {
_currentScript = _scripts[i];
_scripts[i]->executeInstruction();
}
- if (_isProfiling && _scripts[i]->_filename) addScriptTime(_scripts[i]->_filename, BasePlatform::getTime() - StartTime);
+ if (_isProfiling && _scripts[i]->_filename) addScriptTime(_scripts[i]->_filename, g_system->getMillis() - StartTime);
}
// normal script
else {
uint32 startTime = 0;
bool isProfiling = _isProfiling;
- if (isProfiling) startTime = BasePlatform::getTime();
+ if (isProfiling) startTime = g_system->getMillis();
while (_scripts[i]->_state == SCRIPT_RUNNING) {
_currentScript = _scripts[i];
_scripts[i]->executeInstruction();
}
- if (isProfiling && _scripts[i]->_filename) addScriptTime(_scripts[i]->_filename, BasePlatform::getTime() - startTime);
+ if (isProfiling && _scripts[i]->_filename) addScriptTime(_scripts[i]->_filename, g_system->getMillis() - startTime);
}
_currentScript = NULL;
}
@@ -670,7 +670,7 @@ void ScEngine::enableProfiling() {
// destroy old data, if any
_scriptTimes.clear();
- _profilingStartTime = BasePlatform::getTime();
+ _profilingStartTime = g_system->getMillis();
_isProfiling = true;
}
@@ -687,7 +687,7 @@ void ScEngine::disableProfiling() {
//////////////////////////////////////////////////////////////////////////
void ScEngine::dumpStats() {
error("DumpStats not ported to ScummVM yet");
- /* uint32 totalTime = BasePlatform::getTime() - _profilingStartTime;
+ /* uint32 totalTime = g_system->getMillis() - _profilingStartTime;
typedef std::vector <std::pair<uint32, std::string> > TimeVector;
TimeVector times;