aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-04-29 15:12:09 +0000
committerJohannes Schickel2008-04-29 15:12:09 +0000
commitec9a03964c9054a4e5a5406bd25e3c586df0dfaa (patch)
tree450c720a5e4300fb260ff2f8494d713e81c91ebd /engines/kyra/kyra.cpp
parentca7f7e2a3b6392af526ccbd4a624768e2617c6e9 (diff)
downloadscummvm-rg350-ec9a03964c9054a4e5a5406bd25e3c586df0dfaa.tar.gz
scummvm-rg350-ec9a03964c9054a4e5a5406bd25e3c586df0dfaa.tar.bz2
scummvm-rg350-ec9a03964c9054a4e5a5406bd25e3c586df0dfaa.zip
- Renamed ScriptInterpreter -> EMCInterpreter
- Renamed ScriptState -> EMCState, ScriptData -> EMCData - Removed 'Script' from function names inside EMCInterpreter - Fixed KyraEngine::readSettings and KyraEngine::writeSettings for kyra3 svn-id: r31773
Diffstat (limited to 'engines/kyra/kyra.cpp')
-rw-r--r--engines/kyra/kyra.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index f3d6467984..05d8b79a4e 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -45,7 +45,7 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
_text = 0;
_staticres = 0;
_timer = 0;
- _scriptInterpreter = 0;
+ _emc = 0;
_gameSpeed = 60;
_tickLength = (uint8)(1000.0 / _gameSpeed);
@@ -145,8 +145,8 @@ int KyraEngine::init() {
_timer = new TimerManager(this, _system);
assert(_timer);
setupTimers();
- _scriptInterpreter = new ScriptHelper(this);
- assert(_scriptInterpreter);
+ _emc = new EMCInterpreter(this);
+ assert(_emc);
setupOpcodeTable();
readSettings();
@@ -200,7 +200,7 @@ KyraEngine::~KyraEngine() {
delete _sound;
delete _text;
delete _timer;
- delete _scriptInterpreter;
+ delete _emc;
}
void KyraEngine::quitGame() {
@@ -273,8 +273,10 @@ void KyraEngine::readSettings() {
}
_configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1;
- _sound->enableMusic(_configMusic);
- _sound->enableSFX(_configSounds);
+ if (_sound) {
+ _sound->enableMusic(_configMusic);
+ _sound->enableSFX(_configSounds);
+ }
bool speechMute = ConfMan.getBool("speech_mute");
bool subtitles = ConfMan.getBool("subtitles");
@@ -313,11 +315,12 @@ void KyraEngine::writeSettings() {
break;
}
- if (!_configMusic)
- _sound->beginFadeOut();
-
- _sound->enableMusic(_configMusic);
- _sound->enableSFX(_configSounds);
+ if (_sound) {
+ if (!_configMusic)
+ _sound->beginFadeOut();
+ _sound->enableMusic(_configMusic);
+ _sound->enableSFX(_configSounds);
+ }
ConfMan.setBool("speech_mute", speechMute);
ConfMan.setBool("subtitles", subtitles);