diff options
author | Travis Howell | 2005-10-02 01:26:53 +0000 |
---|---|---|
committer | Travis Howell | 2005-10-02 01:26:53 +0000 |
commit | d69f43444717793a3f6d8175512949e09da2545c (patch) | |
tree | 5ffeafe1b595eabdc2c922ec033c27642ec203d5 | |
parent | cc08602770717f29b0733533aeea42a2c185df4f (diff) | |
download | scummvm-rg350-d69f43444717793a3f6d8175512949e09da2545c.tar.gz scummvm-rg350-d69f43444717793a3f6d8175512949e09da2545c.tar.bz2 scummvm-rg350-d69f43444717793a3f6d8175512949e09da2545c.zip |
Inventory works in Macintosh version of indy3 now.
svn-id: r18921
-rw-r--r-- | scumm/script.cpp | 27 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 54 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
3 files changed, 55 insertions, 28 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 24b69d7394..40270e6292 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -728,17 +728,20 @@ void ScummEngine::runInventoryScript(int i) { args[0] = i; if (VAR(VAR_INVENTORY_SCRIPT)) { if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) { - inventoryScript(args); + inventoryScript(); } else { runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args); } } } -void ScummEngine::inventoryScript(int *args) { +void ScummEngine::inventoryScript() { VerbSlot *vs; + int args[24]; int j, slot; + memset(args, 0, sizeof(args)); + if (VAR(67) < 0) { VAR(67) = 0; } @@ -813,7 +816,6 @@ void ScummEngine::inventoryScript(int *args) { vs = &_verbs[slot]; vs->curmode = 0; drawVerb(slot, 0); - verbMouseOver(0); slot = getVerbSlot(108, 0); vs = &_verbs[slot]; vs->curmode = 0; @@ -1120,6 +1122,25 @@ void ScummEngine::runInputScript(int a, int cmd, int mode) { args[3] = VAR(VAR_VIRT_MOUSE_X); args[4] = VAR(VAR_VIRT_MOUSE_Y); } + + // Macintosh verison of indy3ega used different interface, so adjust values. + if (_gameId == GID_INDY3 && _platform == Common::kPlatformMacintosh) { + if (a == 1 && (cmd >= 101 && cmd <= 108)) { + if (cmd == 107) { + VAR(67) -= 2; + inventoryScript(); + return; + } else if (cmd == 108) { + VAR(67) += 2; + inventoryScript(); + return; + } else { + args[0] = 3; + args[1] = VAR(83 + (cmd - 101)); + } + } + } + if (verbScript) runScript(verbScript, 0, 0, args); } diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index cf9a43c2ce..5feb919262 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -2396,30 +2396,36 @@ void ScummEngine_v5::o5_verbOps() { vs->curRect.top = getVarOrDirectWord(PARAM_2); // Macintosh verison of indy3ega used different interface, so adjust values. if ((_platform == Common::kPlatformMacintosh) && (_gameId == GID_INDY3)) { - if ((verb > 0) && (verb < 14) || (verb > 31) && (verb < 35)) { - switch (verb) { - case 1: - case 2: - case 9: - vs->curRect.left += 16; - break; - case 10: - case 11: - case 12: - vs->curRect.left += 36; - break; - case 4: - case 5: - case 8: - vs->curRect.left += 60; - break; - case 13: - case 32: - case 33: - case 34: - vs->curRect.left += 90; - break; - } + switch (verb) { + case 1: + case 2: + case 9: + vs->curRect.left += 16; + break; + case 10: + case 11: + case 12: + vs->curRect.left += 36; + break; + case 4: + case 5: + case 8: + vs->curRect.left += 60; + break; + case 13: + case 32: + case 33: + case 34: + vs->curRect.left += 90; + break; + case 107: + vs->curRect.left -= 54; + vs->curRect.top += 16; + break; + case 108: + vs->curRect.left -= 54; + vs->curRect.top += 8; + break; } } else if (_gameId == GID_LOOM256) { // FIXME: hack loom notes into right spot diff --git a/scumm/scumm.h b/scumm/scumm.h index 1d3b07cb72..fb3f0f0c89 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -635,7 +635,7 @@ protected: void executeScript(); void updateScriptPtr(); virtual void runInventoryScript(int i); - void inventoryScript(int *args); + void inventoryScript(); void checkAndRunSentenceScript(); void runExitScript(); void runEntryScript(); |