[Scummvm-git-logs] scummvm master -> 2225f8554823171ca481bb66f5f1d89ec77a8fc2

dreammaster noreply at scummvm.org
Fri May 24 03:54:11 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:
2225f85548 M4: Fix endian issue in sprite loading


Commit: 2225f8554823171ca481bb66f5f1d89ec77a8fc2
    https://github.com/scummvm/scummvm/commit/2225f8554823171ca481bb66f5f1d89ec77a8fc2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-05-23T20:54:05-07:00

Commit Message:
M4: Fix endian issue in sprite loading

Changed paths:
    engines/m4/wscript/ws_load.cpp


diff --git a/engines/m4/wscript/ws_load.cpp b/engines/m4/wscript/ws_load.cpp
index 6229f155bf2..a492ddca782 100644
--- a/engines/m4/wscript/ws_load.cpp
+++ b/engines/m4/wscript/ws_load.cpp
@@ -533,7 +533,7 @@ M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index
 
 	// Set the stream boolean
 	if (streamSeries) {
-		if (myCelSource[CELS_STREAM])
+		if (FROM_LE_32(myCelSource[CELS_STREAM]))
 			*streamSeries = true;
 		else
 			*streamSeries = false;
@@ -546,7 +546,7 @@ M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index
 	mySprite->yOffset = FROM_LE_32(myCelSource[CELS_Y]);
 	mySprite->w = FROM_LE_32(myCelSource[CELS_W]);
 	mySprite->h = FROM_LE_32(myCelSource[CELS_H]);
-	mySprite->encoding = (uint8)myCelSource[CELS_COMP];
+	mySprite->encoding = (uint8)FROM_LE_32(myCelSource[CELS_COMP]);
 	mySprite->data = (uint8 *)&myCelSource[CELS_DATA];
 
 	if ((mySprite->w > 0) && (mySprite->h > 0)) {




More information about the Scummvm-git-logs mailing list