[Scummvm-git-logs] scummvm master -> b16a7735094771b3b8c7c8bd80176d18b5a26956
dwatteau
noreply at scummvm.org
Tue Nov 19 08:44:01 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:
b16a773509 DGDS: Fix VQT image decoding on big-endian systems (Trac#15506)
Commit: b16a7735094771b3b8c7c8bd80176d18b5a26956
https://github.com/scummvm/scummvm/commit/b16a7735094771b3b8c7c8bd80176d18b5a26956
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-11-19T09:43:27+01:00
Commit Message:
DGDS: Fix VQT image decoding on big-endian systems (Trac#15506)
GFX rendering issue on MorphOS reported by BeWorld2018, big-endian VQT
investigation of mine, and proper _doVqtDecode() fix from BLooperZ, thanks!
Changed paths:
engines/dgds/image.cpp
diff --git a/engines/dgds/image.cpp b/engines/dgds/image.cpp
index c942ad7a47b..90bbbf0e9d0 100644
--- a/engines/dgds/image.cpp
+++ b/engines/dgds/image.cpp
@@ -20,6 +20,7 @@
*/
#include "common/debug.h"
+#include "common/endian.h"
#include "common/rect.h"
#include "common/textconsole.h"
#include "common/str.h"
@@ -387,7 +388,7 @@ static inline byte _getVqtBits(struct VQTDecodeState *state, uint16 nbits) {
const uint32 index = offset >> 3;
const uint32 shift = offset & 7;
state->offset += nbits;
- return (*(const uint16 *)(state->srcPtr + index) >> (shift)) & (byte)(0xff00 >> (16 - nbits));
+ return (READ_LE_UINT16(state->srcPtr + index) >> (shift)) & (byte)(0xff00 >> (16 - nbits));
}
static void _doVqtDecode2(struct VQTDecodeState *state, const uint16 x, const uint16 y, const uint16 w, const uint16 h) {
More information about the Scummvm-git-logs
mailing list