[Scummvm-git-logs] scummvm master -> 789c4b83f5dc1471fa33d449fc59bf488c7f7573
bluegr
noreply at scummvm.org
Tue Jun 3 00:15:18 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1934239096 NANCY: Further work on the Nancy 8 Angle Toss puzzle
ca3ef38a91 FREESCAPE: Fix signed/unsigned mismatch. Eliminate recalcs
789c4b83f5 M4: Add a constructor to the RGB8 class and re-add member var init
Commit: 1934239096cf73887a0b1fdbffafc25b7283243a
https://github.com/scummvm/scummvm/commit/1934239096cf73887a0b1fdbffafc25b7283243a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-06-03T02:50:10+03:00
Commit Message:
NANCY: Further work on the Nancy 8 Angle Toss puzzle
Changed paths:
engines/nancy/action/puzzle/angletosspuzzle.cpp
engines/nancy/action/puzzle/angletosspuzzle.h
diff --git a/engines/nancy/action/puzzle/angletosspuzzle.cpp b/engines/nancy/action/puzzle/angletosspuzzle.cpp
index a5134251734..a71e75d5f4b 100644
--- a/engines/nancy/action/puzzle/angletosspuzzle.cpp
+++ b/engines/nancy/action/puzzle/angletosspuzzle.cpp
@@ -33,6 +33,13 @@ namespace Nancy {
namespace Action {
void AngleTossPuzzle::init() {
+ Common::Rect screenBounds = NancySceneState.getViewport().getBounds();
+ _drawSurface.create(screenBounds.width(), screenBounds.height(), g_nancy->_graphics->getInputPixelFormat());
+ _drawSurface.clear(g_nancy->_graphics->getTransColor());
+ setTransparent(true);
+ setVisible(true);
+ moveTo(screenBounds);
+
// TODO
}
@@ -53,8 +60,35 @@ void AngleTossPuzzle::execute() {
}
void AngleTossPuzzle::readData(Common::SeekableReadStream &stream) {
- // TODO
- stream.skip(stream.size() - stream.pos());
+ Common::Path tmp;
+ readFilename(stream, tmp);
+ stream.skip(12); // TODO
+
+ for (uint i = 0; i < 22; ++i) {
+ Common::Rect r;
+ readRect(stream, r);
+
+ /*
+ Common::String desc = Common::String::format("AngleTossPuzzle rect %d", i);
+ debug("%s %d, %d, %d, %d", desc.c_str(), r.left, r.top, r.right, r.bottom);
+
+ Graphics::Surface *s = g_system->lockScreen();
+ s->fillRect(r, 255);
+ g_system->unlockScreen();
+ g_system->updateScreen();
+ g_system->delayMillis(1000);
+ */
+ }
+
+ _powerSound.readNormal(stream);
+ _squeakSound.readNormal(stream);
+ _chainSound.readNormal(stream);
+
+ _throwSquidScene.readData(stream);
+ stream.skip(7); // TODO
+ _exitScene.readData(stream);
+
+ stream.skip(16); // TODO
}
void AngleTossPuzzle::handleInput(NancyInput &input) {
diff --git a/engines/nancy/action/puzzle/angletosspuzzle.h b/engines/nancy/action/puzzle/angletosspuzzle.h
index 5c1bcb53276..b669da5a697 100644
--- a/engines/nancy/action/puzzle/angletosspuzzle.h
+++ b/engines/nancy/action/puzzle/angletosspuzzle.h
@@ -43,6 +43,13 @@ public:
protected:
Common::String getRecordTypeName() const override { return "AngleTossPuzzle"; }
bool isViewportRelative() const override { return true; }
+
+ SoundDescription _powerSound;
+ SoundDescription _squeakSound;
+ SoundDescription _chainSound;
+
+ SceneChangeWithFlag _throwSquidScene;
+ SceneChangeWithFlag _exitScene;
};
} // End of namespace Action
Commit: ca3ef38a91c1e7b4f42653399a8bfaea4fa0125f
https://github.com/scummvm/scummvm/commit/ca3ef38a91c1e7b4f42653399a8bfaea4fa0125f
Author: Bob Pulliam (bpulliam at gmail.com)
Date: 2025-06-03T03:11:33+03:00
Commit Message:
FREESCAPE: Fix signed/unsigned mismatch. Eliminate recalcs
Changed paths:
engines/freescape/unpack.cpp
diff --git a/engines/freescape/unpack.cpp b/engines/freescape/unpack.cpp
index 0becfdf1b76..7997e3c5a3d 100644
--- a/engines/freescape/unpack.cpp
+++ b/engines/freescape/unpack.cpp
@@ -109,6 +109,7 @@ void unpack_data(unsigned char *unpacked_data, unsigned char *buf, unsigned int
unsigned char *save_buf = NULL;
unsigned char *save_unp = NULL;
unsigned int cur_unpacked_data_size = 0x00;
+ unsigned int cur_index = 0x00;
save_buf = buf;
save_unp = unpacked_data;
@@ -141,16 +142,17 @@ void unpack_data(unsigned char *unpacked_data, unsigned char *buf, unsigned int
if ((opcode & 1) == 1) {
break;
}
- if (buf - save_buf >= packed_data_len) {
+ cur_index = (unsigned int)(buf - save_buf);
+ if (cur_index >= packed_data_len) {
break;
}
}
- if (buf - save_buf < packed_data_len) {
- if ((packed_data_len - (buf - save_buf)) > (*unpacked_data_size - (unpacked_data - save_unp))) {
+ if (cur_index < packed_data_len) {
+ if ((packed_data_len - cur_index) > (*unpacked_data_size - (unpacked_data - save_unp))) {
debug("Data left are too large!");
}
- memcpy(unpacked_data, buf, packed_data_len - (buf - save_buf));
- cur_unpacked_data_size += packed_data_len - (buf - save_buf);
+ memcpy(unpacked_data, buf, packed_data_len - cur_index);
+ cur_unpacked_data_size += packed_data_len - cur_index;
}
*unpacked_data_size = cur_unpacked_data_size;
}
Commit: 789c4b83f5dc1471fa33d449fc59bf488c7f7573
https://github.com/scummvm/scummvm/commit/789c4b83f5dc1471fa33d449fc59bf488c7f7573
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-06-03T03:14:53+03:00
Commit Message:
M4: Add a constructor to the RGB8 class and re-add member var init
This should fix compilation, while initializing the struct member vars
correctly. Thanks to @lephilousophe for the suggested fix
Changed paths:
engines/m4/m4_types.h
diff --git a/engines/m4/m4_types.h b/engines/m4/m4_types.h
index 717ca1e2d85..669a0c1f9f1 100644
--- a/engines/m4/m4_types.h
+++ b/engines/m4/m4_types.h
@@ -86,7 +86,10 @@ struct token {
#include "common/pack-start.h" // START STRUCT PACKING
struct RGB8 {
- byte r, g, b;
+ byte r = 0, g = 0, b = 0;
+
+ constexpr RGB8() = default;
+ constexpr RGB8(const byte r, const byte g, const byte b) : r(r), g(g), b(b) {}
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
More information about the Scummvm-git-logs
mailing list