diff options
author | James Brown | 2003-05-21 07:22:43 +0000 |
---|---|---|
committer | James Brown | 2003-05-21 07:22:43 +0000 |
commit | c3803009b42e79c3f72f4abaf0b5e3ed668f75d2 (patch) | |
tree | deea49ddb4f9e788ada7dad22b448100d394400a /scumm/script_v2.cpp | |
parent | b6dcd5cfae37304c2aff15acf320a0ac0d69a876 (diff) | |
download | scummvm-rg350-c3803009b42e79c3f72f4abaf0b5e3ed668f75d2.tar.gz scummvm-rg350-c3803009b42e79c3f72f4abaf0b5e3ed668f75d2.tar.bz2 scummvm-rg350-c3803009b42e79c3f72f4abaf0b5e3ed668f75d2.zip |
Fix this damn userface stuff properly :)
svn-id: r7772
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r-- | scumm/script_v2.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 8debf6f0bc..cabbd0e959 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -877,7 +877,7 @@ void Scumm_v2::o2_drawSentence() { static char sentence[80]; int slot = getVerbSlot(_scummVars[VAR_SENTENCE_VERB],0); - if (_userPut < 1) + if (!(_userState & 32)) return; strcpy(sentence, (char*)getResourceAddress(rtVerb, slot)); @@ -1189,7 +1189,7 @@ void Scumm_v2::o2_pickupObject() { // FIXME: Ender Quick Hack to allow further Zak testing. // In reality, we should probably stuff the inventory into verbs // as later games do. Easier hotspot tracking :) - if (_userPut < 1) + if (!(_userState & 64)) return; { int i, items = 0, curInventoryCount = 0; @@ -1271,24 +1271,18 @@ void Scumm_v2::o2_setObjectName() { runHook(0); } -void Scumm_v2::o2_cursorCommand() { +void Scumm_v2::o2_cursorCommand() { // TODO: Define the magic numbers int cmd = getVarOrDirectWord(0x80); int a2 = cmd >> 8; - if (cmd & 0xFF) { + if (cmd & 0xFF) { // (?) _scummVars[21] = cmd & 0xFF; printf("Set cmd %d\n", cmd & 0xFF); } - if (a2 & 4) { - if (a2 & 32) { - _userPut = 1; - printf("sentence\n"); - } else - _userPut = 0; - - warning("TODO: o2_cursorCommand(userface) -> %d", _userPut); - } // Toggle verbs on/off, etc + if (a2 & 4) { // Userface + _userState = a2 & (32 | 64 | 128); + } if (a2 & 1) { // Freeze if (a2 & 8) @@ -1298,11 +1292,14 @@ void Scumm_v2::o2_cursorCommand() { } if (a2 & 2) { // Cursor Show/Hide - if (a2 & 16) + if (a2 & 16) { + _userPut = 1; _cursor.state = 1; - else + } else { + _userPut = 0; _cursor.state = 0; - + } + verbMouseOver(0); } } |