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
This commit is contained in:
Robert Göffringmann 2003-07-07 02:54:59 +00:00
parent 001e7bb717
commit 2a334f176c
2 changed files with 12 additions and 3 deletions

View file

@ -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;
}

View file

@ -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;