diff options
author | Robert Göffringmann | 2003-07-07 02:54:59 +0000 |
---|---|---|
committer | Robert Göffringmann | 2003-07-07 02:54:59 +0000 |
commit | 2a334f176c0ecba48a44b6d66b6fa70591e152fb (patch) | |
tree | a2c193a76afa8a03916fcee8c2611aa58be7a636 /sky | |
parent | 001e7bb7174e1f12958a2ca34831ecd1592e2678 (diff) | |
download | scummvm-rg350-2a334f176c0ecba48a44b6d66b6fa70591e152fb.tar.gz scummvm-rg350-2a334f176c0ecba48a44b6d66b6fa70591e152fb.tar.bz2 scummvm-rg350-2a334f176c0ecba48a44b6d66b6fa70591e152fb.zip |
fixed M$VC++ warnings in text.cpp and added code to disk.cpp which may or may not fix graphics problems in hobbins' room on big endian systems (can't test that).
svn-id: r8830
Diffstat (limited to 'sky')
-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; |