diff options
author | Strangerke | 2014-06-09 18:11:18 +0200 |
---|---|---|
committer | Strangerke | 2014-06-09 18:11:18 +0200 |
commit | b0685aebc6cedb9ccb8106fc495f11713a6b572f (patch) | |
tree | 521f002d9d5243ae6aaa45be06239cefa765b157 /engines/cruise | |
parent | 10f65a3c6ff96b590d4caa30503e0b5671dd91ca (diff) | |
download | scummvm-rg350-b0685aebc6cedb9ccb8106fc495f11713a6b572f.tar.gz scummvm-rg350-b0685aebc6cedb9ccb8106fc495f11713a6b572f.tar.bz2 scummvm-rg350-b0685aebc6cedb9ccb8106fc495f11713a6b572f.zip |
CRUISE: Initialize some variables
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/function.cpp | 3 | ||||
-rw-r--r-- | engines/cruise/sound.cpp | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 33f3bbaf4a..c530074969 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -1512,6 +1512,9 @@ int16 Op_Itoa() { int param[160]; char txt[40]; + for (int i = 0; i < 160; ++i) + param[i] = 0; + for (int i = nbp - 1; i >= 0; i--) param[i] = popVar(); diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index cc9a17eb9a..0b0fab8c4a 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -607,6 +607,13 @@ PCSoundFxPlayer::PCSoundFxPlayer(PCSoundDriver *driver) _sfxData = NULL; _fadeOutCounter = 0; _driver->setUpdateCallback(updateCallback, this); + + _currentPos = 0; + _currentOrder = 0; + _numOrders = 0; + _eventsDelay = 0; + _looping = false; + _updateTicksCounter = 0; } PCSoundFxPlayer::~PCSoundFxPlayer() { @@ -792,6 +799,7 @@ PCSound::PCSound(Audio::Mixer *mixer, CruiseEngine *vm) { _mixer = mixer; _soundDriver = new AdLibSoundDriverADL(_mixer); _player = new PCSoundFxPlayer(_soundDriver); + _genVolume = 0; } PCSound::~PCSound() { |