[Scummvm-git-logs] scummvm master -> 79a97aeb07c2934ba69727deaf3177d24a75d054
alexbevi
noreply at scummvm.org
Thu Oct 15 23:37:10 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:
79a97aeb07 HARVESTER: run game over screen properly following dialogue-based death
Commit: 79a97aeb07c2934ba69727deaf3177d24a75d054
https://github.com/scummvm/scummvm/commit/79a97aeb07c2934ba69727deaf3177d24a75d054
Author: Alex Bevilacqua (alex at alexbevi.com)
Date: 2026-10-15T19:36:53-04:00
Commit Message:
HARVESTER: run game over screen properly following dialogue-based death
Fixes #17326
Assisted-by: Codex:gpt-6.1-sol
Changed paths:
engines/harvester/dialogue.cpp
engines/harvester/entity.cpp
diff --git a/engines/harvester/dialogue.cpp b/engines/harvester/dialogue.cpp
index f61d9768499..a343fe3d54d 100644
--- a/engines/harvester/dialogue.cpp
+++ b/engines/harvester/dialogue.cpp
@@ -107,8 +107,8 @@ public:
flow.queueDialogueInteraction(interaction);
}
- static void requestMainMenuReturn(Flow &flow) {
- flow.requestMainMenuReturn();
+ static void requestGameOverReturn(Flow &flow) {
+ flow.requestGameOverReturn();
}
static const MenuTextConfig &getMenuTextConfig(const Flow &flow) {
@@ -143,9 +143,6 @@ static const int kDialogueGenericByeResponseIndex = 13;
static const char *const kCdChangePromptPalettePath = "1:/GRAPHIC/PAL/CD1.PAL";
static const char *const kDialogueKeywordBitmapPath = "1:/GRAPHIC/OTHER/KEYWORD.BM";
static const char *const kDialogueLocalizedKeywordBitmapPath = "GRAPHIC/OTHER/KEYWORD.BM";
-static const char *const kDialogueGameOverBitmapPath = "1:/GRAPHIC/OTHER/GAMEOVER.BM";
-static const char *const kDialogueGameOverPalettePath = "1:/GRAPHIC/PAL/GAMEOVER.PAL";
-static const char *const kDialogueGameOverMusicPath = "SOUND/MUSIC/ANXIETY.CMP";
static const byte kTextColorNormal = 255;
static const byte kTextColorHover = 251;
@@ -869,80 +866,17 @@ public:
}
Common::Error runGameOverScreen() override {
- Graphics::Screen *screen = _engine.getScreen();
- ResourceManager *resources = _engine.getResources();
- if (!screen || !resources)
- return Common::kReadingFailed;
-
- IndexedBitmap gameOverBitmap;
- byte gameOverPalette[256 * 3];
- if (!loadBitmapResource(*resources, kDialogueGameOverBitmapPath, gameOverBitmap) ||
- !loadPaletteResource(*resources, kDialogueGameOverPalettePath, gameOverPalette)) {
- return Common::kReadingFailed;
- }
-
- _engine.stopSpeech();
- _engine.stopMusic();
- _engine.stopSound();
-
- screen->fillRect(screen->getBounds(), 0);
- blitBitmap(*screen, gameOverBitmap, 0, 0);
- setScaledPalette(*screen, gameOverPalette, 1.0f);
- screen->makeAllDirty();
- screen->update();
-
- (void)_engine.playMusic(kDialogueGameOverMusicPath);
-
- bool dismissed = false;
- Graphics::FrameLimiter limiter(g_system, 60);
- while (!dismissed && !SHOULD_QUIT) {
- Common::Event event;
- while (g_system->getEventManager()->pollEvent(event)) {
- Common::Error result = Common::kNoError;
- if (DialogueFlowAccess::handleSystemEvent(_flow, event, result)) {
- _engine.stopMusic();
- return result;
- }
-
- switch (event.type) {
- case Common::EVENT_LBUTTONDOWN:
- case Common::EVENT_RBUTTONDOWN:
- case Common::EVENT_KEYDOWN:
- dismissed = true;
- break;
- default:
- break;
- }
- }
-
- if (_entityManager)
- (void)_entityManager->syncCursorEntityPosition(_mousePos);
- if (dismissed)
- break;
-
- limiter.delayBeforeSwap();
- limiter.startFrame();
- }
-
- _engine.stopMusic();
- if (dismissed) {
- Common::Error releaseError = waitForPointerRelease();
- if (releaseError.getCode() != Common::kNoError)
- return releaseError;
- }
-
- DialogueFlowAccess::requestMainMenuReturn(_flow);
+ // GOG run_game_over_screen (0x7c540) enters run_main_menu (0x67390)
+ // with GAMEOVER.BM and GAMEOVER.PAL retained as the menu backdrop.
+ debugC(1, kDebugDialogue, "Harvester: dialogue death requesting game-over menu");
+ DialogueFlowAccess::requestGameOverReturn(_flow);
return Common::kNoError;
}
void assignTopicBuffer(Common::String &topicBuffer, int &topicBufferLineIndex,
- int responseLineIndex, const char *label) override {
+ int responseLineIndex, const char *) override {
topicBuffer = _text->getDialogueResponseLine(responseLineIndex);
topicBufferLineIndex = responseLineIndex;
-
- Common::Array<Common::String> topics;
- splitDialogueMenuLine(topicBuffer, topics);
- logDialogueMenuItems(label, responseLineIndex, topicBuffer, topics);
}
bool matchesResponseLine(const Common::String &selectedTopic, int responseLineIndex) override {
diff --git a/engines/harvester/entity.cpp b/engines/harvester/entity.cpp
index 6b1367bb723..ebd3839a251 100644
--- a/engines/harvester/entity.cpp
+++ b/engines/harvester/entity.cpp
@@ -1050,7 +1050,6 @@ const Entity *EntityManager::findTopSceneEntityAt(const Common::Point &point, in
const Entity *EntityManager::findTopSceneEntityOverlappingBitmap(const IndexedBitmap &bitmap,
const Common::Point &position, const Common::String &excludedName, bool opaquePixels) const {
- // GOG handle_target_interaction (0x7ff50) excludes STAT and classes above 0x15.
for (int i = (int)_sceneEntities.size() - 1; i >= 0; --i) {
const Entity *entity = _sceneEntities[(uint)i];
const int classId = entity->getClassId();
More information about the Scummvm-git-logs
mailing list