diff options
author | Travis Howell | 2006-04-17 22:35:33 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-17 22:35:33 +0000 |
commit | 5244d481e6271f13e0120540f75c5593c2e7a463 (patch) | |
tree | 3094d08459065824113334720ce6c3b778a90245 /engines/simon/items.cpp | |
parent | 0eee3fe5919df695af2b3a8b2f9845cf7b1a771c (diff) | |
download | scummvm-rg350-5244d481e6271f13e0120540f75c5593c2e7a463.tar.gz scummvm-rg350-5244d481e6271f13e0120540f75c5593c2e7a463.tar.bz2 scummvm-rg350-5244d481e6271f13e0120540f75c5593c2e7a463.zip |
Add FF difference in addBox script opcode, fixes x position of some boxes
svn-id: r21990
Diffstat (limited to 'engines/simon/items.cpp')
-rw-r--r-- | engines/simon/items.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp index 5c8193b3e7..991f03e1f6 100644 --- a/engines/simon/items.cpp +++ b/engines/simon/items.cpp @@ -318,6 +318,7 @@ void SimonEngine::setupOpcodes() { opcode_table[83] = &SimonEngine::o2_rescan; opcode_table[98] = &SimonEngine::o2_animate; opcode_table[99] = &SimonEngine::o2_stopAnimate; + opcode_table[107] = &SimonEngine::o3_addBox; opcode_table[122] = &SimonEngine::o3_oracleTextDown; opcode_table[123] = &SimonEngine::o3_oracleTextUp; opcode_table[124] = &SimonEngine::o3_ifTime; @@ -1791,6 +1792,36 @@ void SimonEngine::o3_printLongText() { printInteractText(num, str); } +void SimonEngine::o3_addBox() { + // 107: add item hitarea + uint flags = 0; + uint id = getVarOrWord(); + uint params = id / 1000; + uint x, y, w, h, verb; + Item *item; + + id = id % 1000; + + if (params & 1) + flags |= kBFInvertTouch; + if (params & 2) + flags |= kBFNoTouchName; + if (params & 4) + flags |= kBFBoxItem; + if (params & 8) + flags |= kBFTextBox; + if (params & 16) + flags |= 0x10; + + x = getVarOrWord(); + y = getVarOrWord(); + w = getVarOrWord(); + h = getVarOrWord(); + item = getNextItemPtrStrange(); + verb = getVarOrWord(); + defineBox(id, x, y, w, h, flags, verb, item); +} + void SimonEngine::o3_oracleTextDown() { // 122: oracle text down oracleTextDown(); |