[Scummvm-git-logs] scummvm master -> e97d592324fe0389ef66f0f41aceef7dad090b61

AndywinXp noreply at scummvm.org
Thu Jun 19 22:41:40 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
e97d592324 LASTEXPRESS: Finish implementing BE support


Commit: e97d592324fe0389ef66f0f41aceef7dad090b61
    https://github.com/scummvm/scummvm/commit/e97d592324fe0389ef66f0f41aceef7dad090b61
Author: AndywinXp (andywinxp at gmail.com)
Date: 2025-06-20T00:41:36+02:00

Commit Message:
LASTEXPRESS: Finish implementing BE support

Now backgrounds are visible

Changed paths:
    engines/lastexpress/graphics.cpp


diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index 96e8f6cee70..b5fb56cc677 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -1926,7 +1926,7 @@ void GraphicsManager::decompG(byte *data, int32 size) {
 
 			// Copy green component (bits 5-9) from previous output
 			for (int i = 0; i < count; i++) {
-				*((int16 *)outBuffer) |= (READ_LE_INT16(sourcePtr) & 0x3E0);
+				*((int16 *)outBuffer) |= (*sourcePtr & 0x3E0);
 				outBuffer += 2;
 				sourcePtr++;
 			}
@@ -2010,7 +2010,11 @@ bool GraphicsManager::decomp16(byte *data, int32 size) {
 
 	if (_bgDecompFlags == 0) {
 		_bgDecompFlags = 0x1000;
-		_bgDecompOutBufferTemp = (_bgDecompOutBuffer + 1);
+#ifdef SCUMM_LITTLE_ENDIAN
+		_bgDecompOutBufferTemp = (_bgDecompOutBuffer + 1); // High byte for red
+#else
+		_bgDecompOutBufferTemp = _bgDecompOutBuffer;       // Low byte for red on BE
+#endif
 		_bgDecompTargetRect->x = READ_LE_UINT32(data);
 		_bgDecompTargetRect->y = READ_LE_UINT32(data + 1 * sizeof(uint32));
 		_bgDecompTargetRect->width = READ_LE_UINT32(data + 2 * sizeof(uint32));
@@ -2048,10 +2052,16 @@ bool GraphicsManager::decomp16(byte *data, int32 size) {
 
 		if ((_bgDecompFlags & 0x100) != 0) {
 			_bgDecompFlags &= ~0x100;
-			_bgDecompFlags++; // Go to the next channel
 
 			_bgDecompOutBufferTemp = _bgDecompOutBuffer;
 
+#ifndef SCUMM_LITTLE_ENDIAN
+			if ((_bgDecompFlags & 3) == 0)
+				_bgDecompOutBufferTemp++;
+#endif
+
+			_bgDecompFlags++; // Go to the next channel
+
 			if ((_bgDecompFlags & 3) == 3)
 				return false;
 		}




More information about the Scummvm-git-logs mailing list