[Scummvm-git-logs] scummvm master -> 09a6d9c2feb61d34f6053c1f2953aca080e5cb0d
bluegr
noreply at scummvm.org
Thu Aug 20 00:45:22 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
18d9169f1a NANCY: NANCY13: Fix drawing of hotspots from the debug_hotspots command
09a6d9c2fe NANCY: NANCY12: Fixes for SafeDialPuzzle
Commit: 18d9169f1a263799ab927fb03ea6f4ec5d545ac7
https://github.com/scummvm/scummvm/commit/18d9169f1a263799ab927fb03ea6f4ec5d545ac7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-08-20T02:22:19+03:00
Commit Message:
NANCY: NANCY13: Fix drawing of hotspots from the debug_hotspots command
Changed paths:
engines/nancy/action/actionmanager.cpp
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index 816b43b0c0a..92a98c7c482 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -721,7 +721,7 @@ void ActionManager::debugDrawHotspots() {
font->drawString(&obj._drawSurface, Common::String::format("%u, %s", i, rec->getRecordTypeName().c_str()),
hotspot.left, hotspot.bottom - font->getFontHeight() - 2, hotspot.width(), 0,
Graphics::kTextAlignCenter, 0, true);
- obj._drawSurface.frameRect(hotspot, 0xFFFFFF);
+ obj._drawSurface.frameRect(hotspot, g_nancy->getGameType() <= kGameTypeNancy12 ? 0xFFFFFF : 0xFFFFFFFF);
}
}
}
Commit: 09a6d9c2feb61d34f6053c1f2953aca080e5cb0d
https://github.com/scummvm/scummvm/commit/09a6d9c2feb61d34f6053c1f2953aca080e5cb0d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-08-20T03:44:58+03:00
Commit Message:
NANCY: NANCY12: Fixes for SafeDialPuzzle
This addresses issues with this puzzle type in Nancy13, as well
Changed paths:
engines/nancy/action/puzzle/safedialpuzzle.cpp
diff --git a/engines/nancy/action/puzzle/safedialpuzzle.cpp b/engines/nancy/action/puzzle/safedialpuzzle.cpp
index 435c56a11af..47ed7f41835 100644
--- a/engines/nancy/action/puzzle/safedialpuzzle.cpp
+++ b/engines/nancy/action/puzzle/safedialpuzzle.cpp
@@ -74,15 +74,18 @@ void SafeDialPuzzle::updateGraphics() {
g_nancy->_sound->playSound(_resetSound);
}
- if (_animState == kResetAnim) {
- // Framerate-dependent animation. We're restricting the engine to ~60fps so it shouldn't be too fast
+ if (_animState == kResetAnim && _nextAnim < g_nancy->getTotalPlayTime()) {
_drawSurface.blitFrom(_resetImage, _resetDialSrcs[_current % _resetDialSrcs.size()], _dialDest);
++_current;
if (_current >= _resetDialSrcs.size() * _resetTurns) {
_animState = kNone;
_current = 0;
drawDialFrame(_current);
+ } else {
+ // Nancy 12 and up step the animation on a timer, earlier games do so every frame
+ _nextAnim = g_nancy->getTotalPlayTime() + (g_nancy->getGameType() >= kGameTypeNancy12 ? 100 : 0); // hardcoded
}
+
_needsRedraw = true;
}
}
@@ -97,6 +100,11 @@ void SafeDialPuzzle::readData(Common::SeekableReadStream &stream) {
_numInbetweens = (!_imageName2.empty() ? 1 : 0);
+ if (g_nancy->getGameType() >= kGameTypeNancy12) {
+ // The second image doubles as the one holding the reset spinning frames
+ _resetImageName = _imageName2;
+ }
+
uint16 num = 10;
if (g_nancy->getGameType() >= kGameTypeNancy4) {
num = stream.readUint16LE();
@@ -104,7 +112,7 @@ void SafeDialPuzzle::readData(Common::SeekableReadStream &stream) {
}
readRect(stream, _dialDest);
- readRectArray(stream, _dialSrcs, num * (1 + _numInbetweens), 20);
+ readRectArray(stream, _dialSrcs, num * (1 + _numInbetweens), g_nancy->getGameType() >= kGameTypeNancy12 ? 24 : 20);
readRect(stream, _resetDest);
readRect(stream, _resetSrc);
@@ -113,6 +121,11 @@ void SafeDialPuzzle::readData(Common::SeekableReadStream &stream) {
readRectArray(stream, _resetDialSrcs, g_nancy->getGameType() >= kGameTypeNancy12 ? 12 : 10);
+ // Trailing empty rects are unused slots, and are skipped while animating
+ while (_resetDialSrcs.size() && _resetDialSrcs.back().isEmpty()) {
+ _resetDialSrcs.pop_back();
+ }
+
_resetTurns = stream.readUint16LE();
uint16 solveSize = stream.readUint16LE();
@@ -171,7 +184,7 @@ void SafeDialPuzzle::execute() {
if (_playerSequence == _correctSequence) {
_solved = true;
_state = kActionTrigger;
- _nextAnim = g_nancy->getTotalPlayTime() + 1000 * _solveSoundDelay;
+ _nextAnim = g_nancy->getTotalPlayTime() + (g_nancy->getGameType() >= kGameTypeNancy12 ? 300 : 1000) * _solveSoundDelay;
}
}
@@ -273,7 +286,10 @@ void SafeDialPuzzle::handleInput(NancyInput &input) {
g_nancy->_cursor->setCursorType(buttonCursor);
if (!g_nancy->_sound->isSoundPlaying(_resetSound) && input.input & NancyInput::kLeftMouseButtonUp) {
- _drawSurface.blitFrom(_image1, _resetSrc, _resetDest);
+ if (!_resetSrc.isEmpty()) {
+ _drawSurface.blitFrom(_image1, _resetSrc, _resetDest);
+ }
+
g_nancy->_sound->playSound(_selectSound);
_animState = kReset;
_nextAnim = g_nancy->getTotalPlayTime() + 500; // hardcoded
More information about the Scummvm-git-logs
mailing list