[Scummvm-cvs-logs] SF.net SVN: scummvm:[41549] scummvm/branches/gsoc2009-mods

nolange at users.sourceforge.net nolange at users.sourceforge.net
Mon Jun 15 19:03:49 CEST 2009


Revision: 41549
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41549&view=rev
Author:   nolange
Date:     2009-06-15 17:03:49 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
Fixed a bug which caused MI Song 3 to loop forever. Made my hack to automatically stop the player after all Patterns are stopped dependend on a variable.

Modified Paths:
--------------
    scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
    scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h
    scummvm/branches/gsoc2009-mods/tfmx/tfmxdebug.cpp

Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp	2009-06-15 14:47:39 UTC (rev 41548)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp	2009-06-15 17:03:49 UTC (rev 41549)
@@ -49,6 +49,7 @@
 : Paula(stereo, rate), _resource()  {
 	_playerCtx.enabled = false;
 	_playerCtx.song = -1;
+	_playerCtx.stopWithLastPattern = true;
 
 	for (int i = 0; i < kNumVoices; ++i) 
 		_channelCtx[i].paulaChannel = (byte)i;
@@ -494,7 +495,7 @@
 			goto doTrackstep;
 		}
 	}
-	if (!runningPatterns) {
+	if (_playerCtx.stopWithLastPattern && !runningPatterns) {
 		_playerCtx.enabled = 0;
 		stopPaula();
 	}
@@ -638,14 +639,13 @@
 			
 			// if highest bit is set then keep previous pattern
 			if (patNum < 0x80) {
-				_patternCtx[i].command = (uint8)patNum;
 				_patternCtx[i].step = 0;
 				_patternCtx[i].wait = 0;
 				_patternCtx[i].loopCount = 0xFF;
 				_patternCtx[i].offset = _patternOffset[patNum];
 			}
 
-			// second byte expose is always set
+			_patternCtx[i].command = (uint8)patNum;
 			_patternCtx[i].expose = patCmd & 0xFF;
 		}
 		return false;

Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h	2009-06-15 14:47:39 UTC (rev 41548)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.h	2009-06-15 17:03:49 UTC (rev 41549)
@@ -203,6 +203,8 @@
 		int8	fadeSlope; */
 
 		int		tickCount;
+
+		bool	stopWithLastPattern; //!< hack to automatically stop the whole player if no Pattern is running
 	} _playerCtx;
 
 	void initMacroProgramm(ChannelContext &channel) {

Modified: scummvm/branches/gsoc2009-mods/tfmx/tfmxdebug.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/tfmx/tfmxdebug.cpp	2009-06-15 14:47:39 UTC (rev 41548)
+++ scummvm/branches/gsoc2009-mods/tfmx/tfmxdebug.cpp	2009-06-15 17:03:49 UTC (rev 41549)
@@ -23,7 +23,7 @@
 	"Fade[speed /endvolume.b]",
 	"PPat[patt./track+transp]",
 	"Lock---------ch./time.b]",
-	"----------No entry------",
+	"Cue [number.b/  value.w]",
 	"Stop-Stop custompattern-",
 	"NOP!-no operation-------"
 };


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