[Scummvm-cvs-logs] SF.net SVN: scummvm:[35373] scummvm/trunk/engines/gob/sound

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Mon Dec 15 03:16:46 CET 2008


Revision: 35373
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35373&view=rev
Author:   drmccoy
Date:     2008-12-15 02:16:45 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
No background "music" shading in Urban Runner

Modified Paths:
--------------
    scummvm/trunk/engines/gob/sound/bgatmosphere.cpp
    scummvm/trunk/engines/gob/sound/bgatmosphere.h
    scummvm/trunk/engines/gob/sound/sound.cpp

Modified: scummvm/trunk/engines/gob/sound/bgatmosphere.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/bgatmosphere.cpp	2008-12-15 01:45:16 UTC (rev 35372)
+++ scummvm/trunk/engines/gob/sound/bgatmosphere.cpp	2008-12-15 02:16:45 UTC (rev 35373)
@@ -36,6 +36,7 @@
 	_playMode = kPlayModeLinear;
 	_queuePos = -1;
 	_shaded = false;
+	_shadable = true;
 
 	g_system->getEventManager()->registerRandomSource(_rnd, "gobBA");
 }
@@ -115,12 +116,26 @@
 	}
 }
 
+void BackgroundAtmosphere::setShadable(bool shadable) {
+	if (!shadable) {
+		unshade();
+		_shadable = false;
+	} else
+		_shadable = true;
+}
+
 void BackgroundAtmosphere::shade() {
+	if (!_shadable)
+		return;
+
 	_shaded = true;
 	_fadeVol = 32768;
 }
 
 void BackgroundAtmosphere::unshade() {
+	if (!_shadable)
+		return;
+
 	_shaded = false;
 	_fadeVol = 65536;
 }

Modified: scummvm/trunk/engines/gob/sound/bgatmosphere.h
===================================================================
--- scummvm/trunk/engines/gob/sound/bgatmosphere.h	2008-12-15 01:45:16 UTC (rev 35372)
+++ scummvm/trunk/engines/gob/sound/bgatmosphere.h	2008-12-15 02:16:45 UTC (rev 35373)
@@ -52,6 +52,7 @@
 	void queueSample(SoundDesc &sndDesc);
 	void queueClear();
 
+	void setShadable(bool shadable);
 	void shade();
 	void unshade();
 
@@ -61,6 +62,7 @@
 	Common::Array<SoundDesc *> _queue;
 	int _queuePos;
 	bool _shaded;
+	bool _shadable;
 
 	Common::Mutex _mutex;
 

Modified: scummvm/trunk/engines/gob/sound/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/sound.cpp	2008-12-15 01:45:16 UTC (rev 35372)
+++ scummvm/trunk/engines/gob/sound/sound.cpp	2008-12-15 02:16:45 UTC (rev 35373)
@@ -50,8 +50,10 @@
 		_cdrom = new CDROM;
 	if (_vm->getGameType() == kGameTypeWoodruff)
 		_bgatmos = new BackgroundAtmosphere(*_vm->_mixer);
-	if (_vm->getGameType() == kGameTypeUrban)
+	if (_vm->getGameType() == kGameTypeUrban) {
 		_bgatmos = new BackgroundAtmosphere(*_vm->_mixer);
+		_bgatmos->setShadable(false);
+	}
 }
 
 Sound::~Sound() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list