[Scummvm-git-logs] scummvm master -> 3301d890db40c7e7dca7b1fca41704fe69f18782
bluegr
noreply at scummvm.org
Thu Jan 12 22:40:11 UTC 2023
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:
3301d890db SLUDGE: Save/restore region's direction as signed integer
Commit: 3301d890db40c7e7dca7b1fca41704fe69f18782
https://github.com/scummvm/scummvm/commit/3301d890db40c7e7dca7b1fca41704fe69f18782
Author: Sebastian Krzyszkowiak (dos at dosowisko.net)
Date: 2023-01-13T00:40:07+02:00
Commit Message:
SLUDGE: Save/restore region's direction as signed integer
The engine is using -1 as an undefined direction, so keep it that
way after save & restore cycle. Otherwise persons will spin around
for a while trying to rotate themselves to 65535 degrees when
aligning to a region with undefined direction.
Changed paths:
engines/sludge/region.cpp
diff --git a/engines/sludge/region.cpp b/engines/sludge/region.cpp
index c603950c586..11a336a9c63 100644
--- a/engines/sludge/region.cpp
+++ b/engines/sludge/region.cpp
@@ -78,7 +78,7 @@ void RegionManager::saveRegions(Common::WriteStream *stream) {
stream->writeUint16BE((*it)->y2);
stream->writeUint16BE((*it)->sX);
stream->writeUint16BE((*it)->sY);
- stream->writeUint16BE((*it)->di);
+ stream->writeSint16BE((*it)->di);
g_sludge->_objMan->saveObjectRef((*it)->thisType, stream);
}
}
@@ -94,7 +94,7 @@ void RegionManager::loadRegions(Common::SeekableReadStream *stream) {
newRegion->y2 = stream->readUint16BE();
newRegion->sX = stream->readUint16BE();
newRegion->sY = stream->readUint16BE();
- newRegion->di = stream->readUint16BE();
+ newRegion->di = stream->readSint16BE();
newRegion->thisType = g_sludge->_objMan->loadObjectRef(stream);
}
}
More information about the Scummvm-git-logs
mailing list