hackish partial doSentence support
svn-id: r7560
This commit is contained in:
parent
26d840e4fc
commit
e1652fedea
2 changed files with 21 additions and 8 deletions
|
@ -848,7 +848,9 @@ int Scumm::getVerbEntrypoint(int obj, int entry) {
|
||||||
objptr = getOBCDFromObject(obj);
|
objptr = getOBCDFromObject(obj);
|
||||||
assert(objptr);
|
assert(objptr);
|
||||||
|
|
||||||
if (_features & GF_OLD_BUNDLE)
|
if (_features & GF_AFTER_V2)
|
||||||
|
verbptr = objptr + 15;
|
||||||
|
else if (_features & GF_OLD_BUNDLE)
|
||||||
verbptr = objptr + 17;
|
verbptr = objptr + 17;
|
||||||
else if (_features & GF_SMALL_HEADER)
|
else if (_features & GF_SMALL_HEADER)
|
||||||
verbptr = objptr + 19;
|
verbptr = objptr + 19;
|
||||||
|
|
|
@ -357,6 +357,8 @@ void Scumm_v2::setupOpcodes() {
|
||||||
_opcodesV2 = opcodes;
|
_opcodesV2 = opcodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SENTENCE_SCRIPT 2
|
||||||
|
|
||||||
void Scumm_v2::executeOpcode(byte i) {
|
void Scumm_v2::executeOpcode(byte i) {
|
||||||
OpcodeProcV2 op = _opcodesV2[i].proc;
|
OpcodeProcV2 op = _opcodesV2[i].proc;
|
||||||
(this->*op) ();
|
(this->*op) ();
|
||||||
|
@ -634,7 +636,7 @@ void Scumm_v2::o2_waitForMessage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scumm_v2::o2_waitForSentence() {
|
void Scumm_v2::o2_waitForSentence() {
|
||||||
if (_sentenceNum && !isScriptInUse(2))
|
if (_sentenceNum && !isScriptInUse(SENTENCE_SCRIPT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_scriptPointer--;
|
_scriptPointer--;
|
||||||
|
@ -828,7 +830,7 @@ void Scumm_v2::o2_doSentence() {
|
||||||
a = getVarOrDirectByte(0x80);
|
a = getVarOrDirectByte(0x80);
|
||||||
if (a == 0xFB) {
|
if (a == 0xFB) {
|
||||||
_sentenceNum = 0;
|
_sentenceNum = 0;
|
||||||
stopScriptNr(2);
|
stopScriptNr(SENTENCE_SCRIPT);
|
||||||
clearClickedStatus();
|
clearClickedStatus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -848,16 +850,29 @@ void Scumm_v2::o2_doSentence() {
|
||||||
// TODO
|
// TODO
|
||||||
switch(fetchScriptByte()) {
|
switch(fetchScriptByte()) {
|
||||||
case 1:
|
case 1:
|
||||||
// TODO - execute the sentence
|
// Execute the sentence
|
||||||
_sentenceNum--;
|
_sentenceNum--;
|
||||||
|
warning("TODO o2_doSentence(%d, %d, %d): execute", st->verb, st->unk4, st->unk3);
|
||||||
|
|
||||||
|
// FIXME / TODO: The following is hackish, and probably incomplete, but it works somewhat.
|
||||||
|
_scummVars[8] = st->verb;
|
||||||
|
_scummVars[9] = st->unk4;
|
||||||
|
_scummVars[10] = st->unk3;
|
||||||
|
runVerbCode(st->unk4, st->verb, 0, 0, NULL);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// TODO - print the sentence
|
// TODO - print the sentence
|
||||||
_sentenceNum--;
|
_sentenceNum--;
|
||||||
|
warning("TODO o2_doSentence(%d, %d, %d): print", st->verb, st->unk4, st->unk3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Scumm_v2::o2_drawSentence() {
|
||||||
|
warning("TODO o2_drawSentence()");
|
||||||
|
}
|
||||||
|
|
||||||
void Scumm_v2::o2_ifClassOfIs() {
|
void Scumm_v2::o2_ifClassOfIs() {
|
||||||
int act = getVarOrDirectWord(0x80);
|
int act = getVarOrDirectWord(0x80);
|
||||||
int clsop = getVarOrDirectByte(0x40);
|
int clsop = getVarOrDirectByte(0x40);
|
||||||
|
@ -1196,10 +1211,6 @@ void Scumm_v2::o2_getActorWalkBox() {
|
||||||
setResult(0);
|
setResult(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scumm_v2::o2_drawSentence() {
|
|
||||||
warning("TODO o2_drawSentence()");
|
|
||||||
}
|
|
||||||
|
|
||||||
void Scumm_v2::o2_dummy() {
|
void Scumm_v2::o2_dummy() {
|
||||||
warning("o2_dummy invoked (opcode %d)", _opcode);
|
warning("o2_dummy invoked (opcode %d)", _opcode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue