diff options
author | Torbjörn Andersson | 2004-03-17 09:03:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-03-17 09:03:15 +0000 |
commit | 4c3a68027f7f84a58664f77c847d24ab5b9757e4 (patch) | |
tree | bf20e888b9ea1cc2045df84aad12ef1cd54ec7de /sword2/sound.cpp | |
parent | 03200025dfb030d887ff9b07d180a8f9e2f225bc (diff) | |
download | scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.gz scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.tar.bz2 scummvm-rg350-4c3a68027f7f84a58664f77c847d24ab5b9757e4.zip |
Use the same syntax for accessing script variables as BS1 does, i.e. now
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it
makes it much easier to tell the difference between variables and constants
when looking at the code.
Of course, this sort of sweeping changes is jolly good for introducing
truly weird regressions, which is why I waited until after 0.6.0.
svn-id: r13331
Diffstat (limited to 'sword2/sound.cpp')
-rw-r--r-- | sword2/sound.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sword2/sound.cpp b/sword2/sound.cpp index 90e1356e65..cc8b199cfe 100644 --- a/sword2/sound.cpp +++ b/sword2/sound.cpp @@ -258,7 +258,7 @@ int32 Logic::fnPlayFx(int32 *params) { // in case we want to call fnStopFx() later, to kill this fx // (mainly for FX_LOOP & FX_RANDOM) - RESULT = j; + _scriptVars[RESULT] = j; return IR_CONT; } @@ -367,7 +367,7 @@ int32 Logic::fnPlayMusic(int32 *params) { // add the appropriate file extension & play it - if (DEMO) { + if (_scriptVars[DEMO]) { // The demo I found didn't come with any music file, but you // could use the music from the first CD of the complete game, // I suppose... @@ -407,7 +407,7 @@ int32 Logic::fnCheckMusicPlaying(int32 *params) { // or 0 if no music playing // in seconds, rounded up to the nearest second - RESULT = _vm->_sound->musicTimeRemaining(); + _scriptVars[RESULT] = _vm->_sound->musicTimeRemaining(); return IR_CONT; } |