diff options
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r-- | scumm/script_v2.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index d3ff6aba1c..720b01df76 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -950,15 +950,15 @@ void Scumm_v2::o2_drawSentence() { strcat(sentence, (const char*)temp); } + // For V1 games, the engine must compute the preposition. + // In all other Scumm versions, this is done by the sentence script. if ((_version == 1) && (VAR(VAR_SENTENCE_PREPOSITION) == 0)) { - byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1)) + 12; - int prep = (*ptr >> 5); - VerbSlot *vs = &_verbs[slot]; - - if (vs->prep == 0xFF) - VAR(VAR_SENTENCE_PREPOSITION) = (*ptr >> 5); - else - VAR(VAR_SENTENCE_PREPOSITION) = vs->prep; + if (_verbs[slot].prep == 0xFF) { + byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1)); + assert(ptr); + VAR(VAR_SENTENCE_PREPOSITION) = (*(ptr+12) >> 5); + } else + VAR(VAR_SENTENCE_PREPOSITION) = _verbs[slot].prep; } } |