[Scummvm-cvs-logs] scummvm master -> b4ebed792eeaf0fb58c5105639e2dd11bb696336

dreammaster dreammaster at scummvm.org
Wed Sep 17 04:11:48 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b4ebed792e MADS: Further resource entry initialization


Commit: b4ebed792eeaf0fb58c5105639e2dd11bb696336
    https://github.com/scummvm/scummvm/commit/b4ebed792eeaf0fb58c5105639e2dd11bb696336
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-09-16T22:10:37-04:00

Commit Message:
MADS: Further resource entry initialization

Changed paths:
    engines/mads/nebular/menu_nebular.cpp
    engines/mads/nebular/menu_nebular.h



diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 979c14f..d303dd7 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 3959244..3bfee2d 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;






More information about the Scummvm-git-logs mailing list