diff options
author | Filippos Karapetis | 2011-12-25 14:30:00 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-25 14:30:00 +0200 |
commit | 3ac88c16ea63243a46444e5754a94e41302f2d64 (patch) | |
tree | f6d639104ebf09fba27cad0304becf28f113340b /engines/dreamweb/object.cpp | |
parent | e412078319c11206617c8d86d9b6f166b4526287 (diff) | |
download | scummvm-rg350-3ac88c16ea63243a46444e5754a94e41302f2d64.tar.gz scummvm-rg350-3ac88c16ea63243a46444e5754a94e41302f2d64.tar.bz2 scummvm-rg350-3ac88c16ea63243a46444e5754a94e41302f2d64.zip |
DREAMWEB: Port 'selectopenob' to C++
Diffstat (limited to 'engines/dreamweb/object.cpp')
-rw-r--r-- | engines/dreamweb/object.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 4addfc404e..dff58050a5 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -793,4 +793,37 @@ bool DreamGenContext::checkObjectSizeCPP() { return false; } +void DreamGenContext::selectOpenOb() { + uint8 slotSize, slotCount; + getAnyAd(&slotSize, &slotCount); + if (slotCount == 255) { + // Can't open the object + blank(); + return; + } + + if (data.byte(kCommandtype) != 224) { + data.byte(kCommandtype) = 224; + commandWithOb(38, data.byte(kObjecttype), data.byte(kCommand)); + } + + if (data.word(kMousebutton) == data.word(kOldbutton) || !(data.word(kMousebutton) & 1)) + return; + + data.byte(kOpenedob) = data.byte(kCommand); + data.byte(kOpenedtype) = data.byte(kObjecttype); + createPanel(); + showPanel(); + showMan(); + examIcon(); + showExit(); + openInv(); + openOb(); + underTextLine(); + readMouse(); + showPointer(); + workToScreenCPP(); + delPointer(); +} + } // End of namespace DreamGen |