diff options
-rw-r--r-- | sky/disk.cpp | 11 | ||||
-rw-r--r-- | sky/text.cpp | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sky/disk.cpp b/sky/disk.cpp index 4f87166a91..8e91106602 100644 --- a/sky/disk.cpp +++ b/sky/disk.cpp @@ -210,8 +210,17 @@ uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) { if (_fixedDest == NULL) free(_fileDest); - } else + } else { +#ifdef SCUMM_BIG_ENDIAN + if (!cflag) { + warning("patching header for uncompressed file %d", fileNr); + uint16 *headPtr = (uint16 *)_fileDest; + for (uint i = 0; i < sizeof(struct dataFileHeader) / 2; i++) + *(headPtr + i) = READ_LE_UINT16(headPtr + i); + } +#endif return _fileDest; + } return _compDest; } diff --git a/sky/text.cpp b/sky/text.cpp index d5f1e4a3cd..a70a29d24f 100644 --- a/sky/text.cpp +++ b/sky/text.cpp @@ -287,8 +287,8 @@ displayText_t SkyText::displayText(char *textPtr, uint8 *dest, bool centre, uint //make the header ((struct dataFileHeader *)curDest)->s_width = _dtLineWidth; - ((struct dataFileHeader *)curDest)->s_height = _charHeight * _dtLines; - ((struct dataFileHeader *)curDest)->s_sp_size = _dtLineWidth * _charHeight * _dtLines; + ((struct dataFileHeader *)curDest)->s_height = (uint16)(_charHeight * _dtLines); + ((struct dataFileHeader *)curDest)->s_sp_size = (uint16)(_dtLineWidth * _charHeight * _dtLines); ((struct dataFileHeader *)curDest)->s_offset_x = 0; ((struct dataFileHeader *)curDest)->s_offset_y = 0; |