From ead3089fa2aa0f6743872c891c5eb71db1e640bd Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 27 Dec 2011 04:59:56 +0000 Subject: DREAMWEB: Move kCurrentsample out of data blob. --- engines/dreamweb/dreambase.h | 1 + engines/dreamweb/dreamgen.cpp | 2 +- engines/dreamweb/dreamgen.h | 1 - engines/dreamweb/dreamweb.cpp | 2 ++ engines/dreamweb/sound.cpp | 4 ++-- 5 files changed, 6 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 14e3349448..44d62db9c8 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 7c4d9baa2b..2b5c36cb34 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 65293fa8f3..e40acf1e71 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 f1d5c5415c..fa9bece268 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 83482194b7..e99c7daa43 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) -- cgit v1.2.3