diff options
author | Paul Gilbert | 2014-09-16 22:10:37 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-09-16 22:10:37 -0400 |
commit | b4ebed792eeaf0fb58c5105639e2dd11bb696336 (patch) | |
tree | 28a4288f7a971d25e81a492f687b7f5cb5ac609a /engines/mads/nebular | |
parent | 455eb540c4cb30314468f605512e84ca2d5bf294 (diff) | |
download | scummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.tar.gz scummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.tar.bz2 scummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.zip |
MADS: Further resource entry initialization
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 11 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.h | 9 |
2 files changed, 15 insertions, 5 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 979c14f3e1..d303dd7aad 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -796,13 +796,15 @@ AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) { _soundDriverLoaded = false; _previousUpdate = 0; _screenId = -1; - _showWhiteBars = true; _resetPalette = false; _resyncMode = NEVER; _v1 = 0; _v2 = -1; _resourceIndex = -1; _currentAnimation = nullptr; + _sfx = 0; + _soundFlag = _bgLoadFlag = true; + _showWhiteBars = true; load(); } @@ -921,8 +923,8 @@ void AnimationView::processLines() { resName += c; } - _resources.push_back(ResourceEntry(resName, _sfx, false, false)); - _sfx = 0; + _resources.push_back(ResourceEntry(resName, _sfx, _soundFlag, + _bgLoadFlag, _showWhiteBars)); } // Skip any spaces @@ -939,6 +941,9 @@ void AnimationView::processCommand() { // Handle the command switch (commandChar) { + case 'B': + _soundFlag = !_soundFlag; + break; case 'H': // -h[:ex] Disable EMS / XMS high memory support if (_currentLine.hasPrefix(":")) diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h index 3959244600..3bfee2d6a6 100644 --- a/engines/mads/nebular/menu_nebular.h +++ b/engines/mads/nebular/menu_nebular.h @@ -233,13 +233,16 @@ struct ResourceEntry { int _fx; bool _soundFlag; bool _bgFlag; + bool _showWhiteBars; ResourceEntry() {} - ResourceEntry(const Common::String &resName, int fx, bool soundFlag, bool bgFlag) { + ResourceEntry(const Common::String &resName, int fx, bool soundFlag, + bool bgFlag, bool showWhiteBars) { _resourceName = resName; _fx = fx; _soundFlag = soundFlag; _bgFlag = bgFlag; + _showWhiteBars = showWhiteBars; } }; @@ -262,10 +265,12 @@ private: uint32 _previousUpdate; Common::String _currentLine; bool _soundDriverLoaded; - bool _showWhiteBars; bool _resetPalette; ResyncMode _resyncMode; int _sfx; + bool _soundFlag; + bool _bgLoadFlag; + bool _showWhiteBars; Common::Array<ResourceEntry> _resources; Common::Array<ResIndexEntry> _resIndex; int _v1; |