diff options
author | Max Horn | 2003-05-16 22:11:49 +0000 |
---|---|---|
committer | Max Horn | 2003-05-16 22:11:49 +0000 |
commit | 64d9c75c2d53715645178b18624248c365f13d06 (patch) | |
tree | 4c0398c36969eebbbb8d84a25373ba688ed59df2 | |
parent | 5a15ce808a61b29dc902e3cb039b8ebb515409b3 (diff) | |
download | scummvm-rg350-64d9c75c2d53715645178b18624248c365f13d06.tar.gz scummvm-rg350-64d9c75c2d53715645178b18624248c365f13d06.tar.bz2 scummvm-rg350-64d9c75c2d53715645178b18624248c365f13d06.zip |
cleanup
svn-id: r7583
-rw-r--r-- | scumm/intern.h | 4 | ||||
-rw-r--r-- | scumm/script_v2.cpp | 13 | ||||
-rw-r--r-- | scumm/vars.cpp | 3 |
3 files changed, 14 insertions, 6 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 30bb7303d4..a129fa5605 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -274,6 +274,10 @@ protected: void o2_waitForSentence(); void o2_walkActorTo(); void o2_walkActorToObject(); + + byte VAR_SENTENCE_VERB; + byte VAR_SENTENCE_OBJECT1; + byte VAR_SENTENCE_OBJECT2; }; class Scumm_v4 : public Scumm_v3 { diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index b6c79e2c92..25d9372a88 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -866,27 +866,28 @@ void Scumm_v2::o2_doSentence() { _sentenceNum--; warning("TODO o2_doSentence(%d, %d, %d): print", st->verb, st->objectA, st->objectB); - _scummVars[26] = st->verb; - _scummVars[27] = st->objectA; - _scummVars[28] = st->objectB; + _scummVars[VAR_SENTENCE_VERB] = st->verb; + _scummVars[VAR_SENTENCE_OBJECT1] = st->objectA; + _scummVars[VAR_SENTENCE_OBJECT2] = st->objectB; o2_drawSentence(); break; } } void Scumm_v2::o2_drawSentence() { - byte *verb_bit = getResourceAddress(rtVerb, getVerbSlot(_scummVars[26],0)); + int slot = getVerbSlot(_scummVars[VAR_SENTENCE_VERB],0); + byte *verb_bit = getResourceAddress(rtVerb, slot); byte *name_bit, *name2_bit; if (_scummVars[27] > 0) { - name_bit = getObjOrActorName(_scummVars[27]); + name_bit = getObjOrActorName(_scummVars[VAR_SENTENCE_OBJECT1]); } else { name_bit = NULL; //(byte*)strdup(""); } if (_scummVars[28] > 0) { - name2_bit = getObjOrActorName(_scummVars[28]); + name2_bit = getObjOrActorName(_scummVars[VAR_SENTENCE_OBJECT2]); } else { name2_bit = NULL; //(byte*)strdup(""); diff --git a/scumm/vars.cpp b/scumm/vars.cpp index f8c57cfc0b..42179556a7 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -115,6 +115,9 @@ void Scumm_v2::setupScummVars() { VAR_CAMERA_MIN_X = 23; VAR_CAMERA_MAX_X = 24; VAR_TIMER_NEXT = 25; + VAR_SENTENCE_VERB = 26; + VAR_SENTENCE_OBJECT1 = 27; + VAR_SENTENCE_OBJECT2 = 28; VAR_VIRT_MOUSE_X = 30; VAR_VIRT_MOUSE_Y = 31; VAR_ROOM_RESOURCE = 36; |