diff options
author | Max Horn | 2003-05-17 18:42:31 +0000 |
---|---|---|
committer | Max Horn | 2003-05-17 18:42:31 +0000 |
commit | 3576b8e16882f0e8f033679bf293bc3b3a3ab618 (patch) | |
tree | 2b15181ad6f173a44bb1e0c91d011d76cca3516b | |
parent | 30271732bef9c7292b750d94705d4927ff876996 (diff) | |
download | scummvm-rg350-3576b8e16882f0e8f033679bf293bc3b3a3ab618.tar.gz scummvm-rg350-3576b8e16882f0e8f033679bf293bc3b3a3ab618.tar.bz2 scummvm-rg350-3576b8e16882f0e8f033679bf293bc3b3a3ab618.zip |
yet another V2 sentence fix (now clicking on objects in Zak causes Zak to talk to it - but he gets stuck after some time)
svn-id: r7613
-rw-r--r-- | scumm/intern.h | 4 | ||||
-rw-r--r-- | scumm/script.cpp | 13 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 4 | ||||
-rw-r--r-- | scumm/vars.cpp | 1 |
5 files changed, 19 insertions, 7 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 7be574c5fc..d00399fcfc 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -278,10 +278,6 @@ protected: byte VAR_SENTENCE_VERB; byte VAR_SENTENCE_OBJECT1; byte VAR_SENTENCE_OBJECT2; - - byte VAR_ACTIVE_VERB; - byte VAR_ACTIVE_OBJECT1; - byte VAR_ACTIVE_OBJECT2; }; class Scumm_v4 : public Scumm_v3 { diff --git a/scumm/script.cpp b/scumm/script.cpp index 1ab646673e..5d98e311db 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -759,9 +759,16 @@ void Scumm::checkAndRunSentenceScript() { if (_sentence[_sentenceNum].unk2 && _sentence[_sentenceNum].objectB == _sentence[_sentenceNum].objectA) return; - _localParamList[0] = _sentence[_sentenceNum].verb; - _localParamList[1] = _sentence[_sentenceNum].objectA; - _localParamList[2] = _sentence[_sentenceNum].objectB; + if (_features & GF_AFTER_V2) { + _scummVars[VAR_ACTIVE_VERB] = _sentence[_sentenceNum].verb; + _scummVars[VAR_ACTIVE_OBJECT1] = _sentence[_sentenceNum].objectA; + _scummVars[VAR_ACTIVE_OBJECT2] = _sentence[_sentenceNum].objectB; + _scummVars[VAR_VERB_ALLOWED] = (0 != getVerbEntrypoint(_sentence[_sentenceNum].objectA, _sentence[_sentenceNum].verb)); + } else { + _localParamList[0] = _sentence[_sentenceNum].verb; + _localParamList[1] = _sentence[_sentenceNum].objectA; + _localParamList[2] = _sentence[_sentenceNum].objectB; + } _currentScript = 0xFF; if (sentenceScript) runScript(sentenceScript, 0, 0, _localParamList); diff --git a/scumm/scumm.h b/scumm/scumm.h index 7fe857e411..e93fa6e3fb 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1150,6 +1150,10 @@ public: byte VAR_CUSTOMSCALETABLE; byte VAR_V6_SOUNDMODE; + byte VAR_VERB_ALLOWED; + byte VAR_ACTIVE_VERB; + byte VAR_ACTIVE_OBJECT1; + byte VAR_ACTIVE_OBJECT2; byte VAR_CLICK_AREA; }; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 59b2c33129..bd55420eea 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -508,6 +508,10 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) VAR_CUSTOMSCALETABLE = 0xFF; VAR_V6_SOUNDMODE = 0xFF; + VAR_ACTIVE_VERB = 0xFF; + VAR_ACTIVE_OBJECT1 = 0xFF; + VAR_ACTIVE_OBJECT2 = 0xFF; + VAR_VERB_ALLOWED = 0xFF; VAR_CLICK_AREA = 0xFF; diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 36f6c316f1..68a2ab4677 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -113,6 +113,7 @@ void Scumm_v2::setupScummVars() { VAR_CURRENT_LIGHTS = 12; VAR_CURRENTDRIVE = 13; VAR_MUSIC_TIMER = 17; + VAR_VERB_ALLOWED = 18; VAR_ACTOR_RANGE_MIN = 19; VAR_ACTOR_RANGE_MAX = 20; VAR_CAMERA_MIN_X = 23; |