[Scummvm-git-logs] scummvm master -> f22326d4a7cf455bb05690b101bf926695c3f510
fracturehill
noreply at scummvm.org
Fri Sep 29 12:13:52 UTC 2023
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7e16ae44ab NANCY: Correctly read Overlay hotspot flags
4d72ce769f NANCY: Add nancy-5 specific item check
a07b8ee54f NANCY: Fix for records with multiple cursor dependencies
5f6cd52def DEVTOOLS: Clean up nancy2 data in create_nancy
1ca8ee3799 NANCY: Do not handle hotspots when record is done
f22326d4a7 NANCY: Fix inventory box scrolling
Commit: 7e16ae44ab3c3ba830a7fb5b18f890a7a18ed18d
https://github.com/scummvm/scummvm/commit/7e16ae44ab3c3ba830a7fb5b18f890a7a18ed18d
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:42+03:00
Commit Message:
NANCY: Correctly read Overlay hotspot flags
We're no longer skipping over what apparently was a flag
indicating whether a particular static Overlay frame has
a hotspot or not. This fixes the rubber gloves item in
nancy5, which can now be picked up.
Changed paths:
engines/nancy/action/overlay.cpp
engines/nancy/action/overlay.h
engines/nancy/commontypes.cpp
engines/nancy/commontypes.h
diff --git a/engines/nancy/action/overlay.cpp b/engines/nancy/action/overlay.cpp
index c899b4e0fa7..4bc1019a4c1 100644
--- a/engines/nancy/action/overlay.cpp
+++ b/engines/nancy/action/overlay.cpp
@@ -63,7 +63,7 @@ void Overlay::handleInput(NancyInput &input) {
// must take precedence when handling the mouse. Thus, out ActionManager class first iterates
// through all records and calls their handleInput() function just to make sure this special
// case is handled. This fixes nancy3 scene 7081.
- if (_enableHotspot == kPlayOverlayWithHotspot) {
+ if (_hasHotspot) {
if (NancySceneState.getViewport().convertViewportToScreen(_hotspot).contains(input.mousePos)) {
g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
@@ -240,9 +240,19 @@ void Overlay::execute() {
if (_overlayType == kPlayOverlayStatic) {
setFrame(i);
- if (_enableHotspot == kPlayOverlayWithHotspot) {
- _hotspot = _screenPosition;
- _hasHotspot = true;
+ if (g_nancy->getGameType() <= kGameTypeNancy2) {
+ // In nancy2, the presence of a hotspot relies on whether the Overlay has a scene change
+ if (_enableHotspot == kPlayOverlayWithHotspot) {
+ _hotspot = _screenPosition;
+ _hasHotspot = true;
+ }
+ } else {
+ // nancy3 added a per-frame flag for hotspots. This allows the overlay to be clickable
+ // even without a scene change (useful for setting flags).
+ if (_blitDescriptions[i].hasHotspot == kPlayOverlayWithHotspot) {
+ _hotspot = _screenPosition;
+ _hasHotspot = true;
+ }
}
}
diff --git a/engines/nancy/action/overlay.h b/engines/nancy/action/overlay.h
index 5a34b0221b3..00a1c0be13c 100644
--- a/engines/nancy/action/overlay.h
+++ b/engines/nancy/action/overlay.h
@@ -89,7 +89,6 @@ protected:
void setFrame(uint frame);
Graphics::ManagedSurface _fullSurface;
- Graphics::ManagedSurface _staticModeIntermediate;
};
class TableIndexOverlay : public Overlay {
diff --git a/engines/nancy/commontypes.cpp b/engines/nancy/commontypes.cpp
index dc3e183fb6c..20d48912296 100644
--- a/engines/nancy/commontypes.cpp
+++ b/engines/nancy/commontypes.cpp
@@ -90,16 +90,16 @@ void HotspotDescription::readData(Common::SeekableReadStream &stream) {
readRect(stream, coords);
}
-void FrameBlitDescription::readData(Common::SeekableReadStream &stream, bool frameIsLong) {
- if (!frameIsLong) {
- frameID = stream.readUint16LE();
- } else {
- frameID = stream.readUint32LE();
+void FrameBlitDescription::readData(Common::SeekableReadStream &stream, bool longFormat) {
+ frameID = stream.readUint16LE();
+
+ if (longFormat) {
+ // Related to static mode, seems to be a frame ID? However, it is always set to zero so we skip it.
+ stream.skip(2);
}
- if (g_nancy->getGameType() >= kGameTypeNancy3) {
- // Most likely transparency
- stream.skip(2);
+ if (g_nancy->getGameType() >= kGameTypeNancy3 && longFormat) {
+ hasHotspot = stream.readUint16LE();
}
readRect(stream, src);
diff --git a/engines/nancy/commontypes.h b/engines/nancy/commontypes.h
index d145b5d79c3..5528fd0ec60 100644
--- a/engines/nancy/commontypes.h
+++ b/engines/nancy/commontypes.h
@@ -174,10 +174,11 @@ struct HotspotDescription {
// Describes a blit operation, dependent on a background frame
struct FrameBlitDescription {
uint16 frameID = 0; // Frame ID of the Scene background
+ uint hasHotspot = kPlayOverlayNoHotspot;
Common::Rect src;
Common::Rect dest;
- void readData(Common::SeekableReadStream &stream, bool frameIsLong = false);
+ void readData(Common::SeekableReadStream &stream, bool longFormat = false);
};
// Describes 10 event flag changes to be executed when an action is triggered
Commit: 4d72ce769fd453d77d7395d1b21c344553464812
https://github.com/scummvm/scummvm/commit/4d72ce769fd453d77d7395d1b21c344553464812
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:42+03:00
Commit Message:
NANCY: Add nancy-5 specific item check
Added a check inside OverrideLockPuzzle specific to nancy5.
This checks whether the player is holding the rubber gloves,
and leaves them on if so. This is used during the electrified
gate sequence.
Changed paths:
engines/nancy/action/puzzle/overridelockpuzzle.cpp
diff --git a/engines/nancy/action/puzzle/overridelockpuzzle.cpp b/engines/nancy/action/puzzle/overridelockpuzzle.cpp
index b4756c4da2d..0ad0b211347 100644
--- a/engines/nancy/action/puzzle/overridelockpuzzle.cpp
+++ b/engines/nancy/action/puzzle/overridelockpuzzle.cpp
@@ -80,7 +80,10 @@ void OverrideLockPuzzle::execute() {
init();
registerGraphics();
- NancySceneState.setNoHeldItem();
+ if (g_nancy->getGameType() != kGameTypeNancy5 || NancySceneState.getHeldItem() != 12) {
+ // Hardcoded check for rubber gloves in nancy5
+ NancySceneState.setNoHeldItem();
+ }
// Set the order of the button presses (always random)
// and of the lights (only random on expert difficulty)
Commit: a07b8ee54fe6f700c1b8ccaf4a02530c3a640df6
https://github.com/scummvm/scummvm/commit/a07b8ee54fe6f700c1b8ccaf4a02530c3a640df6
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:42+03:00
Commit Message:
NANCY: Fix for records with multiple cursor dependencies
Fixed the Dependency processing code so the rare cases
where a single ActionRecord has multiple CursorType
dependencies works correctly (plays the right "can't" sound,
removes/re-adds held items as indended). This fixes the
keymaker's return slot in nancy5.
Changed paths:
engines/nancy/action/actionmanager.cpp
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index 34aa021335c..1da9e09f9b5 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -66,6 +66,7 @@ void ActionManager::handleInput(NancyInput &input) {
if (input.input & NancyInput::kLeftMouseButtonUp) {
input.input &= ~NancyInput::kLeftMouseButtonUp;
+ rec->_cursorDependency = nullptr;
processDependency(rec->_dependencies, *rec, false);
if (!rec->_dependencies.satisfied) {
@@ -243,7 +244,8 @@ void ActionManager::processActionRecords() {
continue;
}
- // Process dependencies every call
+ // Process dependencies every call. We make sure to ignore cursor dependencies,
+ // as they are only handled when calling from handleInput()
processDependency(record->_dependencies, *record, record->canHaveHotspot());
record->_isActive = record->_dependencies.satisfied;
@@ -438,7 +440,6 @@ void ActionManager::processDependency(DependencyRecord &dep, ActionRecord &recor
case DependencyType::kCursorType: {
if (doNotCheckCursor) {
dep.satisfied = true;
- record._cursorDependency = &dep;
} else {
bool isSatisfied = false;
int heldItem = NancySceneState.getHeldItem();
@@ -456,7 +457,19 @@ void ActionManager::processDependency(DependencyRecord &dep, ActionRecord &recor
}
dep.satisfied = isSatisfied;
- record._cursorDependency = &dep;
+
+ if (isSatisfied) {
+ // A satisfied dependency must be moved into the _cursorDependency slot, to make sure
+ // the remove from/re-add to inventory logic works correctly
+ record._cursorDependency = &dep;
+ } else {
+ if (record._cursorDependency == nullptr) {
+ // However, if the current dependency was not satisfied, we only move it into
+ // the _cursorDependency slot if nothing else was there before. This ensures
+ // the "can't" sound played is the first dependency's
+ record._cursorDependency = &dep;
+ }
+ }
}
break;
Commit: 5f6cd52defb2b2ba6315ce34e45a758e25e18447
https://github.com/scummvm/scummvm/commit/5f6cd52defb2b2ba6315ce34e45a758e25e18447
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:42+03:00
Commit Message:
DEVTOOLS: Clean up nancy2 data in create_nancy
Removed hexadecimal scene IDs, fixed some indentation.
Changed paths:
devtools/create_nancy/nancy2_data.h
diff --git a/devtools/create_nancy/nancy2_data.h b/devtools/create_nancy/nancy2_data.h
index ecbc5dafff4..ac360011e7c 100644
--- a/devtools/create_nancy/nancy2_data.h
+++ b/devtools/create_nancy/nancy2_data.h
@@ -44,156 +44,156 @@ const Common::Array<Common::Language> _nancy2LanguagesOrder = {
const Common::Array<Common::Array<ConditionalDialogue>> _nancy2ConditionalDialogue = {
{ // Dwayne, 7 responses + 2 repeats
{ 0, 816, "nda33",
- { { kEv, 0x32, kTrue }, { kEv, 0x76, kFalse } } },
+ { { kEv, 50, kTrue }, { kEv, 118, kFalse } } },
{ 1, 817, "nda34",
- { { kEv, 0x31, kTrue }, { kEv, 0x77, kFalse } } },
+ { { kEv, 49, kTrue }, { kEv, 119, kFalse } } },
{ 2, 820, "nda35",
- { { kEv, 0x37, kTrue }, { kEv, 0x78, kFalse }, { kEv, 0x4C, kFalse } } },
+ { { kEv, 55, kTrue }, { kEv, 120, kFalse }, { kEv, 76, kFalse } } },
{ 3, 821, "nda15",
- { { kEv, 0x43, kTrue }, { kEv, 0x79, kFalse }, { kEv, 0x50, kFalse } } },
+ { { kEv, 67, kTrue }, { kEv, 121, kFalse }, { kEv, 80, kFalse } } },
{ 4, 823, "nda19",
- { { kEv, 0x7B, kTrue }, { kEv, 0x7A, kFalse } } },
+ { { kEv, 123, kTrue }, { kEv, 122, kFalse } } },
{ 5, 824, "nda22",
- { { kEv, 0x7C, kFalse }, { kEv, 0x44, kTrue } } },
+ { { kEv, 124, kFalse }, { kEv, 68, kTrue } } },
{ 5, 824, "nda22",
- { { kEv, 0x7C, kFalse }, { kEv, 0x44, kFalse }, { kEv, 0x40, kTrue } } },
+ { { kEv, 124, kFalse }, { kEv, 64, kTrue } } },
{ 6, 826, "nda27",
- { { kEv, 0x7E, kFalse }, { kEv, 0x38, kTrue } } },
+ { { kEv, 126, kFalse }, { kEv, 56, kTrue } } },
{ 6, 826, "nda27",
- { { kEv, 0x7E, kFalse }, { kEv, 0x38, kFalse }, { kEv, 0x3A, kTrue } } },
+ { { kEv, 126, kFalse }, { kEv, 58, kTrue } } },
{ 7, 829, "nda28",
- { { kEv, 0x27, kTrue }, { kEv, 0x7F, kFalse } } }
+ { { kEv, 39, kTrue }, { kEv, 127, kFalse } } }
},
{ // Rick, 4 responses + 1 repeat
{ 8, 729, "NRD29",
- { { kEv, 0x73, kFalse }, { kEv, 0x44, kTrue } } },
+ { { kEv, 115, kFalse }, { kEv, 68, kTrue } } },
{ 8, 729, "NRD29",
- { { kEv, 0x73, kFalse }, { kEv, 0x44, kFalse }, { kEv, 0x40, kTrue } } },
+ { { kEv, 15, kFalse }, { kEv, 64, kTrue } } },
{ 9, 728, "NRD28",
- { { kEv, 0x32, kTrue }, { kEv, 0x72, kFalse } } },
+ { { kEv, 50, kTrue }, { kEv, 114, kFalse } } },
{ 10, 717, "NRD18",
- { { kEv, 0x30, kTrue }, { kEv, 0x70, kFalse } } },
+ { { kEv, 48, kTrue }, { kEv, 112, kFalse } } },
{ 11, 721, "NRD21",
- { { kEv, 0x97, kTrue }, { kEv, 0x71, kFalse } } }
+ { { kEv, 151, kTrue }, { kEv, 113, kFalse } } }
},
{ // Millie, 2 responses
{ 12, 317, "NPR12",
- { { kEv, 0x34, kTrue }, { kEv, 0x85, kFalse } } },
+ { { kEv, 52, kTrue }, { kEv, 133, kFalse } } },
{ 13, 321, "NPR15",
- { { kEv, 0x40, kTrue }, { kEv, 0x86, kFalse } } }
+ { { kEv, 64, kTrue }, { kEv, 134, kFalse } } }
},
{ // Lillian, 4 responses + 1 repeat
{ 14, 503, "NLR07",
- { { kEv, 0x41, kTrue }, { kEv, 0x81, kFalse } } },
+ { { kEv, 65, kTrue }, { kEv, 129, kFalse } } },
{ 15, 504, "NLR08",
- { { kEv, 0x97, kTrue }, { kEv, 0x82, kFalse } } },
+ { { kEv, 151, kTrue }, { kEv, 130, kFalse } } },
{ 16, 510, "NLR15",
- { { kEv, 0x83, kFalse }, { kEv, 0x44, kTrue } } },
+ { { kEv, 131, kFalse }, { kEv, 68, kTrue } } },
{ 16, 510, "NLR15",
- { { kEv, 0x83, kFalse }, { kEv, 0x44, kFalse }, { kEv, 0x40, kTrue } } },
+ { { kEv, 131, kFalse }, { kEv, 64, kTrue } } },
{ 17, 512, "NLR17",
- { { kEv, 0x84, kTrue }, { kEv, 0x35, kTrue }, { kEv, 0x83, kTrue }, { kEv, 0x7B, kFalse } } }
+ { { kEv, 132, kTrue }, { kEv, 53, kTrue }, { kEv, 131, kTrue }, { kEv, 123, kFalse } } }
},
{ // Ned, 9 responses
{ 18, 3007, "NNP08",
- { { kEv, 0x34, kTrue }, { kEv, 0x65, kFalse }, { kEv, 0x49, kFalse } } },
+ { { kEv, 52, kTrue }, { kEv, 101, kFalse }, { kEv, 73, kFalse } } },
{ 19, 3010, "NNP11",
- { { kEv, 0x29, kTrue }, { kEv, 0x4F, kFalse }, { kEv, 0x66, kFalse } } },
+ { { kEv, 41, kTrue }, { kEv, 79, kFalse }, { kEv, 102, kFalse } } },
{ 20, 3013, "NNP14",
- { { kEv, 0x67, kFalse }, { kIn, 0xF, kTrue } } },
+ { { kEv, 103, kFalse }, { kIn, 15, kTrue } } },
{ 21, 3014, "NNP15",
- { { kEv, 0x69, kTrue }, { kEv, 0x2D, kFalse }, { kEv, 0x5C, kFalse } } },
+ { { kEv, 105, kTrue }, { kEv, 45, kFalse }, { kEv, 92, kFalse } } },
{ 22, 3015, "NNP16",
- { { kEv, 0x44, kTrue }, { kEv, 0x40, kTrue }, { kEv, 0x3B, kFalse }, { kEv, 0x6A, kFalse } } },
+ { { kEv, 68, kTrue }, { kEv, 64, kTrue }, { kEv, 59, kFalse }, { kEv, 106, kFalse } } },
{ 23, 3016, "NNP17",
- { { kEv, 0x38, kTrue }, { kEv, 0x39, kFalse }, { kEv, 0x6B, kFalse }, { kEv, 0x3A, kTrue } } },
+ { { kEv, 56, kTrue }, { kEv, 57, kFalse }, { kEv, 107, kFalse }, { kEv, 58, kTrue } } },
{ 24, 3017, "NNP28",
- { { kEv, 0x39, kTrue }, { kEv, 0x6B, kTrue }, { kEv, 0x6C, kFalse } } },
+ { { kEv, 57, kTrue }, { kEv, 107, kTrue }, { kEv, 108, kFalse } } },
{ 25, 3019, "NNP20",
- { { kEv, 0x43, kTrue }, { kEv, 0x50, kFalse }, { kEv, 0x6D, kFalse } } },
+ { { kEv, 67, kTrue }, { kEv, 80, kFalse }, { kEv, 109, kFalse } } },
{ 26, 3020, "NNP21",
- { { kEv, 0x43, kTrue }, { kEv, 0x50, kFalse }, { kEv, 0x6E, kFalse } } }
+ { { kEv, 67, kTrue }, { kEv, 80, kFalse }, { kEv, 110, kFalse } } }
},
{ // Bess, 18 responses
{ 27, 3123, "NBES32g",
- { { kEv, 0x50, kTrue }, { kEv, 0x2C, kFalse }, { kEv, 0x9B, kFalse } } },
+ { { kEv, 80, kTrue }, { kEv, 44, kFalse }, { kEv, 155, kFalse } } },
{ 28, 3124, "NBES35",
- { { kEv, 0x55, kTrue }, { kEv, 0x3E, kFalse }, { kEv, 0x9C, kFalse } } },
+ { { kEv, 85, kTrue }, { kEv, 62, kFalse }, { kEv, 156, kFalse } } },
{ 29, 3125, "NBES36",
- { { kEv, 0x56, kTrue }, { kEv, 0x4C, kFalse }, { kEv, 0x9D, kFalse } } },
+ { { kEv, 86, kTrue }, { kEv, 76, kFalse }, { kEv, 157, kFalse } } },
{ 30, 3127, "NBES38",
- { { kEv, 0x57, kTrue }, { kEv, 0x3B, kFalse }, { kEv, 0x9F, kFalse } } },
+ { { kEv, 87, kTrue }, { kEv, 59, kFalse }, { kEv, 159, kFalse } } },
{ 31, 3128, "NBES39g",
- { { kEv, 0x84, kTrue }, { kEv, 0x35, kFalse }, { kEv, 0xA0, kFalse } } },
+ { { kEv, 132, kTrue }, { kEv, 53, kFalse }, { kEv, 160, kFalse } } },
{ 32, 3129, "NBES41g",
- { { kEv, 0x84, kTrue }, { kEv, 0x23, kTrue }, { kEv, 0xA1, kFalse } } },
+ { { kEv, 132, kTrue }, { kEv, 35, kTrue }, { kEv, 161, kFalse } } },
{ 33, 3130, "NBES43",
- { { kEv, 0x7B, kTrue }, { kEv, 0xA2, kFalse } } },
+ { { kEv, 123, kTrue }, { kEv, 162, kFalse } } },
{ 34, 3131, "NBES46",
- { { kEv, 0x58, kTrue }, { kEv, 0xA3, kFalse } } },
+ { { kEv, 88, kTrue }, { kEv, 163, kFalse } } },
{ 35, 3133, "NBES48",
- { { kEv, 0x3D, kTrue }, { kEv, 0xA6, kFalse }, { kIn, 0xC, kFalse } } },
+ { { kEv, 61, kTrue }, { kEv, 166, kFalse }, { kIn, 12, kFalse } } },
{ 36, 3136, "NBES53",
- { { kEv, 0x40, kTrue }, { kEv, 0xA8, kFalse } } },
+ { { kEv, 64, kTrue }, { kEv, 168, kFalse } } },
{ 37, 3137, "NBES55",
- { { kEv, 0x55, kFalse }, { kEv, 0x3E, kTrue }, { kEv, 0xA9, kFalse } } },
+ { { kEv, 85, kFalse }, { kEv, 62, kTrue }, { kEv, 169, kFalse } } },
{ 38, 3138, "NBES61g",
- { { kEv, 0x40, kTrue }, { kEv, 0x44, kFalse }, { kEv, 0xAA, kFalse } } },
+ { { kEv, 64, kTrue }, { kEv, 68, kFalse }, { kEv, 170, kFalse } } },
{ 39, 3139, "NBES65",
- { { kEv, 0x2A, kTrue }, { kEv, 0x2B, kFalse }, { kEv, 0x9B, kFalse } } },
+ { { kEv, 42, kTrue }, { kEv, 43, kFalse }, { kEv, 155, kFalse } } },
{ 40, 3140, "NBES66",
- { { kEv, 0x53, kTrue }, { kEv, 0x4A, kFalse }, { kEv, 0xAB, kFalse } } },
+ { { kEv, 83, kTrue }, { kEv, 74, kFalse }, { kEv, 171, kFalse } } },
{ 41, 3141, "NBES67g",
- { { kEv, 0x48, kTrue }, { kEv, 0xAC, kFalse } } },
+ { { kEv, 72, kTrue }, { kEv, 172, kFalse } } },
{ 42, 3142, "NBES72",
- { { kEv, 0xA8, kTrue }, { kEv, 0x44, kTrue }, { kEv, 0xAD, kFalse } } },
+ { { kEv, 168, kTrue }, { kEv, 68, kTrue }, { kEv, 173, kFalse } } },
{ 43, 3144, "NBES76",
- { { kEv, 0x24, kTrue }, { kEv, 0xAE, kFalse } } },
+ { { kEv, 36, kTrue }, { kEv, 174, kFalse } } },
{ 44, 3145, "NBES79g",
- { { kEv, 0x1F, kTrue }, { kEv, 0xAF, kFalse } } }
+ { { kEv, 31, kTrue }, { kEv, 175, kFalse } } }
},
{ // George, 6 responses
{ 45, 3207, "NGEO14",
- { { kEv, 0x68, kTrue }, { kEv, 0xB1, kFalse }, { kEv, 0x3D, kFalse }, { kIn, 0xA, kFalse } } },
+ { { kEv, 104, kTrue }, { kEv, 177, kFalse }, { kEv, 61, kFalse }, { kIn, 10, kFalse } } },
{ 46, 3209, "NGEO16",
- { { kEv, 0x3D, kFalse }, { kEv, 0xB3, kFalse }, { kIn, 0xA, kTrue } } },
+ { { kEv, 61, kFalse }, { kEv, 179, kFalse }, { kIn, 10, kTrue } } },
{ 47, 3210, "NGEO17",
- { { kEv, 0x3D, kTrue }, { kEv, 0xB4, kFalse } } },
+ { { kEv, 61, kTrue }, { kEv, 180, kFalse } } },
{ 48, 3213, "NGEO18",
- { { kEv, 0xB5, kFalse }, { kIn, 0x4, kTrue } } },
+ { { kEv, 181, kFalse }, { kIn, 4, kTrue } } },
{ 49, 3214, "NGEO19",
- { { kEv, 0x29, kTrue }, { kEv, 0x9A, kFalse }, { kEv, 0x4F, kFalse } } },
+ { { kEv, 41, kTrue }, { kEv, 154, kFalse }, { kEv, 79, kFalse } } },
{ 50, 3215, "NGEO20",
- { { kEv, 0xB6, kFalse }, { kEv, 0x49, kFalse }, { kIn, 0xE, kTrue } } }
+ { { kEv, 182, kFalse }, { kEv, 73, kFalse }, { kIn, 14, kTrue } } }
},
{ // Security guard, 3 responses + 1 repeat
{ 51, 401, "NG01",
- { { kEv, 0x3D, kFalse }, { kIn, 0xA, kFalse }, { kIn, 0x4, kFalse } } },
+ { { kEv, 61, kFalse }, { kIn, 10, kFalse }, { kIn, 4, kFalse } } },
{ 52, 403, "NG02",
- { { kEv, 0x75, kTrue }, { kIn, 0x4, kFalse } } },
+ { { kEv, 117, kTrue }, { kIn, 0x4, kFalse } } },
{ 53, 409, "NG04",
- { { kIn, 0xA, kTrue } } },
+ { { kIn, 10, kTrue } } },
{ 53, 409, "NG04",
- { { kIn, 0xA, kFalse }, { kIn, 0x4, kTrue } } }
+ { { kIn, 4, kTrue } } }
},
{ // Mattie, 2 responses
{ 54, 215, "NMD20",
- { { kEv, 0x97, kTrue }, { kEv, 0x89, kFalse } } },
+ { { kEv, 151, kTrue }, { kEv, 137, kFalse } } },
{ 55, 230, "NMD31",
- { { kEv, 0x40, kTrue }, { kEv, 0x8A, kFalse } } }
+ { { kEv, 64, kTrue }, { kEv, 138, kFalse } } }
}
};
const Common::Array<Goodbye> _nancy2Goodbyes = {
- { "NDA29", { { { 890, 891, 892, 893 }, {}, NOFLAG } } }, // Dwayne
- { "NRD35", { { { 791, 792, 793, 794 }, {}, NOFLAG } } }, // Rick
- { "NPR16", { { { 391, 392, 394 }, {}, NOFLAG } } }, // Millie
- { "NLR18", { { { 590, 591, 593 }, {}, NOFLAG } } }, // Lillian
- { "NPR16", { { { 3090, 3092, 3093 }, {}, NOFLAG } } }, // Ned
- { "NBES86", { { { 3190 }, {}, NOFLAG } } }, // Bess
- { "NGEO90", { { { 3290 }, {}, NOFLAG } } }, // George
- { "", { { {}, {}, NOFLAG } } }, // Security guard, no goodbye
- { "NMD32", { { { 290, 291, 292, 293 }, {}, NOFLAG } } }, // Mattie
+ { "NDA29", { { { 890, 891, 892, 893 }, {}, NOFLAG } } }, // Dwayne
+ { "NRD35", { { { 791, 792, 793, 794 }, {}, NOFLAG } } }, // Rick
+ { "NPR16", { { { 391, 392, 394 }, {}, NOFLAG } } }, // Millie
+ { "NLR18", { { { 590, 591, 593 }, {}, NOFLAG } } }, // Lillian
+ { "NPR16", { { { 3090, 3092, 3093 }, {}, NOFLAG } } }, // Ned
+ { "NBES86", { { { 3190 }, {}, NOFLAG } } }, // Bess
+ { "NGEO90", { { { 3290 }, {}, NOFLAG } } }, // George
+ { "", { { {}, {}, NOFLAG } } }, // Security guard, no goodbye
+ { "NMD32", { { { 290, 291, 292, 293 }, {}, NOFLAG } } }, // Mattie
};
const Common::Array<Common::Array<const char *>> _nancy2ConditionalDialogueTexts {
Commit: 1ca8ee379927d3280a87515b89e6ac89a40af716
https://github.com/scummvm/scummvm/commit/1ca8ee379927d3280a87515b89e6ac89a40af716
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:43+03:00
Commit Message:
NANCY: Do not handle hotspots when record is done
Fixed an edge case where a hotspot would still be evaluated,
even when its host ActionRecord is done.
Changed paths:
engines/nancy/action/actionmanager.cpp
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index 1da9e09f9b5..a0d67d3e6f8 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -43,7 +43,7 @@ namespace Action {
void ActionManager::handleInput(NancyInput &input) {
bool setHoverCursor = false;
for (auto &rec : _records) {
- if (rec->_isActive) {
+ if (rec->_isActive && !rec->_isDone) {
// First, loop through all records and handle special cases.
// This needs to be a separate loop to handle Overlays as a special case
// (see note in Overlay::handleInput())
@@ -53,6 +53,7 @@ void ActionManager::handleInput(NancyInput &input) {
for (auto &rec : _records) {
if ( rec->_isActive &&
+ !rec->_isDone &&
rec->_hasHotspot &&
rec->_hotspot.isValidRect() && // Needed for nancy2 scene 1600
NancySceneState.getViewport().convertViewportToScreen(rec->_hotspot).contains(input.mousePos)) {
@@ -627,7 +628,7 @@ void ActionManager::debugDrawHotspots() {
for (uint i = 0; i < _records.size(); ++i) {
ActionRecord *rec = _records[i];
- if (rec->_hasHotspot) {
+ if (rec->_isActive && !rec->_isDone && rec->_hasHotspot) {
Common::Rect hotspot = rec->_hotspot;
hotspot.translate(0, -yOffset);
hotspot.clip(obj._drawSurface.getBounds());
Commit: f22326d4a7cf455bb05690b101bf926695c3f510
https://github.com/scummvm/scummvm/commit/f22326d4a7cf455bb05690b101bf926695c3f510
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-09-29T15:13:43+03:00
Commit Message:
NANCY: Fix inventory box scrolling
Fixed an off-by-one error when calculating the inventory
box, which would result in some items getting their top
few pixels clipped when the inventory has grown
sufficiently full
Changed paths:
engines/nancy/ui/inventorybox.cpp
diff --git a/engines/nancy/ui/inventorybox.cpp b/engines/nancy/ui/inventorybox.cpp
index a0324a7f215..240678a017a 100644
--- a/engines/nancy/ui/inventorybox.cpp
+++ b/engines/nancy/ui/inventorybox.cpp
@@ -222,7 +222,7 @@ void InventoryBox::onScrollbarMove() {
uint curPage = MIN<uint>(scrollPos / pageFrac, numPages - 1);
Common::Rect sourceRect = _screenPosition;
- sourceRect.moveTo(0, curPage * sourceRect.height());
+ sourceRect.moveTo(0, curPage * (sourceRect.height() - 1));
_drawSurface.create(_fullInventorySurface, sourceRect);
setHotspots(curPage);
More information about the Scummvm-git-logs
mailing list