[Scummvm-git-logs] scummvm branch-2-9 -> 3b4d3ccfcde3320109d47adfbcc1a558dc5c873b
dwatteau
noreply at scummvm.org
Tue Nov 19 08:45:27 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:
3b4d3ccfcd DGDS: Fix VQT image decoding on big-endian systems (Trac#15506)
Commit: 3b4d3ccfcde3320109d47adfbcc1a558dc5c873b
https://github.com/scummvm/scummvm/commit/3b4d3ccfcde3320109d47adfbcc1a558dc5c873b
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-11-19T09:45:15+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!
(cherry picked from commit b16a7735094771b3b8c7c8bd80176d18b5a26956)
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