mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +00:00
M4: Fix endian issue in sprite loading
This commit is contained in:
parent
d44c8bd0bd
commit
2225f85548
@ -533,7 +533,7 @@ M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index
|
|||||||
|
|
||||||
// Set the stream boolean
|
// Set the stream boolean
|
||||||
if (streamSeries) {
|
if (streamSeries) {
|
||||||
if (myCelSource[CELS_STREAM])
|
if (FROM_LE_32(myCelSource[CELS_STREAM]))
|
||||||
*streamSeries = true;
|
*streamSeries = true;
|
||||||
else
|
else
|
||||||
*streamSeries = false;
|
*streamSeries = false;
|
||||||
@ -546,7 +546,7 @@ M4sprite *CreateSprite(MemHandle resourceHandle, int32 handleOffset, int32 index
|
|||||||
mySprite->yOffset = FROM_LE_32(myCelSource[CELS_Y]);
|
mySprite->yOffset = FROM_LE_32(myCelSource[CELS_Y]);
|
||||||
mySprite->w = FROM_LE_32(myCelSource[CELS_W]);
|
mySprite->w = FROM_LE_32(myCelSource[CELS_W]);
|
||||||
mySprite->h = FROM_LE_32(myCelSource[CELS_H]);
|
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];
|
mySprite->data = (uint8 *)&myCelSource[CELS_DATA];
|
||||||
|
|
||||||
if ((mySprite->w > 0) && (mySprite->h > 0)) {
|
if ((mySprite->w > 0) && (mySprite->h > 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user