aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2011-12-28 00:40:00 +0000
committerD G Turner2011-12-28 00:40:00 +0000
commit5492307982b3af117f2314cc22c680b48afe9689 (patch)
tree36714b83e5dc87e76d81e7ff0909f2ddef2554e1
parent4f5a708d7dc8d4040e866430df7ab019379f3e03 (diff)
downloadscummvm-rg350-5492307982b3af117f2314cc22c680b48afe9689.tar.gz
scummvm-rg350-5492307982b3af117f2314cc22c680b48afe9689.tar.bz2
scummvm-rg350-5492307982b3af117f2314cc22c680b48afe9689.zip
DREAMWEB: Move 'speechloaded' flag out of data blob.
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreambase.h2
-rw-r--r--engines/dreamweb/dreamgen.cpp4
-rw-r--r--engines/dreamweb/dreamgen.h53
-rw-r--r--engines/dreamweb/dreamweb.cpp2
-rw-r--r--engines/dreamweb/sound.cpp2
-rw-r--r--engines/dreamweb/stubs.cpp4
-rw-r--r--engines/dreamweb/talk.cpp12
8 files changed, 42 insertions, 38 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f934325131..8cf4bf4cc4 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -179,6 +179,7 @@ p = parser(skip_binary_data = [
'ch1blocksplayed',
'soundemmpage',
'speechemmpage',
+ 'speechloaded',
'lineroutine',
'increment1',
'increment2',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index b9eee14c42..07afc167c9 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -181,6 +181,8 @@ public:
uint8 _channel0Repeat;
uint8 _channel1Playing;
+ bool _speechLoaded;
+
// from backdrop.cpp
void doBlocks();
uint8 getXAd(const uint8 *setData, uint8 *result);
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 79c3672d90..53d814eb46 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -63,11 +63,11 @@ void DreamGenContext::__start() {
//0x00f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0100: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00,
//0x0110: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0120: .... .... .... ....
- 0x00, 0x00, };
+ 0x00, };
ds.assign(src, src + sizeof(src));
dreamweb();
}
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9fada482be..f1f5f96a44 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -240,33 +240,32 @@ static const uint16 kAddtogreen = 264;
static const uint16 kAddtored = 265;
static const uint16 kAddtoblue = 266;
static const uint16 kLastsoundreel = 267;
-static const uint16 kSpeechloaded = 269;
-static const uint16 kVolume = 270;
-static const uint16 kVolumeto = 271;
-static const uint16 kVolumedirection = 272;
-static const uint16 kVolumecount = 273;
-static const uint16 kLasthardkey = 274;
-static const uint16 kBufferin = 275;
-static const uint16 kBufferout = 277;
-static const uint16 kWorkspace = 279;
-static const uint16 kMainsprites = 281;
-static const uint16 kBackdrop = 283;
-static const uint16 kRecordspace = 285;
-static const uint16 kBlinkframe = 287;
-static const uint16 kBlinkcount = 288;
-static const uint16 kReasseschanges = 289;
-static const uint16 kPointerspath = 290;
-static const uint16 kManspath = 291;
-static const uint16 kPointerfirstpath = 292;
-static const uint16 kFinaldest = 293;
-static const uint16 kDestination = 294;
-static const uint16 kLinestartx = 295;
-static const uint16 kLinestarty = 297;
-static const uint16 kLineendx = 299;
-static const uint16 kLineendy = 301;
-static const uint16 kLinepointer = 303;
-static const uint16 kLinedirection = 304;
-static const uint16 kLinelength = 305;
+static const uint16 kVolume = 269;
+static const uint16 kVolumeto = 270;
+static const uint16 kVolumedirection = 271;
+static const uint16 kVolumecount = 272;
+static const uint16 kLasthardkey = 273;
+static const uint16 kBufferin = 274;
+static const uint16 kBufferout = 276;
+static const uint16 kWorkspace = 278;
+static const uint16 kMainsprites = 280;
+static const uint16 kBackdrop = 282;
+static const uint16 kRecordspace = 284;
+static const uint16 kBlinkframe = 286;
+static const uint16 kBlinkcount = 287;
+static const uint16 kReasseschanges = 288;
+static const uint16 kPointerspath = 289;
+static const uint16 kManspath = 290;
+static const uint16 kPointerfirstpath = 291;
+static const uint16 kFinaldest = 292;
+static const uint16 kDestination = 293;
+static const uint16 kLinestartx = 294;
+static const uint16 kLinestarty = 296;
+static const uint16 kLineendx = 298;
+static const uint16 kLineendy = 300;
+static const uint16 kLinepointer = 302;
+static const uint16 kLinedirection = 303;
+static const uint16 kLinelength = 304;
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 39ef5eb301..c89da250aa 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -419,6 +419,8 @@ DreamBase::DreamBase(DreamWeb::DreamWebEngine *en) :
_channel0Repeat = 0;
_channel1Playing = 0xff;
+ _speechLoaded = false;
+
_backdropBlocks = 0;
_reelList = 0;
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index ac98ad21d5..8985950d68 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -37,7 +37,7 @@ bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
//debug("name = %s", name.c_str());
bool result = engine->loadSpeech(name);
- data.byte(kSpeechloaded) = result;
+ _speechLoaded = result;
return result;
}
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 8c4d7389ca..44c5decd70 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -944,7 +944,7 @@ void DreamBase::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8
// FIXME: This fallthrough does not properly support subtitles+speech
// mode. The parameters to setuptimedtemp() are sometimes different
// for speech and for subtitles. See e.g., madmantext()
- if ((data.byte(kSpeechloaded) == 1) && !_subtitles)
+ if (_speechLoaded && !_subtitles)
return;
}
#endif
@@ -1703,7 +1703,7 @@ bool DreamBase::isCD() {
// This is a hack to guess which version to use with the assumption that if we have a cd version
// we managed to load the speech. At least it is isolated in this function and can be changed.
// Maybe detect the version during game id?
- return (data.byte(kSpeechloaded) == 1);
+ return (_speechLoaded);
}
void DreamBase::showIcon() {
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 992fea29a8..ed52e76bd7 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -66,7 +66,7 @@ void DreamBase::talk() {
redrawMainScrn();
workToScreenM();
- if (data.byte(kSpeechloaded) == 1) {
+ if (_speechLoaded) {
cancelCh1();
data.byte(kVolumedirection) = (byte)-1;
data.byte(kVolumeto) = 0;
@@ -98,9 +98,9 @@ void DreamBase::startTalk() {
y = 80;
printDirect(&str, 66, &y, 241, true);
- data.byte(kSpeechloaded) = 0;
+ _speechLoaded = false;
loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F));
- if (data.byte(kSpeechloaded) == 1) {
+ if (_speechLoaded) {
data.byte(kVolumedirection) = 1;
data.byte(kVolumeto) = 6;
playChannel1(50 + 12);
@@ -155,7 +155,7 @@ void DreamBase::doSomeTalk() {
printDirect(str, 164, 64, 144, false);
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
- if (data.byte(kSpeechloaded) != 0)
+ if (_speechLoaded)
playChannel1(62);
data.byte(kPointermode) = 3;
@@ -181,7 +181,7 @@ void DreamBase::doSomeTalk() {
printDirect(str, 48, 128, 144, false);
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
- if (data.byte(kSpeechloaded) != 0)
+ if (_speechLoaded)
playChannel1(62);
data.byte(kPointermode) = 3;
@@ -223,7 +223,7 @@ bool DreamBase::hangOnPQ() {
return true;
}
- if (data.byte(kSpeechloaded) == 1 && _channel1Playing == 255) {
+ if (_speechLoaded && _channel1Playing == 255) {
speechFlag++;
if (speechFlag == 40)
break;