[Scummvm-git-logs] scummvm master -> 5799fbb2f6e22d2697f98218c317728a71100726
fracturehill
noreply at scummvm.org
Sun May 18 20:43:11 UTC 2025
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
7ca0ee0e6a NANCY: Implement ScummVM save/load menus for all Nancy games
dec5b03185 NANCY: Add stubs for unimplemented Nancy 8 puzzles
9e4111cb5f NANCY: Initialize puzzle start time for TileMove puzzle
44bc34257c NANCY: Properly stop animation in new phone (used in Nancy 8 and newer)
ba85e41db5 NANCY: Return to main menu after saving with ScummVM save/load screens
5799fbb2f6 NANCY: Fix soft lock when no active records are left
Commit: 7ca0ee0e6aabccdd80760bbbb6255f9353388af6
https://github.com/scummvm/scummvm/commit/7ca0ee0e6aabccdd80760bbbb6255f9353388af6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Implement ScummVM save/load menus for all Nancy games
We have the following benefits:
- All games can now benefit from 999 save slots, instead of only the
newer ones, which feature more enhanced save/load menus
- It's possible to delete saved games
- The ScummVM menus can be used in newer games (Nancy 8 and later),
where the original save/load dialogs aren't implemented yet
Note: Since the original save/load menus aren't implemented for Nancy 8
and newer games, we always use the ScummVM ones there
Changed paths:
engines/nancy/POTFILES
engines/nancy/detection.cpp
engines/nancy/detection.h
engines/nancy/metaengine.cpp
engines/nancy/nancy.cpp
engines/nancy/state/loadsave.cpp
engines/nancy/state/loadsave.h
engines/nancy/state/mainmenu.cpp
diff --git a/engines/nancy/POTFILES b/engines/nancy/POTFILES
index 559f0704aec..f1e708064c5 100644
--- a/engines/nancy/POTFILES
+++ b/engines/nancy/POTFILES
@@ -1,2 +1,3 @@
engines/nancy/input.cpp
engines/nancy/metaengine.cpp
+engines/nancy/state/loadsave.cpp
diff --git a/engines/nancy/detection.cpp b/engines/nancy/detection.cpp
index 7619462656e..15a14e50cd3 100644
--- a/engines/nancy/detection.cpp
+++ b/engines/nancy/detection.cpp
@@ -59,11 +59,13 @@ static const PlainGameDescriptor nancyGames[] = {
{ nullptr, nullptr }
};
-#define VAMPIRE_GUIOPTIONS GUIO3(GUIO_NOLANG, GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH)
-#define NANCY_GUIOPTIONS GUIO2(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH)
-#define NANCY2_GUIOPTIONS GUIO4(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_FIX_SOFTLOCKS, GAMEOPTION_NANCY2_TIMER)
-#define NANCY5_GUIOPTIONS GUIO3(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_FIX_SOFTLOCKS)
-#define NANCY6_7_GUIOPTIONS GUIO2(GAMEOPTION_AUTO_MOVE, GAMEOPTION_FIX_SOFTLOCKS)
+#define VAMPIRE_GUIOPTIONS GUIO4(GUIO_NOLANG, GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_ORIGINAL_SAVELOAD)
+#define NANCY_GUIOPTIONS GUIO3(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_ORIGINAL_SAVELOAD)
+#define NANCY2_GUIOPTIONS GUIO5(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_FIX_SOFTLOCKS, GAMEOPTION_NANCY2_TIMER, GAMEOPTION_ORIGINAL_SAVELOAD)
+#define NANCY5_GUIOPTIONS GUIO4(GAMEOPTION_PLAYER_SPEECH, GAMEOPTION_CHARACTER_SPEECH, GAMEOPTION_FIX_SOFTLOCKS, GAMEOPTION_ORIGINAL_SAVELOAD)
+#define NANCY6_7_GUIOPTIONS GUIO3(GAMEOPTION_AUTO_MOVE, GAMEOPTION_FIX_SOFTLOCKS, GAMEOPTION_ORIGINAL_SAVELOAD)
+// TODO: Since the original save/load menus aren't implemented for
+// Nancy 8 and newer games, we always use the ScummVM ones there
#define NANCY8_GUIOPTIONS GUIO1(GAMEOPTION_AUTO_MOVE)
static const Nancy::NancyGameDescription gameDescriptions[] = {
diff --git a/engines/nancy/detection.h b/engines/nancy/detection.h
index 4cc5e8d9706..a434662cf04 100644
--- a/engines/nancy/detection.h
+++ b/engines/nancy/detection.h
@@ -74,6 +74,8 @@ enum NancyDebugChannels {
// Patch settings, specific to each game
#define GAMEOPTION_NANCY2_TIMER GUIO_GAMEOPTIONS6
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS7
+
} // End of namespace Nancy
#endif // NANCY_DETECTION_H
diff --git a/engines/nancy/metaengine.cpp b/engines/nancy/metaengine.cpp
index 8c0da47db73..c2a94795d50 100644
--- a/engines/nancy/metaengine.cpp
+++ b/engines/nancy/metaengine.cpp
@@ -98,6 +98,17 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ true,
+ 0,
+ 0
+ }
+ },
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
@@ -187,6 +198,7 @@ void NancyMetaEngine::registerDefaultSettings(const Common::String &target) cons
ConfMan.registerDefault("player_speech", true);
ConfMan.registerDefault("character_speech", true);
ConfMan.registerDefault("nancy_max_saves", 999);
+ ConfMan.registerDefault("originalsaveload", true);
}
const ADExtraGuiOptionsMap *NancyMetaEngine::getAdvancedExtraGuiOptions() const {
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index 69fa411250c..43de27d0df1 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -262,6 +262,16 @@ Common::Error NancyEngine::run() {
}
}
+ // TODO: Since the original save/load menus aren't implemented for
+ // Nancy 8 and newer games, we always use the ScummVM ones there
+ if (getGameType() >= kGameTypeNancy8) {
+ ConfMan.setBool("originalsaveload", false, ConfMan.getActiveDomainName());
+ }
+
+ if (!ConfMan.getBool("originalsaveload")) {
+ ConfMan.setInt("nancy_max_saves", 999, ConfMan.getActiveDomainName());
+ }
+
// Boot the engine
setState(NancyState::kBoot);
diff --git a/engines/nancy/state/loadsave.cpp b/engines/nancy/state/loadsave.cpp
index c9855930a53..ad370240685 100644
--- a/engines/nancy/state/loadsave.cpp
+++ b/engines/nancy/state/loadsave.cpp
@@ -32,6 +32,10 @@
#include "engines/nancy/ui/button.h"
#include "common/config-manager.h"
+#include "common/translation.h"
+
+#include "gui/message.h"
+#include "gui/saveload.h"
namespace Common {
DECLARE_SINGLETON(Nancy::State::LoadSaveMenu);
@@ -99,7 +103,70 @@ void LoadSaveMenu::process() {
g_nancy->_cursor->setCursorType(CursorManager::kNormalArrow);
}
+void LoadSaveMenu::scummVMSave() {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+ int slot = dialog->runModalWithCurrentTarget();
+ Common::String saveName = dialog->getResultString();
+ delete dialog;
+
+ g_nancy->_graphics->suppressNextDraw();
+ _destroyOnExit = true;
+ _state = kStop;
+ _selectedSave = slot;
+
+ if (slot >= 0) {
+ g_nancy->saveGameState(slot, saveName, false);
+ g_nancy->_hasJustSaved = true;
+ }
+}
+
+void LoadSaveMenu::scummVMLoad() {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
+ int slot = dialog->runModalWithCurrentTarget();
+ delete dialog;
+
+ g_nancy->_graphics->suppressNextDraw();
+ _destroyOnExit = true;
+ _state = kStop;
+ _selectedSave = slot;
+
+ if (slot >= 0) {
+ if (Nancy::State::Scene::hasInstance())
+ Nancy::State::Scene::destroy();
+
+ ConfMan.setInt("save_slot", slot, Common::ConfigManager::kTransientDomain);
+
+ _enteringNewState = true;
+ }
+}
+
void LoadSaveMenu::onStateEnter(const NancyState::NancyState prevState) {
+ if (!ConfMan.getBool("originalsaveload")) {
+ bool saveAndQuit = false;
+ if (ConfMan.hasKey("sdlg_save_and_quit", Common::ConfigManager::kTransientDomain)) {
+ saveAndQuit = ConfMan.getBool("sdlg_save_and_quit", Common::ConfigManager::kTransientDomain);
+ ConfMan.removeKey("sdlg_save_and_quit", Common::ConfigManager::kTransientDomain);
+ }
+
+ // Display the question dialog if we are in a scene, and if we are not
+ // in the middle of quitting the game, and a save has been requested
+ if (Nancy::State::Scene::hasInstance() && !saveAndQuit) {
+ GUI::MessageDialog saveOrLoad(_("Would you like to load or save a game?"), _("Load"), _("Save"));
+
+ int choice = saveOrLoad.runModal();
+ if (choice == GUI::kMessageOK)
+ scummVMLoad();
+ else
+ scummVMSave();
+ } else if (saveAndQuit) {
+ scummVMSave();
+ } else {
+ scummVMLoad();
+ }
+
+ return;
+ }
+
if (_state == kEnterFilename) {
g_nancy->_input->setVKEnabled(true);
}
diff --git a/engines/nancy/state/loadsave.h b/engines/nancy/state/loadsave.h
index dd40bf33813..6a46176f1fc 100644
--- a/engines/nancy/state/loadsave.h
+++ b/engines/nancy/state/loadsave.h
@@ -64,6 +64,9 @@ private:
void registerGraphics();
+ void scummVMSave();
+ void scummVMLoad();
+
uint16 writeToTextbox(uint textboxID, const Common::String &text, const Font *font);
enum State { kInit, kRun, kEnterFilename, kSave, kLoad, kSuccess, kStop };
diff --git a/engines/nancy/state/mainmenu.cpp b/engines/nancy/state/mainmenu.cpp
index ca40da14ff0..0e58e166fac 100644
--- a/engines/nancy/state/mainmenu.cpp
+++ b/engines/nancy/state/mainmenu.cpp
@@ -215,10 +215,14 @@ void MainMenu::stop() {
g_nancy->_graphics->suppressNextDraw();
uint ret = ConfMan.getInt("sdlg_return", Common::ConfigManager::kTransientDomain);
ConfMan.removeKey("sdlg_return", Common::ConfigManager::kTransientDomain);
+
switch (ret) {
case 0 :
// "Yes" switches to LoadSave
g_nancy->setState(NancyState::kLoadSave);
+ if (!ConfMan.getBool("originalsaveload")) {
+ ConfMan.setBool("sdlg_save_and_quit", true, Common::ConfigManager::kTransientDomain);
+ }
break;
case 1 :
// "No" quits the game
Commit: dec5b031850aae98e54e332678dfb185afcecdb1
https://github.com/scummvm/scummvm/commit/dec5b031850aae98e54e332678dfb185afcecdb1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Add stubs for unimplemented Nancy 8 puzzles
These stubs skip the unimplemented puzzles, and will help us progress
further on in the game.
Unimplemented puzzle stubs:
- Laptop - flag puzzle (MatchPuzzle - optional)
- Squid Toss arcade (AngleTossPuzzle)
- Barnacle Blast arcade (ArcadePuzzle / Arkanoid)
- Art studio lathe puzzle (CuttingPuzzle)
- Stenography tutorials (QuizPuzzle - optional)
Changed paths:
A engines/nancy/action/puzzle/angletosspuzzle.cpp
A engines/nancy/action/puzzle/angletosspuzzle.h
A engines/nancy/action/puzzle/arcadepuzzle.cpp
A engines/nancy/action/puzzle/arcadepuzzle.h
A engines/nancy/action/puzzle/cuttingpuzzle.cpp
A engines/nancy/action/puzzle/cuttingpuzzle.h
A engines/nancy/action/puzzle/matchpuzzle.cpp
A engines/nancy/action/puzzle/matchpuzzle.h
A engines/nancy/action/puzzle/quizpuzzle.cpp
A engines/nancy/action/puzzle/quizpuzzle.h
engines/nancy/action/arfactory.cpp
engines/nancy/module.mk
diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index 4f72e1ede25..43e5efcc4a6 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -32,12 +32,16 @@
#include "engines/nancy/action/secondaryvideo.h"
#include "engines/nancy/action/secondarymovie.h"
+#include "engines/nancy/action/puzzle/angletosspuzzle.h"
+#include "engines/nancy/action/puzzle/arcadepuzzle.h"
#include "engines/nancy/action/puzzle/assemblypuzzle.h"
#include "engines/nancy/action/puzzle/bballpuzzle.h"
#include "engines/nancy/action/puzzle/bulpuzzle.h"
#include "engines/nancy/action/puzzle/bombpuzzle.h"
#include "engines/nancy/action/puzzle/collisionpuzzle.h"
#include "engines/nancy/action/puzzle/cubepuzzle.h"
+#include "engines/nancy/action/puzzle/cuttingpuzzle.h"
+#include "engines/nancy/action/puzzle/matchpuzzle.h"
#include "engines/nancy/action/puzzle/hamradiopuzzle.h"
#include "engines/nancy/action/puzzle/leverpuzzle.h"
#include "engines/nancy/action/puzzle/mazechasepuzzle.h"
@@ -46,6 +50,7 @@
#include "engines/nancy/action/puzzle/overridelockpuzzle.h"
#include "engines/nancy/action/puzzle/passwordpuzzle.h"
#include "engines/nancy/action/puzzle/peepholepuzzle.h"
+#include "engines/nancy/action/puzzle/quizpuzzle.h"
#include "engines/nancy/action/puzzle/raycastpuzzle.h"
#include "engines/nancy/action/puzzle/riddlepuzzle.h"
#include "engines/nancy/action/puzzle/rippedletterpuzzle.h"
@@ -360,8 +365,18 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
return new OrderingPuzzle(OrderingPuzzle::kKeypadTerse);
case 225:
return new SpigotPuzzle();
+ case 226:
+ return new CuttingPuzzle();
+ case 228:
+ return new MatchPuzzle();
+ case 229:
+ return new ArcadePuzzle();
case 230:
return new Telephone(true);
+ case 231:
+ return new QuizPuzzle();
+ case 232:
+ return new AngleTossPuzzle();
default:
warning("Unknown action record type %d", type);
return nullptr;
diff --git a/engines/nancy/action/puzzle/angletosspuzzle.cpp b/engines/nancy/action/puzzle/angletosspuzzle.cpp
new file mode 100644
index 00000000000..a5134251734
--- /dev/null
+++ b/engines/nancy/action/puzzle/angletosspuzzle.cpp
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+#include "engines/nancy/action/puzzle/angletosspuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void AngleTossPuzzle::init() {
+ // TODO
+}
+
+void AngleTossPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - return to the winning screen
+ warning("STUB - Nancy 8 Squid Toss game");
+ SceneChangeDescription scene;
+ scene.sceneID = 4465;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void AngleTossPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void AngleTossPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/angletosspuzzle.h b/engines/nancy/action/puzzle/angletosspuzzle.h
new file mode 100644
index 00000000000..5c1bcb53276
--- /dev/null
+++ b/engines/nancy/action/puzzle/angletosspuzzle.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_ANGLETOSSPUZZLE_H
+#define NANCY_ACTION_ANGLETOSSPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Squid Toss mini-game in Nancy 8
+
+class AngleTossPuzzle : public RenderActionRecord {
+public:
+ AngleTossPuzzle() : RenderActionRecord(7) {}
+ virtual ~AngleTossPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "AngleTossPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_ANGLETOSSPUZZLE_H
diff --git a/engines/nancy/action/puzzle/arcadepuzzle.cpp b/engines/nancy/action/puzzle/arcadepuzzle.cpp
new file mode 100644
index 00000000000..1322d949242
--- /dev/null
+++ b/engines/nancy/action/puzzle/arcadepuzzle.cpp
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+#include "engines/nancy/action/puzzle/arcadepuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void ArcadePuzzle::init() {
+ // TODO
+}
+
+void ArcadePuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - return to the winning screen
+ warning("STUB - Nancy 8 Barnacle Blast game");
+ SceneChangeDescription scene;
+ scene.sceneID = 4445;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void ArcadePuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void ArcadePuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/arcadepuzzle.h b/engines/nancy/action/puzzle/arcadepuzzle.h
new file mode 100644
index 00000000000..1b20bf35275
--- /dev/null
+++ b/engines/nancy/action/puzzle/arcadepuzzle.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_ARCADEPUZZLE_H
+#define NANCY_ACTION_ARCADEPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Barnacle Blast (Arcanoid) mini-game in Nancy 8
+
+class ArcadePuzzle : public RenderActionRecord {
+public:
+ ArcadePuzzle() : RenderActionRecord(7) {}
+ virtual ~ArcadePuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "ArcadePuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_ARCADEPUZZLE_H
diff --git a/engines/nancy/action/puzzle/cuttingpuzzle.cpp b/engines/nancy/action/puzzle/cuttingpuzzle.cpp
new file mode 100644
index 00000000000..b3d7c35cd3c
--- /dev/null
+++ b/engines/nancy/action/puzzle/cuttingpuzzle.cpp
@@ -0,0 +1,66 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+#include "engines/nancy/action/puzzle/cuttingpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void CuttingPuzzle::init() {
+ // TODO
+}
+
+void CuttingPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+ warning("STUB - Nancy 8 Art Studio Lathe Puzzle");
+ NancySceneState.setEventFlag(341, g_nancy->_true); // Set dowel puzzle flag to solved
+ SceneChangeDescription scene;
+ scene.sceneID = 3854;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void CuttingPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void CuttingPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/cuttingpuzzle.h b/engines/nancy/action/puzzle/cuttingpuzzle.h
new file mode 100644
index 00000000000..530f25171a8
--- /dev/null
+++ b/engines/nancy/action/puzzle/cuttingpuzzle.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_CUTTINGPUZZLE_H
+#define NANCY_ACTION_CUTTINGPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Art Studio Lathe Puzzle in Nancy 8
+
+class CuttingPuzzle : public RenderActionRecord {
+public:
+ CuttingPuzzle() : RenderActionRecord(7) {}
+ virtual ~CuttingPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "CuttingPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_CUTTINGPUZZLE_H
diff --git a/engines/nancy/action/puzzle/matchpuzzle.cpp b/engines/nancy/action/puzzle/matchpuzzle.cpp
new file mode 100644
index 00000000000..ec164b864f6
--- /dev/null
+++ b/engines/nancy/action/puzzle/matchpuzzle.cpp
@@ -0,0 +1,65 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+#include "engines/nancy/action/puzzle/matchpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void MatchPuzzle::init() {
+ // TODO
+}
+
+void MatchPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - return to the main menu
+ warning("STUB - Nancy 8 flag game");
+ SceneChangeDescription scene;
+ scene.sceneID = 4111;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void MatchPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void MatchPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/matchpuzzle.h b/engines/nancy/action/puzzle/matchpuzzle.h
new file mode 100644
index 00000000000..41638aeebd4
--- /dev/null
+++ b/engines/nancy/action/puzzle/matchpuzzle.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_MATCHPUZZLE_H
+#define NANCY_ACTION_MATCHPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Flag puzzle in Nancy 8
+
+class MatchPuzzle : public RenderActionRecord {
+public:
+ MatchPuzzle() : RenderActionRecord(7) {}
+ virtual ~MatchPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "MatchPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_MATCHPUZZLE_H
diff --git a/engines/nancy/action/puzzle/quizpuzzle.cpp b/engines/nancy/action/puzzle/quizpuzzle.cpp
new file mode 100644
index 00000000000..c9cb2c15115
--- /dev/null
+++ b/engines/nancy/action/puzzle/quizpuzzle.cpp
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/nancy/nancy.h"
+#include "engines/nancy/graphics.h"
+#include "engines/nancy/resource.h"
+#include "engines/nancy/sound.h"
+#include "engines/nancy/input.h"
+#include "engines/nancy/util.h"
+
+#include "engines/nancy/state/scene.h"
+#include "engines/nancy/action/puzzle/quizpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void QuizPuzzle::init() {
+ // TODO
+}
+
+void QuizPuzzle::execute() {
+ // TODO
+ warning("STUB - Nancy 8 Quiz Puzzle");
+ _isDone = true;
+}
+
+void QuizPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void QuizPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/quizpuzzle.h b/engines/nancy/action/puzzle/quizpuzzle.h
new file mode 100644
index 00000000000..c70aaab2b1a
--- /dev/null
+++ b/engines/nancy/action/puzzle/quizpuzzle.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NANCY_ACTION_QUIZPUZZLE_H
+#define NANCY_ACTION_QUIZPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Stenography tutorial in Nancy 8
+
+class QuizPuzzle : public RenderActionRecord {
+public:
+ QuizPuzzle() : RenderActionRecord(7) {}
+ virtual ~QuizPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "QuizPuzzle"; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_QUIZPUZZLE_H
diff --git a/engines/nancy/module.mk b/engines/nancy/module.mk
index 0f949472312..1ebe50ce3ee 100644
--- a/engines/nancy/module.mk
+++ b/engines/nancy/module.mk
@@ -15,20 +15,25 @@ MODULE_OBJS = \
action/overlay.o \
action/secondarymovie.o \
action/secondaryvideo.o \
+ action/puzzle/angletosspuzzle.o \
+ action/puzzle/arcadepuzzle.o \
action/puzzle/assemblypuzzle.o \
action/puzzle/bballpuzzle.o \
action/puzzle/bulpuzzle.o \
action/puzzle/bombpuzzle.o \
action/puzzle/collisionpuzzle.o \
action/puzzle/cubepuzzle.o \
+ action/puzzle/cuttingpuzzle.o \
action/puzzle/hamradiopuzzle.o \
action/puzzle/leverpuzzle.o \
action/puzzle/mazechasepuzzle.o \
+ action/puzzle/matchpuzzle.o \
action/puzzle/mouselightpuzzle.o \
action/puzzle/orderingpuzzle.o \
action/puzzle/overridelockpuzzle.o \
action/puzzle/passwordpuzzle.o \
action/puzzle/peepholepuzzle.o \
+ action/puzzle/quizpuzzle.o \
action/puzzle/raycastpuzzle.o \
action/puzzle/riddlepuzzle.o \
action/puzzle/rippedletterpuzzle.o \
Commit: 9e4111cb5f5d3141870f41dd578afaf4c2f82ad0
https://github.com/scummvm/scummvm/commit/9e4111cb5f5d3141870f41dd578afaf4c2f82ad0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Initialize puzzle start time for TileMove puzzle
Needed for Nancy 8 and newer games. Fixes the Swimmer's Itch puzzle
in Nancy 8.
Changes for this puzzle introduced in Nancy 8 have been implemented
with commit 3a6e2562dd23ecf269bd916460e3e318ea01efe8. However, since
_puzzleStartTime wasn't initialized, the puzzle timer ended
prematurely, resulting in immediate loss when starting the game
Changed paths:
engines/nancy/action/puzzle/collisionpuzzle.cpp
diff --git a/engines/nancy/action/puzzle/collisionpuzzle.cpp b/engines/nancy/action/puzzle/collisionpuzzle.cpp
index 8be39073b4a..a06f391dfa5 100644
--- a/engines/nancy/action/puzzle/collisionpuzzle.cpp
+++ b/engines/nancy/action/puzzle/collisionpuzzle.cpp
@@ -277,6 +277,7 @@ void CollisionPuzzle::execute() {
g_nancy->_sound->loadSound(_wallHitSound);
g_nancy->_sound->loadSound(_homeSound);
NancySceneState.setNoHeldItem();
+ _puzzleStartTime = g_nancy->getTotalPlayTime();
_state = kRun;
// fall through
case kRun :
Commit: 44bc34257c9a70cb12b02adb8d0e176a30686751
https://github.com/scummvm/scummvm/commit/44bc34257c9a70cb12b02adb8d0e176a30686751
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Properly stop animation in new phone (used in Nancy 8 and newer)
The helper text animation would overwrite the actual phone numbers
displayed, rendering the new phone interface useless
Changed paths:
engines/nancy/action/puzzle/telephone.cpp
diff --git a/engines/nancy/action/puzzle/telephone.cpp b/engines/nancy/action/puzzle/telephone.cpp
index 3c537b85ba5..ed89300cb70 100644
--- a/engines/nancy/action/puzzle/telephone.cpp
+++ b/engines/nancy/action/puzzle/telephone.cpp
@@ -463,6 +463,7 @@ void Telephone::handleInput(NancyInput &input) {
_drawSurface.fillRect(_destRects[_dirButtonID], _drawSurface.getTransparentColor());
}
+ _animIsStopped = true;
return;
} else if (_upDirButtonID != -1 && buttonNr == _upDirButtonID) {
if (!_isShowingDirectory) {
@@ -471,6 +472,7 @@ void Telephone::handleInput(NancyInput &input) {
++_displayedDirectory;
changeDirectoryEntry = true;
}
+ _animIsStopped = true;
} else if (_downDirButtonID != -1 && buttonNr == _downDirButtonID) {
if (!_isShowingDirectory) {
directorySwitch = true;
@@ -479,10 +481,12 @@ void Telephone::handleInput(NancyInput &input) {
dirEntryDelta = -1;
changeDirectoryEntry = true;
}
+ _animIsStopped = true;
} else if (_dirButtonID != -1 && buttonNr == _dirButtonID) {
if (!_isShowingDirectory) {
directorySwitch = true;
}
+ _animIsStopped = true;
} else {
if (_isShowingDirectory || !_calledNumber.size()) {
_isShowingDirectory = false;
Commit: ba85e41db57efe208c62a3e816a67ba933898e3a
https://github.com/scummvm/scummvm/commit/ba85e41db57efe208c62a3e816a67ba933898e3a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Return to main menu after saving with ScummVM save/load screens
This follows the behavior of the original save screen, and fixes the
issue where the user would get a superfluous save confirmation dialog
when exiting the game, after saving
Changed paths:
engines/nancy/state/loadsave.cpp
diff --git a/engines/nancy/state/loadsave.cpp b/engines/nancy/state/loadsave.cpp
index ad370240685..3556b5e2002 100644
--- a/engines/nancy/state/loadsave.cpp
+++ b/engines/nancy/state/loadsave.cpp
@@ -112,7 +112,7 @@ void LoadSaveMenu::scummVMSave() {
g_nancy->_graphics->suppressNextDraw();
_destroyOnExit = true;
_state = kStop;
- _selectedSave = slot;
+ _selectedSave = -1; // so that we return to the main menu after saving
if (slot >= 0) {
g_nancy->saveGameState(slot, saveName, false);
Commit: 5799fbb2f6e22d2697f98218c317728a71100726
https://github.com/scummvm/scummvm/commit/5799fbb2f6e22d2697f98218c317728a71100726
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-18T22:43:05+02:00
Commit Message:
NANCY: Fix soft lock when no active records are left
Check if no active records were found for the current frame.
This will lead to an infinite loop without anything happening, so we
reset the _recordsWereExecuted flag, to fall back to the kDefaultAR
dependency. This is needed for some scenes in Nancy 8, where
SetVolume() is called, but no other action records are active.
Changed paths:
engines/nancy/action/actionmanager.cpp
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index 3f39eee30d5..a29aa76e931 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -240,6 +240,7 @@ ActionRecord *ActionManager::createAndLoadNewRecord(Common::SeekableReadStream &
}
void ActionManager::processActionRecords() {
+ bool activeRecordsThisFrame = false;
_activatedRecordsThisFrame.clear();
for (auto record : _records) {
@@ -259,6 +260,7 @@ void ActionManager::processActionRecords() {
record->execute();
_recordsWereExecuted = true;
+ activeRecordsThisFrame = true;
}
if (g_nancy->getGameType() >= kGameTypeNancy4 && NancySceneState._state == State::Scene::kLoad) {
@@ -268,6 +270,17 @@ void ActionManager::processActionRecords() {
}
}
+ if (!activeRecordsThisFrame) {
+ // No active records were found for this frame.
+ // This will lead to an infinite loop without
+ // anything happening, so we reset the
+ // _recordsWereExecuted flag, to fall back to
+ // the kDefaultAR dependency. This is needed for
+ // some scenes in Nancy 8, where SetVolume() is
+ // called, but no other action records are active.
+ _recordsWereExecuted = false;
+ }
+
synchronizeMovieWithSound();
debugDrawHotspots();
}
More information about the Scummvm-git-logs
mailing list