[Scummvm-git-logs] scummvm master -> 7d02b3cd811b17dc08fd4d9ef0e4005b8baa6970
bluegr
noreply at scummvm.org
Tue Jun 17 01:31:15 UTC 2025
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:
7d02b3cd81 NANCY: Further work on the Nancy 8 match / flag puzzle
Commit: 7d02b3cd811b17dc08fd4d9ef0e4005b8baa6970
https://github.com/scummvm/scummvm/commit/7d02b3cd811b17dc08fd4d9ef0e4005b8baa6970
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-06-17T04:30:58+03:00
Commit Message:
NANCY: Further work on the Nancy 8 match / flag puzzle
Changed paths:
engines/nancy/action/puzzle/matchpuzzle.cpp
engines/nancy/action/puzzle/matchpuzzle.h
diff --git a/engines/nancy/action/puzzle/matchpuzzle.cpp b/engines/nancy/action/puzzle/matchpuzzle.cpp
index ec164b864f6..42cd59742a6 100644
--- a/engines/nancy/action/puzzle/matchpuzzle.cpp
+++ b/engines/nancy/action/puzzle/matchpuzzle.cpp
@@ -34,6 +34,15 @@ namespace Action {
void MatchPuzzle::init() {
// TODO
+ //_screenPosition = _displayBounds;
+
+ //_drawSurface.create(_screenPosition.width(), _screenPosition.height(), g_nancy->_graphics->getInputPixelFormat());
+ //_drawSurface.clear(g_nancy->_graphics->getTransColor());
+
+ setTransparent(true);
+
+ g_nancy->_resource->loadImage(_overlayName, _image);
+ RenderActionRecord::init();
}
void MatchPuzzle::execute() {
@@ -46,15 +55,37 @@ void MatchPuzzle::execute() {
// TODO
// Stub - return to the main menu
warning("STUB - Nancy 8 flag game");
- SceneChangeDescription scene;
- scene.sceneID = 4111;
- NancySceneState.resetStateToInit();
- NancySceneState.changeScene(scene);
+ _exitSceneChange.execute();
}
void MatchPuzzle::readData(Common::SeekableReadStream &stream) {
- // TODO
- stream.skip(stream.size() - stream.pos());
+ readFilename(stream, _overlayName);
+ readFilename(stream, _flagPointBackgroundName);
+
+ stream.skip(2); // TODO (value: 5)
+ stream.skip(2); // TODO (value: 7)
+ stream.skip(2); // 26 flags
+
+ readRect(stream,_shuffleButtonRect);
+ readRectArray(stream, _flagRects, 26);
+
+ stream.skip(103); // TODO (mostly zeroes)
+
+ readFilenameArray(stream, _flagNames, 26);
+
+ stream.skip(132); // TODO (zeroes)
+ stream.skip(173); // TODO
+
+ _slotWinSound.readNormal(stream);
+ _shuffleSound.readNormal(stream);
+ _cardPlaceSound.readNormal(stream);
+
+ _solveSceneChange.readData(stream);
+ stream.skip(2);
+ _matchSuccessSound.readNormal(stream);
+ _exitSceneChange.readData(stream);
+
+ stream.skip(16); // TODO
}
void MatchPuzzle::handleInput(NancyInput &input) {
diff --git a/engines/nancy/action/puzzle/matchpuzzle.h b/engines/nancy/action/puzzle/matchpuzzle.h
index 41638aeebd4..ef91a3e95e7 100644
--- a/engines/nancy/action/puzzle/matchpuzzle.h
+++ b/engines/nancy/action/puzzle/matchpuzzle.h
@@ -43,6 +43,25 @@ public:
protected:
Common::String getRecordTypeName() const override { return "MatchPuzzle"; }
bool isViewportRelative() const override { return true; }
+
+ Graphics::ManagedSurface _image;
+ //Common::Rect _displayBounds;
+
+ Common::Rect _shuffleButtonRect;
+ Common::Array<Common::Rect> _flagRects;
+
+ Common::Path _overlayName;
+ Common::Path _flagPointBackgroundName;
+
+ Common::StringArray _flagNames;
+
+ SoundDescription _slotWinSound;
+ SoundDescription _shuffleSound;
+ SoundDescription _cardPlaceSound;
+ SoundDescription _matchSuccessSound;
+
+ SceneChangeWithFlag _solveSceneChange;
+ SceneChangeWithFlag _exitSceneChange;
};
} // End of namespace Action
More information about the Scummvm-git-logs
mailing list