[Scummvm-git-logs] scummvm master -> c2a34b9e95c6ad94331e74cdbe01c512b57f3bd1
AndywinXp
noreply at scummvm.org
Thu Jun 19 12:59:37 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:
c2a34b9e95 LASTEXPRESS: NIS: Endianness fixes
Commit: c2a34b9e95c6ad94331e74cdbe01c512b57f3bd1
https://github.com/scummvm/scummvm/commit/c2a34b9e95c6ad94331e74cdbe01c512b57f3bd1
Author: AndywinXp (andywinxp at gmail.com)
Date: 2025-06-19T14:59:31+02:00
Commit Message:
LASTEXPRESS: NIS: Endianness fixes
Changed paths:
engines/lastexpress/game/nis.cpp
diff --git a/engines/lastexpress/game/nis.cpp b/engines/lastexpress/game/nis.cpp
index 17cf909fabd..6dc2a972096 100644
--- a/engines/lastexpress/game/nis.cpp
+++ b/engines/lastexpress/game/nis.cpp
@@ -224,15 +224,18 @@ bool NISManager::initNIS(const char *filename, int32 flags) {
_engine->getMemoryManager()->lockSeqMem((_totalBackgroundPages - 300) * PAGE_SIZE);
getStream((byte *)&_eventsCount, 4);
+
+ _eventsCount = FROM_LE_32(_eventsCount);
+
_eventsByteStream = (byte *)(_backgroundSurface + 2);
- _background1Offset = *((int32 *)_backgroundSurface + 2);
+ _background1Offset = FROM_LE_32(*((int32 *)_backgroundSurface + 2));
_background1Offset += 16;
_background1Offset &= 0xFFFFFFF0;
_streamBufferSize -= _background1Offset;
_background1ByteStream = (byte *)((byte *)_backgroundSurface + _streamBufferSize);
- _waneSpriteOffset = *((int32 *)_backgroundSurface + 4);
+ _waneSpriteOffset = FROM_LE_32(*((int32 *)_backgroundSurface + 4));
_waneSpriteOffset += 16;
_waneSpriteOffset &= 0xFFFFFFF0;
_streamBufferSize -= _waneSpriteOffset;
@@ -902,7 +905,7 @@ void NISManager::processNIS(NisEvents *event) {
if ((_flags & kNisFlagSoundInitialized) == 0) {
_flags |= kNisFlagSoundInitialized;
- _currentNISSound->setBlockCount(*((uint16 *)_currentNISSound->getDataStart() + 2) - 1);
+ _currentNISSound->setBlockCount(FROM_LE_16(*((uint16 *)_currentNISSound->getDataStart() + 2) - 1));
_currentNISSound->setSize(0x16000);
}
More information about the Scummvm-git-logs
mailing list