[Scummvm-git-logs] scummvm master -> 309dea103a432ecadf281d004a2bc50dc2d64f8b
bluegr
noreply at scummvm.org
Mon May 19 15:41:14 UTC 2025
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:
dd170dcc40 NANCY: Add stubs for the 5 new puzzles of Nancy 9
309dea103a NANCY: Skip the extra inventory bytes per item, introduced in Nancy 9
Commit: dd170dcc4075725fac1ce227ba68bffd0f4f0f5d
https://github.com/scummvm/scummvm/commit/dd170dcc4075725fac1ce227ba68bffd0f4f0f5d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-19T18:40:40+03:00
Commit Message:
NANCY: Add stubs for the 5 new puzzles of Nancy 9
Changed paths:
A engines/nancy/action/puzzle/memorypuzzle.cpp
A engines/nancy/action/puzzle/memorypuzzle.h
A engines/nancy/action/puzzle/multibuildpuzzle.cpp
A engines/nancy/action/puzzle/multibuildpuzzle.h
A engines/nancy/action/puzzle/onebuildpuzzle.cpp
A engines/nancy/action/puzzle/onebuildpuzzle.h
A engines/nancy/action/puzzle/soundmatchpuzzle.cpp
A engines/nancy/action/puzzle/soundmatchpuzzle.h
A engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
A engines/nancy/action/puzzle/whalesurvivorpuzzle.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 1e630cd2d89..6f1b43dd40f 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -45,7 +45,10 @@
#include "engines/nancy/action/puzzle/hamradiopuzzle.h"
#include "engines/nancy/action/puzzle/leverpuzzle.h"
#include "engines/nancy/action/puzzle/mazechasepuzzle.h"
+#include "engines/nancy/action/puzzle/memorypuzzle.h"
#include "engines/nancy/action/puzzle/mouselightpuzzle.h"
+#include "engines/nancy/action/puzzle/multibuildpuzzle.h"
+#include "engines/nancy/action/puzzle/onebuildpuzzle.h"
#include "engines/nancy/action/puzzle/orderingpuzzle.h"
#include "engines/nancy/action/puzzle/overridelockpuzzle.h"
#include "engines/nancy/action/puzzle/passwordpuzzle.h"
@@ -59,12 +62,14 @@
#include "engines/nancy/action/puzzle/setplayerclock.h"
#include "engines/nancy/action/puzzle/sliderpuzzle.h"
#include "engines/nancy/action/puzzle/soundequalizerpuzzle.h"
+#include "engines/nancy/action/puzzle/soundmatchpuzzle.h"
#include "engines/nancy/action/puzzle/spigotpuzzle.h"
#include "engines/nancy/action/puzzle/tangrampuzzle.h"
#include "engines/nancy/action/puzzle/telephone.h"
#include "engines/nancy/action/puzzle/towerpuzzle.h"
#include "engines/nancy/action/puzzle/turningpuzzle.h"
#include "engines/nancy/action/puzzle/twodialpuzzle.h"
+#include "engines/nancy/action/puzzle/whalesurvivorpuzzle.h"
#include "engines/nancy/state/scene.h"
@@ -370,6 +375,7 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
return new OrderingPuzzle(OrderingPuzzle::kKeypadTerse);
case 225:
return new SpigotPuzzle();
+ // -- Nancy 8 and up --
case 226:
return new CuttingPuzzle();
case 228:
@@ -382,6 +388,17 @@ ActionRecord *ActionManager::createActionRecord(uint16 type, Common::SeekableRea
return new QuizPuzzle();
case 232:
return new AngleTossPuzzle();
+ // -- Nancy 9 and up --
+ case 233:
+ return new SoundMatchPuzzle();
+ case 234:
+ return new OneBuildPuzzle();
+ case 235:
+ return new MultiBuildPuzzle();
+ case 237:
+ return new WhaleSurvivorPuzzle();
+ case 238:
+ return new MemoryPuzzle();
default:
warning("Unknown action record type %d", type);
return nullptr;
diff --git a/engines/nancy/action/puzzle/memorypuzzle.cpp b/engines/nancy/action/puzzle/memorypuzzle.cpp
new file mode 100644
index 00000000000..bde985b7149
--- /dev/null
+++ b/engines/nancy/action/puzzle/memorypuzzle.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/memorypuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void MemoryPuzzle::init() {
+ // TODO
+}
+
+void MemoryPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+ warning("STUB - Memory puzzle");
+ NancySceneState.setEventFlag(423, g_nancy->_true); // Set puzzle flag to solved
+ SceneChangeDescription scene;
+ scene.sceneID = 3879;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void MemoryPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void MemoryPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/memorypuzzle.h b/engines/nancy/action/puzzle/memorypuzzle.h
new file mode 100644
index 00000000000..fe5d42c7881
--- /dev/null
+++ b/engines/nancy/action/puzzle/memorypuzzle.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_MEMORYPUZZLE_H
+#define NANCY_ACTION_MEMORYPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Memory puzzle (toy box) in Nancy 9
+
+class MemoryPuzzle : public RenderActionRecord {
+public:
+ MemoryPuzzle() : RenderActionRecord(7) {}
+ virtual ~MemoryPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "MemoryPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_MEMORYPUZZLE_H
diff --git a/engines/nancy/action/puzzle/multibuildpuzzle.cpp b/engines/nancy/action/puzzle/multibuildpuzzle.cpp
new file mode 100644
index 00000000000..4f19d55b709
--- /dev/null
+++ b/engines/nancy/action/puzzle/multibuildpuzzle.cpp
@@ -0,0 +1,86 @@
+/* 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/multibuildpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void MultiBuildPuzzle::init() {
+ // TODO
+}
+
+void MultiBuildPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+
+ SceneChangeDescription scene;
+ uint16 sceneID = NancySceneState.getSceneInfo().sceneID;
+
+ switch (sceneID) {
+ case 2025:
+ warning("STUB - Nancy 9 Sand castle puzzle");
+ scene.sceneID = 2024;
+ break;
+ case 2575:
+ warning("STUB - Nancy 9 Sandwich making puzzle");
+ NancySceneState.setEventFlag(429, g_nancy->_true); // Set puzzle flag to solved
+ scene.sceneID = 2574;
+ break;
+ case 2585:
+ warning("STUB - Nancy 9 Book sorting puzzle");
+ NancySceneState.setEventFlag(397, g_nancy->_true); // Set puzzle flag to solved
+ scene.sceneID = 2583;
+ break;
+ default:
+ warning("MultiBuildPuzzle: Unknown scene %d", sceneID);
+ return;
+ }
+
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void MultiBuildPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void MultiBuildPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/multibuildpuzzle.h b/engines/nancy/action/puzzle/multibuildpuzzle.h
new file mode 100644
index 00000000000..2a54ffa88f7
--- /dev/null
+++ b/engines/nancy/action/puzzle/multibuildpuzzle.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_MULTIBUILDPUZZLE_H
+#define NANCY_ACTION_MULTIBUILDPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Puzzle in Nancy 9, where an item is built from smaller pieces
+
+class MultiBuildPuzzle : public RenderActionRecord {
+public:
+ MultiBuildPuzzle() : RenderActionRecord(7) {}
+ virtual ~MultiBuildPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "MultiBuildPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_ONEBUILDPUZZLE_H
diff --git a/engines/nancy/action/puzzle/onebuildpuzzle.cpp b/engines/nancy/action/puzzle/onebuildpuzzle.cpp
new file mode 100644
index 00000000000..1497dff492f
--- /dev/null
+++ b/engines/nancy/action/puzzle/onebuildpuzzle.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/onebuildpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void OneBuildPuzzle::init() {
+ // TODO
+}
+
+void OneBuildPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+ warning("STUB - Nancy 9 Pipe joining puzzle under sink");
+ NancySceneState.setEventFlag(425, g_nancy->_true); // Set puzzle flag to solved
+ SceneChangeDescription scene;
+ scene.sceneID = 6520;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void OneBuildPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void OneBuildPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/onebuildpuzzle.h b/engines/nancy/action/puzzle/onebuildpuzzle.h
new file mode 100644
index 00000000000..191180f15e6
--- /dev/null
+++ b/engines/nancy/action/puzzle/onebuildpuzzle.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_ONEBUILDPUZZLE_H
+#define NANCY_ACTION_ONEBUILDPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Pipe joining puzzle under sink in Nancy 9
+
+class OneBuildPuzzle : public RenderActionRecord {
+public:
+ OneBuildPuzzle() : RenderActionRecord(7) {}
+ virtual ~OneBuildPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "OneBuildPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_ONEBUILDPUZZLE_H
diff --git a/engines/nancy/action/puzzle/soundmatchpuzzle.cpp b/engines/nancy/action/puzzle/soundmatchpuzzle.cpp
new file mode 100644
index 00000000000..ba9fe24d3cf
--- /dev/null
+++ b/engines/nancy/action/puzzle/soundmatchpuzzle.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/soundmatchpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void SoundMatchPuzzle::init() {
+ // TODO
+}
+
+void SoundMatchPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+ warning("STUB - Nancy 9 Whale sounds puzzle");
+ NancySceneState.setEventFlag(436, g_nancy->_true); // Set puzzle flag to solved
+ SceneChangeDescription scene;
+ scene.sceneID = 2985;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void SoundMatchPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void SoundMatchPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/soundmatchpuzzle.h b/engines/nancy/action/puzzle/soundmatchpuzzle.h
new file mode 100644
index 00000000000..435d38c6806
--- /dev/null
+++ b/engines/nancy/action/puzzle/soundmatchpuzzle.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_SOUNDMATCHPUZZLE_H
+#define NANCY_ACTION_SOUNDMATCHPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Whale sound matching puzzle in Nancy 9
+
+class SoundMatchPuzzle : public RenderActionRecord {
+public:
+ SoundMatchPuzzle() : RenderActionRecord(7) {}
+ virtual ~SoundMatchPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "SoundMatchPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_SOUNDMATCHPUZZLE_H
diff --git a/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp b/engines/nancy/action/puzzle/whalesurvivorpuzzle.cpp
new file mode 100644
index 00000000000..593c5dd3afd
--- /dev/null
+++ b/engines/nancy/action/puzzle/whalesurvivorpuzzle.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/whalesurvivorpuzzle.h"
+
+namespace Nancy {
+namespace Action {
+
+void WhaleSurvivorPuzzle::init() {
+ // TODO
+}
+
+void WhaleSurvivorPuzzle::execute() {
+ if (_state == kBegin) {
+ init();
+ registerGraphics();
+ _state = kRun;
+ }
+
+ // TODO
+ // Stub - move to the winning screen
+ warning("STUB - Whale survivor puzzle");
+ NancySceneState.setEventFlag(425, g_nancy->_true); // Set puzzle flag to solved
+ SceneChangeDescription scene;
+ scene.sceneID = 2990;
+ NancySceneState.resetStateToInit();
+ NancySceneState.changeScene(scene);
+}
+
+void WhaleSurvivorPuzzle::readData(Common::SeekableReadStream &stream) {
+ // TODO
+ stream.skip(stream.size() - stream.pos());
+}
+
+void WhaleSurvivorPuzzle::handleInput(NancyInput &input) {
+ // TODO
+}
+
+} // End of namespace Action
+} // End of namespace Nancy
diff --git a/engines/nancy/action/puzzle/whalesurvivorpuzzle.h b/engines/nancy/action/puzzle/whalesurvivorpuzzle.h
new file mode 100644
index 00000000000..a6280a1bd0b
--- /dev/null
+++ b/engines/nancy/action/puzzle/whalesurvivorpuzzle.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_WHALESURVIVORPUZZLE_H
+#define NANCY_ACTION_WHALESURVIVORPUZZLE_H
+
+#include "engines/nancy/action/actionrecord.h"
+
+namespace Nancy {
+namespace Action {
+
+// Feeding frenzy puzzle in Nancy 9
+
+class WhaleSurvivorPuzzle : public RenderActionRecord {
+public:
+ WhaleSurvivorPuzzle() : RenderActionRecord(7) {}
+ virtual ~WhaleSurvivorPuzzle() {}
+
+ void init() override;
+
+ void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+ void handleInput(NancyInput &input) override;
+
+protected:
+ Common::String getRecordTypeName() const override { return "WhaleSurvivorPuzzle"; }
+ bool isViewportRelative() const override { return true; }
+};
+
+} // End of namespace Action
+} // End of namespace Nancy
+
+#endif // NANCY_ACTION_WHALESURVIVORPUZZLE_H
diff --git a/engines/nancy/module.mk b/engines/nancy/module.mk
index 1ebe50ce3ee..15749e87eba 100644
--- a/engines/nancy/module.mk
+++ b/engines/nancy/module.mk
@@ -28,7 +28,10 @@ MODULE_OBJS = \
action/puzzle/leverpuzzle.o \
action/puzzle/mazechasepuzzle.o \
action/puzzle/matchpuzzle.o \
+ action/puzzle/memorypuzzle.o \
action/puzzle/mouselightpuzzle.o \
+ action/puzzle/multibuildpuzzle.o \
+ action/puzzle/onebuildpuzzle.o \
action/puzzle/orderingpuzzle.o \
action/puzzle/overridelockpuzzle.o \
action/puzzle/passwordpuzzle.o \
@@ -42,12 +45,14 @@ MODULE_OBJS = \
action/puzzle/setplayerclock.o \
action/puzzle/sliderpuzzle.o \
action/puzzle/soundequalizerpuzzle.o \
+ action/puzzle/soundmatchpuzzle.o \
action/puzzle/spigotpuzzle.o \
action/puzzle/tangrampuzzle.o \
action/puzzle/telephone.o \
action/puzzle/towerpuzzle.o \
action/puzzle/turningpuzzle.o \
action/puzzle/twodialpuzzle.o \
+ action/puzzle/whalesurvivorpuzzle.o \
ui/fullscreenimage.o \
ui/animatedbutton.o \
ui/button.o \
Commit: 309dea103a432ecadf281d004a2bc50dc2d64f8b
https://github.com/scummvm/scummvm/commit/309dea103a432ecadf281d004a2bc50dc2d64f8b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-05-19T18:40:41+03:00
Commit Message:
NANCY: Skip the extra inventory bytes per item, introduced in Nancy 9
Fixes the inventory in Nancy 9
Changed paths:
engines/nancy/enginedata.cpp
diff --git a/engines/nancy/enginedata.cpp b/engines/nancy/enginedata.cpp
index 5de1b215a60..a5fa77c40c4 100644
--- a/engines/nancy/enginedata.cpp
+++ b/engines/nancy/enginedata.cpp
@@ -198,12 +198,19 @@ INV::INV(Common::SeekableReadStream *chunkStream) : EngineData(chunkStream) {
item.cantSound.readNormal(*chunkStream);
item.cantSoundNotHolding.readNormal(*chunkStream);
- } else if (s.getVersion() >= kGameTypeNancy3) {
+ } else if (s.getVersion() >= kGameTypeNancy3 && s.getVersion() <= kGameTypeNancy8) {
s.syncBytes(textBuf, 60);
textBuf[59] = '\0';
assembleTextLine((char *)textBuf, item.cantText, 60);
item.cantSound.readNormal(*chunkStream);
+ } else if (s.getVersion() >= kGameTypeNancy9) {
+ s.syncBytes(textBuf, 60);
+ textBuf[59] = '\0';
+ assembleTextLine((char *)textBuf, item.cantText, 60);
+
+ item.cantSound.readNormal(*chunkStream);
+ s.skip(170); // TODO: Handle this data properly
}
}
}
More information about the Scummvm-git-logs
mailing list