[Scummvm-git-logs] scummvm master -> a48a05a2c2475ceb1ec08710b404b39261061404
alexbevi
noreply at scummvm.org
Fri Oct 16 00:37:30 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
a48a05a2c2 HARVESTER: allow dialogue actions to target different room contexts
Commit: a48a05a2c2475ceb1ec08710b404b39261061404
https://github.com/scummvm/scummvm/commit/a48a05a2c2475ceb1ec08710b404b39261061404
Author: Alex Bevilacqua (alex at alexbevi.com)
Date: 2026-10-15T20:37:19-04:00
Commit Message:
HARVESTER: allow dialogue actions to target different room contexts
Refs #17360
Assisted-by: Codex:gpt-6.1-sol
Changed paths:
engines/harvester/dialogue.cpp
engines/harvester/dialogue.h
engines/harvester/flow.cpp
engines/harvester/flow.h
engines/harvester/interaction.cpp
diff --git a/engines/harvester/dialogue.cpp b/engines/harvester/dialogue.cpp
index 8787db2c63b..b0a65e07877 100644
--- a/engines/harvester/dialogue.cpp
+++ b/engines/harvester/dialogue.cpp
@@ -1459,7 +1459,8 @@ void DialogueSystem::syncRuntimeSaveState(Common::Serializer &s) {
}
Common::Error DialogueSystem::runRoomNpcDialogue(const IndexedBitmap &backdrop, const byte *palette,
- float paletteBrightness, const NpcRecord &npc, const Common::String &usedItemName,
+ float paletteBrightness, const Common::String ¤tRoomName,
+ const NpcRecord &npc, const Common::String &usedItemName,
Flow &flow) {
Script *script = _engine.getScript();
Text *text = _engine.getText();
@@ -1487,8 +1488,9 @@ Common::Error DialogueSystem::runRoomNpcDialogue(const IndexedBitmap &backdrop,
RoomNpcDialogueSession session(_engine, _mousePos, flow, backdrop, palette, paletteBrightness, npc);
if (!session.isValid())
return Common::kReadingFailed;
+ // START_DIALOG may invoke an NPC assigned to another room.
DialogueRuntime runtime(
- _engine, *script, *text, flow, npc.roomName, session.getGenericByeTopic(), session);
+ _engine, *script, *text, flow, currentRoomName, session.getGenericByeTopic(), session);
for (uint i = 0; i < _npcHandlers.size(); ++i) {
if (_npcHandlers[i]->matchesNpc(npc.npcName))
diff --git a/engines/harvester/dialogue.h b/engines/harvester/dialogue.h
index f0a0680eee6..4fe59c95ea8 100644
--- a/engines/harvester/dialogue.h
+++ b/engines/harvester/dialogue.h
@@ -50,7 +50,8 @@ public:
void resetRoomNpcDialogueState();
void syncRuntimeSaveState(Common::Serializer &s);
Common::Error runRoomNpcDialogue(const IndexedBitmap &backdrop, const byte *palette,
- float paletteBrightness, const NpcRecord &npc, const Common::String &usedItemName,
+ float paletteBrightness, const Common::String ¤tRoomName,
+ const NpcRecord &npc, const Common::String &usedItemName,
Flow &flow);
private:
diff --git a/engines/harvester/flow.cpp b/engines/harvester/flow.cpp
index 2b8b985c9b6..3e40804f3d4 100644
--- a/engines/harvester/flow.cpp
+++ b/engines/harvester/flow.cpp
@@ -1777,10 +1777,12 @@ Common::Error Flow::runRoomMenu(const IndexedBitmap &backdrop, const byte *palet
}
Common::Error Flow::runRoomNpcDialogue(const IndexedBitmap &backdrop, const byte *palette,
- float paletteBrightness, const NpcRecord &npc, const Common::String &usedItemName) {
+ float paletteBrightness, const Common::String ¤tRoomName,
+ const NpcRecord &npc, const Common::String &usedItemName) {
_queuedDialogueInteraction = InteractionResult();
_hasQueuedDialogueInteraction = false;
- return _dialogue.runRoomNpcDialogue(backdrop, palette, paletteBrightness, npc, usedItemName, *this);
+ return _dialogue.runRoomNpcDialogue(backdrop, palette, paletteBrightness,
+ currentRoomName, npc, usedItemName, *this);
}
Common::Error Flow::runTownMapSelector(const Common::String &mapEntryName,
diff --git a/engines/harvester/flow.h b/engines/harvester/flow.h
index 445e629dd45..212399c4849 100644
--- a/engines/harvester/flow.h
+++ b/engines/harvester/flow.h
@@ -75,7 +75,8 @@ private:
Common::Error runRoomMenu(const IndexedBitmap &backdrop, const byte *palette,
float paletteBrightness, bool canSaveGame);
Common::Error runRoomNpcDialogue(const IndexedBitmap &backdrop, const byte *palette,
- float paletteBrightness, const NpcRecord &npc, const Common::String &usedItemName);
+ float paletteBrightness, const Common::String ¤tRoomName,
+ const NpcRecord &npc, const Common::String &usedItemName);
Common::Error runTownMapSelector(const Common::String &mapEntryName, Common::String &destinationEntranceName);
Common::Error runRoomLoop(const Common::String &entranceName);
Common::Error resolveRoomTransitionTarget(const Common::String &targetName, Common::String &resolvedTargetName);
diff --git a/engines/harvester/interaction.cpp b/engines/harvester/interaction.cpp
index e8fbecf9737..77d949f5cbc 100644
--- a/engines/harvester/interaction.cpp
+++ b/engines/harvester/interaction.cpp
@@ -760,8 +760,8 @@ Common::Error Interaction::runScriptedDialogue(const Common::String &npcName,
return Common::kReadingFailed;
Common::Error dialogueError = _flow.runRoomNpcDialogue(
- dialogueBackdrop, _scene.palette, _scene.targetPaletteBrightness, *dialogueNpc,
- usedItemName);
+ dialogueBackdrop, _scene.palette, _scene.targetPaletteBrightness,
+ _scene.state.roomName, *dialogueNpc, usedItemName);
if (dialogueError.getCode() != Common::kNoError)
return dialogueError;
} else {
More information about the Scummvm-git-logs
mailing list