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 | |
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')
-rw-r--r-- | scumm/script_v2.cpp | 29 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 1 |
3 files changed, 15 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); } } diff --git a/scumm/scumm.h b/scumm/scumm.h index e7abedd2d8..864e1ca244 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -697,6 +697,7 @@ protected: uint16 _verbMouseOver; int _inventoryOffset; int8 _userPut; + uint16 _userState; void redrawVerbs(); void checkExecVerbs(); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index f9aecc09e5..c952e1cb4c 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -260,6 +260,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) memset(&_objectIDMap,0,sizeof(ObjectIDMap)); _numObjectsInRoom = 0; _userPut = 0; + _userState = 0; _resourceHeaderSize = 0; _saveLoadFlag = 0; _saveLoadSlot = 0; |