[Scummvm-git-logs] scummvm master -> e05e26c52093aa50d1d9bce709b7672e2c97ab14
eriktorbjorn
eriktorbjorn at telia.com
Mon Jun 28 07:14:45 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e05e26c520 SCUMM: Make Mac Loom practice box clickable
Commit: e05e26c52093aa50d1d9bce709b7672e2c97ab14
https://github.com/scummvm/scummvm/commit/e05e26c52093aa50d1d9bce709b7672e2c97ab14
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-06-28T09:12:40+02:00
Commit Message:
SCUMM: Make Mac Loom practice box clickable
It turns out that the practice box (which shows note names in practice
mode) is a verb. The DOS version turns this verb on and off when needed,
but Mac Loom only sets variable 50 and 54. I have no idea why there are
two different variables, because variable 50 seems to be enough.
Anyway, this simply turns the verb on and off, and adjusts its
coordinates. It seems to work well enough.
Changed paths:
engines/scumm/gfx_mac.cpp
diff --git a/engines/scumm/gfx_mac.cpp b/engines/scumm/gfx_mac.cpp
index ebab3942f2..75b562bec0 100644
--- a/engines/scumm/gfx_mac.cpp
+++ b/engines/scumm/gfx_mac.cpp
@@ -23,6 +23,7 @@
#include "common/system.h"
#include "scumm/charset.h"
#include "scumm/usage_bits.h"
+#include "scumm/verbs.h"
namespace Scumm {
@@ -77,8 +78,9 @@ void ScummEngine::mac_restoreCharsetBg() {
void ScummEngine::mac_drawLoomPracticeMode() {
// In practice mode, the game shows the notes as they are being played.
// In the DOS version, this is drawn by script 27 but the Mac version
- // just sets variables 50 and 54. I'm not sure what the difference
- // between the two is.
+ // just sets variables 50 and 54. The box is actually a verb, and it
+ // seems that setting variable 50 is pretty much equal to turning verb
+ // 53 on or off. I'm not sure what the purpose of variable 54 is.
int x = 216;
int y = 377;
@@ -89,6 +91,15 @@ void ScummEngine::mac_drawLoomPracticeMode() {
byte *ptr = (byte *)_macScreen->getBasePtr(x, y);
int pitch = _macScreen->pitch;
+ int slot = getVerbSlot(53, 0);
+ VerbSlot *vs = &_verbs[slot];
+
+ vs->curmode = (VAR(var) != 0);
+ vs->curRect.left = x / 2;
+ vs->curRect.right = (x + width) / 2;
+ vs->curRect.top = y / 22;
+ vs->curRect.bottom = (y + height) / 2;
+
_macScreen->fillRect(Common::Rect(x, y, x + width, y + height), 0);
if (VAR(var)) {
More information about the Scummvm-git-logs
mailing list