mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
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.
This commit is contained in:
parent
8bb49c1acf
commit
3301d890db
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user