[Scummvm-git-logs] scummvm master -> 4962920694f5cac9067f9eae6cbf400d4b93566b
bluegr
noreply at scummvm.org
Sat Jul 6 14:50:22 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4962920694 DGDS: Fix reading mouse hotspots
Commit: 4962920694f5cac9067f9eae6cbf400d4b93566b
https://github.com/scummvm/scummvm/commit/4962920694f5cac9067f9eae6cbf400d4b93566b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-07-06T17:50:14+03:00
Commit Message:
DGDS: Fix reading mouse hotspots
The functions that were passed to the constructor would not be called
in the order that they appear, causing the hotspot list to be initialized
incorrectly
This is the same fix as the one applied for per-scene globals in b2e6bc545a
Changed paths:
engines/dgds/scene.cpp
diff --git a/engines/dgds/scene.cpp b/engines/dgds/scene.cpp
index 0234a4b59e4..a1f94de559f 100644
--- a/engines/dgds/scene.cpp
+++ b/engines/dgds/scene.cpp
@@ -312,10 +312,13 @@ bool Scene::readGameItemList(Common::SeekableReadStream *s, Common::Array<GameIt
bool Scene::readMouseHotspotList(Common::SeekableReadStream *s, Common::Array<MouseCursor> &list) const {
uint16 num = s->readUint16LE();
+ uint16 hotX, hotY;
_checkListNotTooLong(num, "mouse hotspots");
for (uint16 i = 0; i < num; i++) {
- list.push_back(MouseCursor(s->readUint16LE(), s->readUint16LE()));
+ hotX = s->readUint16LE();
+ hotY = s->readUint16LE();
+ list.push_back(MouseCursor(hotX, hotY));
}
return !s->err();
}
More information about the Scummvm-git-logs
mailing list