mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
DREAMWEB: Move 'speechloaded' flag out of data blob.
This commit is contained in:
parent
4f5a708d7d
commit
5492307982
@ -179,6 +179,7 @@ p = parser(skip_binary_data = [
|
|||||||
'ch1blocksplayed',
|
'ch1blocksplayed',
|
||||||
'soundemmpage',
|
'soundemmpage',
|
||||||
'speechemmpage',
|
'speechemmpage',
|
||||||
|
'speechloaded',
|
||||||
'lineroutine',
|
'lineroutine',
|
||||||
'increment1',
|
'increment1',
|
||||||
'increment2',
|
'increment2',
|
||||||
|
@ -181,6 +181,8 @@ public:
|
|||||||
uint8 _channel0Repeat;
|
uint8 _channel0Repeat;
|
||||||
uint8 _channel1Playing;
|
uint8 _channel1Playing;
|
||||||
|
|
||||||
|
bool _speechLoaded;
|
||||||
|
|
||||||
// from backdrop.cpp
|
// from backdrop.cpp
|
||||||
void doBlocks();
|
void doBlocks();
|
||||||
uint8 getXAd(const uint8 *setData, uint8 *result);
|
uint8 getXAd(const uint8 *setData, uint8 *result);
|
||||||
|
@ -63,11 +63,11 @@ void DreamGenContext::__start() {
|
|||||||
//0x00f0: .... .... .... ....
|
//0x00f0: .... .... .... ....
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
//0x0100: .... .... .... ....
|
//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: .... .... .... ....
|
//0x0110: .... .... .... ....
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
//0x0120: .... .... .... ....
|
//0x0120: .... .... .... ....
|
||||||
0x00, 0x00, };
|
0x00, };
|
||||||
ds.assign(src, src + sizeof(src));
|
ds.assign(src, src + sizeof(src));
|
||||||
dreamweb();
|
dreamweb();
|
||||||
}
|
}
|
||||||
|
@ -240,33 +240,32 @@ static const uint16 kAddtogreen = 264;
|
|||||||
static const uint16 kAddtored = 265;
|
static const uint16 kAddtored = 265;
|
||||||
static const uint16 kAddtoblue = 266;
|
static const uint16 kAddtoblue = 266;
|
||||||
static const uint16 kLastsoundreel = 267;
|
static const uint16 kLastsoundreel = 267;
|
||||||
static const uint16 kSpeechloaded = 269;
|
static const uint16 kVolume = 269;
|
||||||
static const uint16 kVolume = 270;
|
static const uint16 kVolumeto = 270;
|
||||||
static const uint16 kVolumeto = 271;
|
static const uint16 kVolumedirection = 271;
|
||||||
static const uint16 kVolumedirection = 272;
|
static const uint16 kVolumecount = 272;
|
||||||
static const uint16 kVolumecount = 273;
|
static const uint16 kLasthardkey = 273;
|
||||||
static const uint16 kLasthardkey = 274;
|
static const uint16 kBufferin = 274;
|
||||||
static const uint16 kBufferin = 275;
|
static const uint16 kBufferout = 276;
|
||||||
static const uint16 kBufferout = 277;
|
static const uint16 kWorkspace = 278;
|
||||||
static const uint16 kWorkspace = 279;
|
static const uint16 kMainsprites = 280;
|
||||||
static const uint16 kMainsprites = 281;
|
static const uint16 kBackdrop = 282;
|
||||||
static const uint16 kBackdrop = 283;
|
static const uint16 kRecordspace = 284;
|
||||||
static const uint16 kRecordspace = 285;
|
static const uint16 kBlinkframe = 286;
|
||||||
static const uint16 kBlinkframe = 287;
|
static const uint16 kBlinkcount = 287;
|
||||||
static const uint16 kBlinkcount = 288;
|
static const uint16 kReasseschanges = 288;
|
||||||
static const uint16 kReasseschanges = 289;
|
static const uint16 kPointerspath = 289;
|
||||||
static const uint16 kPointerspath = 290;
|
static const uint16 kManspath = 290;
|
||||||
static const uint16 kManspath = 291;
|
static const uint16 kPointerfirstpath = 291;
|
||||||
static const uint16 kPointerfirstpath = 292;
|
static const uint16 kFinaldest = 292;
|
||||||
static const uint16 kFinaldest = 293;
|
static const uint16 kDestination = 293;
|
||||||
static const uint16 kDestination = 294;
|
static const uint16 kLinestartx = 294;
|
||||||
static const uint16 kLinestartx = 295;
|
static const uint16 kLinestarty = 296;
|
||||||
static const uint16 kLinestarty = 297;
|
static const uint16 kLineendx = 298;
|
||||||
static const uint16 kLineendx = 299;
|
static const uint16 kLineendy = 300;
|
||||||
static const uint16 kLineendy = 301;
|
static const uint16 kLinepointer = 302;
|
||||||
static const uint16 kLinepointer = 303;
|
static const uint16 kLinedirection = 303;
|
||||||
static const uint16 kLinedirection = 304;
|
static const uint16 kLinelength = 304;
|
||||||
static const uint16 kLinelength = 305;
|
|
||||||
static const uint16 kBlocktextdat = (0);
|
static const uint16 kBlocktextdat = (0);
|
||||||
static const uint16 kPersonframes = (0);
|
static const uint16 kPersonframes = (0);
|
||||||
static const uint16 kDebuglevel1 = (0);
|
static const uint16 kDebuglevel1 = (0);
|
||||||
|
@ -419,6 +419,8 @@ DreamBase::DreamBase(DreamWeb::DreamWebEngine *en) :
|
|||||||
_channel0Repeat = 0;
|
_channel0Repeat = 0;
|
||||||
_channel1Playing = 0xff;
|
_channel1Playing = 0xff;
|
||||||
|
|
||||||
|
_speechLoaded = false;
|
||||||
|
|
||||||
_backdropBlocks = 0;
|
_backdropBlocks = 0;
|
||||||
_reelList = 0;
|
_reelList = 0;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
|
|||||||
//debug("name = %s", name.c_str());
|
//debug("name = %s", name.c_str());
|
||||||
bool result = engine->loadSpeech(name);
|
bool result = engine->loadSpeech(name);
|
||||||
|
|
||||||
data.byte(kSpeechloaded) = result;
|
_speechLoaded = result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -944,7 +944,7 @@ void DreamBase::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8
|
|||||||
// FIXME: This fallthrough does not properly support subtitles+speech
|
// FIXME: This fallthrough does not properly support subtitles+speech
|
||||||
// mode. The parameters to setuptimedtemp() are sometimes different
|
// mode. The parameters to setuptimedtemp() are sometimes different
|
||||||
// for speech and for subtitles. See e.g., madmantext()
|
// for speech and for subtitles. See e.g., madmantext()
|
||||||
if ((data.byte(kSpeechloaded) == 1) && !_subtitles)
|
if (_speechLoaded && !_subtitles)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// 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.
|
// 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?
|
// Maybe detect the version during game id?
|
||||||
return (data.byte(kSpeechloaded) == 1);
|
return (_speechLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamBase::showIcon() {
|
void DreamBase::showIcon() {
|
||||||
|
@ -66,7 +66,7 @@ void DreamBase::talk() {
|
|||||||
|
|
||||||
redrawMainScrn();
|
redrawMainScrn();
|
||||||
workToScreenM();
|
workToScreenM();
|
||||||
if (data.byte(kSpeechloaded) == 1) {
|
if (_speechLoaded) {
|
||||||
cancelCh1();
|
cancelCh1();
|
||||||
data.byte(kVolumedirection) = (byte)-1;
|
data.byte(kVolumedirection) = (byte)-1;
|
||||||
data.byte(kVolumeto) = 0;
|
data.byte(kVolumeto) = 0;
|
||||||
@ -98,9 +98,9 @@ void DreamBase::startTalk() {
|
|||||||
y = 80;
|
y = 80;
|
||||||
printDirect(&str, 66, &y, 241, true);
|
printDirect(&str, 66, &y, 241, true);
|
||||||
|
|
||||||
data.byte(kSpeechloaded) = 0;
|
_speechLoaded = false;
|
||||||
loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F));
|
loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F));
|
||||||
if (data.byte(kSpeechloaded) == 1) {
|
if (_speechLoaded) {
|
||||||
data.byte(kVolumedirection) = 1;
|
data.byte(kVolumedirection) = 1;
|
||||||
data.byte(kVolumeto) = 6;
|
data.byte(kVolumeto) = 6;
|
||||||
playChannel1(50 + 12);
|
playChannel1(50 + 12);
|
||||||
@ -155,7 +155,7 @@ void DreamBase::doSomeTalk() {
|
|||||||
printDirect(str, 164, 64, 144, false);
|
printDirect(str, 164, 64, 144, false);
|
||||||
|
|
||||||
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
|
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
|
||||||
if (data.byte(kSpeechloaded) != 0)
|
if (_speechLoaded)
|
||||||
playChannel1(62);
|
playChannel1(62);
|
||||||
|
|
||||||
data.byte(kPointermode) = 3;
|
data.byte(kPointermode) = 3;
|
||||||
@ -181,7 +181,7 @@ void DreamBase::doSomeTalk() {
|
|||||||
printDirect(str, 48, 128, 144, false);
|
printDirect(str, 48, 128, 144, false);
|
||||||
|
|
||||||
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
|
loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
|
||||||
if (data.byte(kSpeechloaded) != 0)
|
if (_speechLoaded)
|
||||||
playChannel1(62);
|
playChannel1(62);
|
||||||
|
|
||||||
data.byte(kPointermode) = 3;
|
data.byte(kPointermode) = 3;
|
||||||
@ -223,7 +223,7 @@ bool DreamBase::hangOnPQ() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.byte(kSpeechloaded) == 1 && _channel1Playing == 255) {
|
if (_speechLoaded && _channel1Playing == 255) {
|
||||||
speechFlag++;
|
speechFlag++;
|
||||||
if (speechFlag == 40)
|
if (speechFlag == 40)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user