[Scummvm-git-logs] scummvm master -> 619c6cd40a0b1ee7309d6ad547738e09af9b29df
yuv422
noreply at scummvm.org
Tue Dec 3 13:34:25 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:
619c6cd40a DARKSEED: Fix endian issues with BE machines
Commit: 619c6cd40a0b1ee7309d6ad547738e09af9b29df
https://github.com/scummvm/scummvm/commit/619c6cd40a0b1ee7309d6ad547738e09af9b29df
Author: Eric Fry (yuv422 at reversedgames.com)
Date: 2024-12-04T00:31:53+11:00
Commit Message:
DARKSEED: Fix endian issues with BE machines
Changed paths:
engines/darkseed/img.cpp
diff --git a/engines/darkseed/img.cpp b/engines/darkseed/img.cpp
index 45d0f87e5f9..57d231830aa 100644
--- a/engines/darkseed/img.cpp
+++ b/engines/darkseed/img.cpp
@@ -42,8 +42,8 @@ bool Img::load(const Common::Path &filename) {
bool Img::load(Common::SeekableReadStream &readStream) {
Common::Array<uint8> unpackedData;
unpackRLE(readStream, unpackedData);
- _x = READ_UINT16(&unpackedData.data()[0]);
- _y = READ_UINT16(&unpackedData.data()[2]);
+ _x = (uint16)READ_LE_INT16(&unpackedData.data()[0]);
+ _y = (uint16)READ_LE_INT16(&unpackedData.data()[2]);
unpackPlanarData(unpackedData, 4);
return true;
}
@@ -86,8 +86,8 @@ bool Img::unpackRLE(Common::SeekableReadStream &readStream, Common::Array<byte>
}
void Img::unpackPlanarData(Common::Array<uint8> &planarData, uint16 headerOffset) {
- _height = READ_UINT16(&planarData.data()[headerOffset]);
- _width = READ_UINT16(&planarData.data()[headerOffset + 2]) * 8;
+ _height = (uint16)READ_LE_INT16(&planarData.data()[headerOffset]);
+ _width = (uint16)READ_LE_INT16(&planarData.data()[headerOffset + 2]) * 8;
_mode = planarData.data()[headerOffset + 4];
// assert(mode == 0xff);
_pixels.resize(_width * _height, 0);
More information about the Scummvm-git-logs
mailing list