[Scummvm-git-logs] scummvm branch-3-0 -> 9c5d987f5f9e0aefe1923562b3990056de011d13
sluicebox
noreply at scummvm.org
Wed Nov 19 22:45:03 UTC 2025
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f5886929b9 PRIVATE: detection and support for promotional demo disc
367c95dd4b PRIVATE: fixed demo handling of inventary
ef14a5c70f PRIVATE: Wait for police bust audio to complete
9c9d095364 PRIVATE: Show cursor for safe digits
ad174287c3 PRIVATE: Fix memory leak in safe digits
f3f990df52 PRIVATE: Fix wall safe initialization
79bcb6f115 PRIVATE: Fix wall safe digit rendering
9c5d987f5f PRIVATE: Fix PhoneClip variable decrementing
Commit: f5886929b97f27a631e6fb265b3315e3d987d0bb
https://github.com/scummvm/scummvm/commit/f5886929b97f27a631e6fb265b3315e3d987d0bb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-11-19T14:43:03-08:00
Commit Message:
PRIVATE: detection and support for promotional demo disc
Changed paths:
engines/private/detection.cpp
engines/private/funcs.cpp
diff --git a/engines/private/detection.cpp b/engines/private/detection.cpp
index e15a6b6a057..ef504bacc9e 100644
--- a/engines/private/detection.cpp
+++ b/engines/private/detection.cpp
@@ -140,6 +140,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO2(GUIO_NOMIDI, GAMEOPTION_HIGHLIGHT_MASKS)
},
+ {
+ "private-eye", // Promotional demo disc
+ "Demo",
+ AD_ENTRY2s("pvteye.z", "adb2ceca453da546d5e86baad0c73cd1", 262537,
+ "bklynlgo.bmp", "1dfb703349a46f8ec183de107992b7f5", 33118),
+ Common::EN_USA,
+ Common::kPlatformWindows,
+ ADGF_DEMO,
+ GUIO2(GUIO_NOMIDI, GAMEOPTION_HIGHLIGHT_MASKS)
+ },
{
"private-eye", // Demo from the EU release (DE)
"Demo",
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index ce59bcfd73d..e34e4fea195 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -374,7 +374,14 @@ static void fInventory(ArgArray args) {
Datum e = args[3];
Datum i = args[4];
Datum c = args[5];
- Datum snd = args[8];
+
+ Datum snd;
+ if (args.size() >= 9)
+ snd = args[8];
+ else {
+ snd.type = STRING;
+ snd.u.str = "\"\"";
+ }
assert(v1.type == STRING || v1.type == NAME);
assert(b1.type == STRING);
Commit: 367c95dd4b36c14fd0491d86a627bcda34b99d9f
https://github.com/scummvm/scummvm/commit/367c95dd4b36c14fd0491d86a627bcda34b99d9f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2025-11-19T14:43:13-08:00
Commit Message:
PRIVATE: fixed demo handling of inventary
Changed paths:
engines/private/funcs.cpp
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index e34e4fea195..31aa6d164d8 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -398,7 +398,7 @@ static void fInventory(ArgArray args) {
debugC(1, kPrivateDebugScript, "Inventory(...)");
Common::String mask(b1.u.str);
if (mask != "\"\"") {
- if (g_private->inInventory(bmp)) {
+ if (bmp != "\"\"" && g_private->inInventory(bmp)) {
return;
}
Commit: ef14a5c70f279f7213413f0927202fdef9ebe67b
https://github.com/scummvm/scummvm/commit/ef14a5c70f279f7213413f0927202fdef9ebe67b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:43:35-08:00
Commit Message:
PRIVATE: Wait for police bust audio to complete
Fixes Marlowe's speech not playing on the second police bust.
The police bust video would immediately stop the audio.
Changed paths:
engines/private/funcs.cpp
engines/private/private.cpp
engines/private/private.h
diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index 31aa6d164d8..6a163abec6b 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -178,12 +178,7 @@ static void fSyncSound(ArgArray args) {
g_private->drawScreen();
g_private->playSound(s, 1, true, false);
- while (g_private->isSoundActive())
- g_private->ignoreEvents();
-
- uint32 i = 100;
- while (i--) // one second extra
- g_private->ignoreEvents();
+ g_private->waitForSoundToStop();
}
}
@@ -265,6 +260,8 @@ static void fBustMovie(ArgArray args) {
if (kPoliceBustVideos[videoIndex] == 2) {
Common::String s("global/transiti/audio/spoc02VO.wav");
g_private->playSound(s, 1, false, false);
+ g_private->changeCursor("default");
+ g_private->waitForSoundToStop();
}
g_private->_nextMovie = pv;
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 61ae24f10a1..95a7ef53760 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -1601,6 +1601,15 @@ bool PrivateEngine::isSoundActive() {
return _mixer->isSoundIDActive(-1);
}
+void PrivateEngine::waitForSoundToStop() {
+ while (g_private->isSoundActive())
+ g_private->ignoreEvents();
+
+ uint32 i = 100;
+ while (i--) // one second extra
+ g_private->ignoreEvents();
+}
+
void PrivateEngine::adjustSubtitleSize() {
debugC(1, kPrivateDebugFunction, "%s()", __FUNCTION__);
if (_subtitles) {
diff --git a/engines/private/private.h b/engines/private/private.h
index b6d542a179a..c2f9b99bf46 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -371,6 +371,7 @@ public:
void playSound(const Common::String &, uint, bool, bool);
void stopSound(bool);
bool isSoundActive();
+ void waitForSoundToStop();
bool _noStopSounds;
Common::String getPaperShuffleSound();
Commit: 9c9d095364eb63f408be611c523561750bfcbd4e
https://github.com/scummvm/scummvm/commit/9c9d095364eb63f408be611c523561750bfcbd4e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:43:45-08:00
Commit Message:
PRIVATE: Show cursor for safe digits
Changed paths:
engines/private/private.cpp
engines/private/private.h
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 95a7ef53760..1196f2ff21d 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -582,6 +582,9 @@ void PrivateEngine::updateCursor(Common::Point mousePos) {
if (cursorPauseMovie(mousePos)) {
return;
}
+ if (cursorSafeDigit(mousePos)) {
+ return;
+ }
if (cursorMask(mousePos)) {
return;
}
@@ -620,6 +623,29 @@ bool PrivateEngine::cursorExit(Common::Point mousePos) {
return false;
}
+bool PrivateEngine::cursorSafeDigit(Common::Point mousePos) {
+ if (_safeDigitArea[0].surf == nullptr) {
+ return false;
+ }
+
+ mousePos = mousePos - _origin;
+ if (mousePos.x < 0 || mousePos.y < 0) {
+ return false;
+ }
+
+ for (uint i = 0; i < 3; i++) {
+ MaskInfo &m = _safeDigitArea[i];
+ if (m.surf != nullptr) {
+ if (_safeDigitRect[i].contains(mousePos) && !m.cursor.empty()) {
+ changeCursor(m.cursor);
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
bool PrivateEngine::inMask(Graphics::Surface *surf, Common::Point mousePos) {
if (surf == nullptr)
return false;
diff --git a/engines/private/private.h b/engines/private/private.h
index c2f9b99bf46..ab44e929479 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -219,6 +219,7 @@ public:
void updateCursor(Common::Point);
bool cursorPauseMovie(Common::Point);
bool cursorExit(Common::Point);
+ bool cursorSafeDigit(Common::Point);
bool cursorMask(Common::Point);
bool hasFeature(EngineFeature f) const override;
Commit: ad174287c36929697e9dca9d282c267ab0160d7a
https://github.com/scummvm/scummvm/commit/ad174287c36929697e9dca9d282c267ab0160d7a
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:43:54-08:00
Commit Message:
PRIVATE: Fix memory leak in safe digits
Changed paths:
engines/private/private.cpp
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 1196f2ff21d..3a49c0aabb0 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -160,6 +160,13 @@ PrivateEngine::~PrivateEngine() {
}
}
+ for (uint i = 0; i < ARRAYSIZE(_safeDigitArea); i++) {
+ if (_safeDigitArea[i].surf != nullptr) {
+ _safeDigitArea[i].surf->free();
+ delete _safeDigitArea[i].surf;
+ }
+ }
+
for (RectList::iterator it = _rects.begin(); it != _rects.end(); ++it) {
Common::Rect *r = (*it);
delete r;
Commit: f3f990df52a08cf8f76f01efaad663045cd6e817
https://github.com/scummvm/scummvm/commit/f3f990df52a08cf8f76f01efaad663045cd6e817
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:44:06-08:00
Commit Message:
PRIVATE: Fix wall safe initialization
Wall safe now behaves like the original:
- Wall safe is initialized from kWallSafeValue
- kWallSafeValue is initialized to random value when starting game
- Screen no longer flickers on each initial digit draw
Changed paths:
engines/private/private.cpp
engines/private/private.h
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 3a49c0aabb0..7fad74201ab 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -119,7 +119,6 @@ PrivateEngine::PrivateEngine(OSystem *syst, const ADGameDescription *gd)
_safeNumberPath = "sg/search_s/sgsaf%d.bmp";
for (uint d = 0 ; d < 3; d++) {
_safeDigitArea[d].clear();
- _safeDigit[d] = 0;
_safeDigitRect[d] = Common::Rect(0, 0);
}
}
@@ -297,6 +296,7 @@ Common::Error PrivateEngine::run() {
initGraphics(_screenW, _screenH, &_pixelFormat);
_transparentColor = 250;
+ initializeWallSafeValue();
_safeColor = _pixelFormat.RGBToColor(65, 65, 65);
_screenRect = Common::Rect(0, 0, _screenW, _screenH);
loadCursors();
@@ -538,7 +538,6 @@ void PrivateEngine::clearAreas() {
delete _safeDigitArea[d].surf;
}
_safeDigitArea[d].clear();
- _safeDigit[d] = 0;
_safeDigitRect[d] = Common::Rect(0, 0);
}
}
@@ -1244,6 +1243,20 @@ bool PrivateEngine::selectDossierPrevSuspect(Common::Point mousePos) {
return false;
}
+void PrivateEngine::initializeWallSafeValue() {
+ if (isDemo()) {
+ return;
+ }
+
+ // initialize to a random value that is not the combination
+ Private::Symbol *sym = maps.variables.getVal(getWallSafeValueVariable());
+ int value;
+ do {
+ value = _rnd->getRandomNumber(999);
+ } while (value == 426);
+ sym->u.val = value;
+}
+
bool PrivateEngine::selectSafeDigit(Common::Point mousePos) {
if (_safeDigitArea[0].surf == nullptr)
return false;
@@ -1254,10 +1267,8 @@ bool PrivateEngine::selectSafeDigit(Common::Point mousePos) {
for (uint d = 0 ; d < 3; d ++)
if (_safeDigitRect[d].contains(mousePos)) {
- _safeDigit[d] = (_safeDigit[d] + 1) % 10;
+ incrementSafeDigit(d);
renderSafeDigit(d);
- Private::Symbol *sym = maps.variables.getVal(getWallSafeValueVariable());
- sym->u.val = 100*_safeDigit[0] + 10*_safeDigit[1] + _safeDigit[2];
return true;
}
@@ -1269,16 +1280,15 @@ void PrivateEngine::addSafeDigit(uint32 d, Common::Rect *rect) {
MaskInfo m;
_safeDigitRect[d] = *rect;
fillRect(_safeColor, _safeDigitRect[d]);
- m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), _safeDigit[d]), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
+ int digitValue = getSafeDigit(d);
+ m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), digitValue), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
m.cursor = g_private->getExitCursor();
m.nextSetting = "";
m.flag1 = nullptr;
m.flag2 = nullptr;
_safeDigitArea[d] = m;
- drawScreen();
}
-
void PrivateEngine::renderSafeDigit(uint32 d) {
if (_safeDigitArea[d].surf != nullptr) {
@@ -1287,8 +1297,9 @@ void PrivateEngine::renderSafeDigit(uint32 d) {
_safeDigitArea[d].clear();
}
fillRect(_safeColor, _safeDigitRect[d]);
+ int digitValue = getSafeDigit(d);
MaskInfo m;
- m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), _safeDigit[d]), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
+ m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), digitValue), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
m.cursor = g_private->getExitCursor();
m.nextSetting = "";
m.flag1 = nullptr;
@@ -1297,6 +1308,36 @@ void PrivateEngine::renderSafeDigit(uint32 d) {
drawScreen();
}
+int PrivateEngine::getSafeDigit(uint32 d) {
+ assert(d < 3);
+
+ Private::Symbol *sym = maps.variables.getVal(getWallSafeValueVariable());
+ int value = sym->u.val;
+
+ byte digits[3];
+ digits[0] = value / 100;
+ digits[1] = (value / 10) % 10;
+ digits[2] = value % 10;
+
+ return digits[d];
+}
+
+void PrivateEngine::incrementSafeDigit(uint32 d) {
+ assert(d < 3);
+
+ Private::Symbol *sym = maps.variables.getVal(getWallSafeValueVariable());
+ int value = sym->u.val;
+
+ byte digits[3];
+ digits[0] = value / 100;
+ digits[1] = (value / 10) % 10;
+ digits[2] = value % 10;
+
+ digits[d] = (digits[d] + 1) % 10;
+
+ sym->u.val = (100 * digits[0]) + (10 * digits[1]) + digits[2];
+}
+
void PrivateEngine::selectLoadGame(Common::Point mousePos) {
if (_loadGameMask.surf == nullptr)
return;
@@ -1353,6 +1394,9 @@ void PrivateEngine::restartGame() {
// VSPicture
_nextVS = "";
+
+ // Wall Safe
+ initializeWallSafeValue();
}
Common::Error PrivateEngine::loadGameStream(Common::SeekableReadStream *stream) {
diff --git a/engines/private/private.h b/engines/private/private.h
index ab44e929479..148d8f1fb2b 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -405,11 +405,13 @@ public:
Common::String _safeNumberPath;
MaskInfo _safeDigitArea[3];
Common::Rect _safeDigitRect[3];
- uint32 _safeDigit[3];
+ void initializeWallSafeValue();
bool selectSafeDigit(Common::Point);
void addSafeDigit(uint32, Common::Rect*);
void renderSafeDigit(uint32);
+ int getSafeDigit(uint32 d);
+ void incrementSafeDigit(uint32 d);
// Random values
bool getRandomBool(uint);
Commit: 79bcb6f115451c27382d80a84ebab2aa6c5f2c55
https://github.com/scummvm/scummvm/commit/79bcb6f115451c27382d80a84ebab2aa6c5f2c55
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:44:12-08:00
Commit Message:
PRIVATE: Fix wall safe digit rendering
The digits are masks with transparent backgrounds meant to be drawn on
top of the safe graphic. We have been drawing a solid black rectangle
first in order to update digits on the screen. This is not original
behavior, and it's only needed because we're attempting to partially
update the screen instead of redrawing it.
Now the original effect is achieved by drawing the digits as regular
masks without a solid black rectangle, and by responding to digit clicks
by reloading the current setting.
Changed paths:
engines/private/private.cpp
engines/private/private.h
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 7fad74201ab..e5492e3d0e8 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -290,14 +290,13 @@ Common::Error PrivateEngine::run() {
delete file;
if (maps.constants.size() == 0)
error("Failed to parse game script");
+ initializeWallSafeValue();
// Initialize graphics
_pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
initGraphics(_screenW, _screenH, &_pixelFormat);
_transparentColor = 250;
- initializeWallSafeValue();
- _safeColor = _pixelFormat.RGBToColor(65, 65, 65);
_screenRect = Common::Rect(0, 0, _screenW, _screenH);
loadCursors();
changeCursor("default");
@@ -1268,7 +1267,7 @@ bool PrivateEngine::selectSafeDigit(Common::Point mousePos) {
for (uint d = 0 ; d < 3; d ++)
if (_safeDigitRect[d].contains(mousePos)) {
incrementSafeDigit(d);
- renderSafeDigit(d);
+ _nextSetting = _safeDigitArea[d].nextSetting;
return true;
}
@@ -1279,33 +1278,13 @@ void PrivateEngine::addSafeDigit(uint32 d, Common::Rect *rect) {
MaskInfo m;
_safeDigitRect[d] = *rect;
- fillRect(_safeColor, _safeDigitRect[d]);
- int digitValue = getSafeDigit(d);
- m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), digitValue), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
- m.cursor = g_private->getExitCursor();
- m.nextSetting = "";
- m.flag1 = nullptr;
- m.flag2 = nullptr;
- _safeDigitArea[d] = m;
-}
-
-void PrivateEngine::renderSafeDigit(uint32 d) {
-
- if (_safeDigitArea[d].surf != nullptr) {
- _safeDigitArea[d].surf->free();
- delete _safeDigitArea[d].surf;
- _safeDigitArea[d].clear();
- }
- fillRect(_safeColor, _safeDigitRect[d]);
int digitValue = getSafeDigit(d);
- MaskInfo m;
m.surf = loadMask(Common::String::format(_safeNumberPath.c_str(), digitValue), _safeDigitRect[d].left, _safeDigitRect[d].top, true);
m.cursor = g_private->getExitCursor();
- m.nextSetting = "";
+ m.nextSetting = _currentSetting;
m.flag1 = nullptr;
m.flag2 = nullptr;
_safeDigitArea[d] = m;
- drawScreen();
}
int PrivateEngine::getSafeDigit(uint32 d) {
diff --git a/engines/private/private.h b/engines/private/private.h
index 148d8f1fb2b..fb45db8b4d0 100644
--- a/engines/private/private.h
+++ b/engines/private/private.h
@@ -401,7 +401,6 @@ public:
void checkPhoneCall();
// Safe
- uint32 _safeColor;
Common::String _safeNumberPath;
MaskInfo _safeDigitArea[3];
Common::Rect _safeDigitRect[3];
@@ -409,7 +408,6 @@ public:
void initializeWallSafeValue();
bool selectSafeDigit(Common::Point);
void addSafeDigit(uint32, Common::Rect*);
- void renderSafeDigit(uint32);
int getSafeDigit(uint32 d);
void incrementSafeDigit(uint32 d);
Commit: 9c5d987f5f9e0aefe1923562b3990056de011d13
https://github.com/scummvm/scummvm/commit/9c5d987f5f9e0aefe1923562b3990056de011d13
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-19T14:44:24-08:00
Commit Message:
PRIVATE: Fix PhoneClip variable decrementing
Fixes gangster events not occurring after answering their first
threatening phone call.
Changed paths:
engines/private/private.cpp
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index e5492e3d0e8..2374bd6fe7d 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -1129,7 +1129,12 @@ void PrivateEngine::selectPhoneArea(Common::Point mousePos) {
if (inMask(_phoneArea.surf, mousePos)) {
const PhoneInfo &i = _phone.front();
- setSymbol(i.flag, i.val);
+ // -100 indicates that the variable should be decremented
+ if (i.val == -100) {
+ setSymbol(i.flag, i.flag->u.val - 1);
+ } else {
+ setSymbol(i.flag, i.val);
+ }
Common::String sound = _phonePrefix + i.sound + ".wav";
playSound(sound, 1, true, false);
_phone.pop_front();
More information about the Scummvm-git-logs
mailing list