mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-21 01:08:25 +00:00
DREAMWEB: Add Dreambase::loadSpeech method
This commit is contained in:
parent
864ab1b265
commit
5d80fda3a4
@ -99,6 +99,7 @@ public:
|
||||
void showNames();
|
||||
|
||||
// from sound.cpp
|
||||
bool loadSpeech(byte type1, int idx1, byte type2, int idx2);
|
||||
void volumeAdjust();
|
||||
void cancelCh0();
|
||||
void cancelCh1();
|
||||
|
@ -31,14 +31,21 @@
|
||||
namespace DreamGen {
|
||||
|
||||
void DreamGenContext::loadSpeech() {
|
||||
cancelCh1();
|
||||
data.byte(kSpeechloaded) = 0;
|
||||
Common::String name = Common::String::format("%c%02d%c%04d.RAW", (uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax);
|
||||
//debug("name = %s", name.c_str());
|
||||
if (engine->loadSpeech(name))
|
||||
data.byte(kSpeechloaded) = 1;
|
||||
loadSpeech((uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax);
|
||||
}
|
||||
|
||||
bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
|
||||
cancelCh1();
|
||||
|
||||
Common::String name = Common::String::format("%c%02d%c%04d.RAW", type1, idx1, type2, idx2);
|
||||
//debug("name = %s", name.c_str());
|
||||
bool result = engine->loadSpeech(name);
|
||||
|
||||
data.byte(kSpeechloaded) = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void DreamBase::volumeAdjust() {
|
||||
if (data.byte(kVolumedirection) == 0)
|
||||
return;
|
||||
|
@ -888,23 +888,9 @@ void DreamGenContext::useTimedText() {
|
||||
void DreamGenContext::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {
|
||||
#if 1 // if cd
|
||||
if (voiceIndex != 0) {
|
||||
push(ax);
|
||||
push(bx);
|
||||
push(cx);
|
||||
push(dx);
|
||||
dl = 'T';
|
||||
dh = voiceIndex;
|
||||
cl = 'T';
|
||||
ah = 0;
|
||||
al = textIndex;
|
||||
loadSpeech();
|
||||
if (data.byte(kSpeechloaded) == 1) {
|
||||
if (loadSpeech('T', voiceIndex, 'T', textIndex)) {
|
||||
playChannel1(50+12);
|
||||
}
|
||||
dx = pop();
|
||||
cx = pop();
|
||||
bx = pop();
|
||||
ax = pop();
|
||||
|
||||
// FIXME: This fallthrough does not properly support subtitles+speech
|
||||
// mode. The parameters to setuptimedtemp() are sometimes different
|
||||
@ -4239,12 +4225,7 @@ void DreamGenContext::monkSpeaking() {
|
||||
hangOn(300);
|
||||
|
||||
for (int i = 40; i <= 48; i++) {
|
||||
dl = 'T';
|
||||
dh = 83;
|
||||
cl = 'T';
|
||||
ah = 0;
|
||||
al = i;
|
||||
loadSpeech();
|
||||
loadSpeech('T', 83, 'T', i);
|
||||
|
||||
playChannel1(50 + 12);
|
||||
|
||||
|
@ -528,6 +528,9 @@
|
||||
void selectLocation();
|
||||
void showGroup();
|
||||
void loadSpeech();
|
||||
bool loadSpeech(byte type1, int idx1, byte type2, int idx2) {
|
||||
return DreamBase::loadSpeech(type1, idx1, type2, idx2);
|
||||
}
|
||||
void getTime();
|
||||
void set16ColPalette();
|
||||
void examineInventory();
|
||||
|
Loading…
Reference in New Issue
Block a user