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

digitall digitall at scummvm.org
Tue Dec 27 06:00:40 CET 2011


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:
ead3089fa2 DREAMWEB: Move kCurrentsample out of data blob.


Commit: ead3089fa2aa0f6743872c891c5eb71db1e640bd
    https://github.com/scummvm/scummvm/commit/ead3089fa2aa0f6743872c891c5eb71db1e640bd
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-26T20:59:56-08:00

Commit Message:
DREAMWEB: Move kCurrentsample out of data blob.

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreambase.h
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/dreamweb.cpp
    engines/dreamweb/sound.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index d5db8b0..eef43a4 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -132,6 +132,7 @@ p = parser(skip_binary_data = [
 	'money2poke',
 	# vars.asm
 	'currentset',
+	'currentsample',
 	'icons1',
 	'icons2',
 	'tempcharset',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 14e3349..44d62db 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -119,6 +119,7 @@ public:
 	bool _foreignRelease;
 
 	uint8 _roomsSample;
+	uint8 _currentSample;
 
 	// from backdrop.cpp
 	void doBlocks();
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7c4d9ba..2b5c36c 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -75,7 +75,7 @@ void DreamGenContext::__start() {
 		//0x0150: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0160: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, };
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 65293fa..e40acf1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -305,7 +305,6 @@ static const uint16 kCh0playing = 372;
 static const uint16 kCh0repeat = 373;
 static const uint16 kCh1playing = 374;
 static const uint16 kCh1blockstocopy = 375;
-static const uint16 kCurrentsample = 377;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index f1d5c54..fa9bece 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -418,6 +418,8 @@ namespace DreamGen {
 DreamBase::DreamBase(DreamWeb::DreamWebEngine *en) : engine(en) {
 	_openChangeSize = kInventx+(4*kItempicsize);
 	_quitRequested = false;
+
+	_currentSample = 0xff;
 }
 
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 8348219..e99c7da 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -99,12 +99,12 @@ void DreamBase::cancelCh1() {
 void DreamBase::loadRoomsSample() {
 	uint8 sample = _roomsSample;
 
-	if (sample == 255 || data.byte(kCurrentsample) == sample)
+	if (sample == 255 || _currentSample == sample)
 		return; // loaded already
 
 	assert(sample < 100);
 	Common::String sampleName = Common::String::format("DREAMWEB.V%02d", sample);
-	data.byte(kCurrentsample) = sample;
+	_currentSample = sample;
 
 	uint8 ch0 = data.byte(kCh0playing);
 	if (ch0 >= 12 && ch0 != 255)






More information about the Scummvm-git-logs mailing list