aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-09-16 22:10:37 -0400
committerPaul Gilbert2014-09-16 22:10:37 -0400
commitb4ebed792eeaf0fb58c5105639e2dd11bb696336 (patch)
tree28a4288f7a971d25e81a492f687b7f5cb5ac609a /engines
parent455eb540c4cb30314468f605512e84ca2d5bf294 (diff)
downloadscummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.tar.gz
scummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.tar.bz2
scummvm-rg350-b4ebed792eeaf0fb58c5105639e2dd11bb696336.zip
MADS: Further resource entry initialization
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/menu_nebular.cpp11
-rw-r--r--engines/mads/nebular/menu_nebular.h9
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;