big endian fix
svn-id: r8912
This commit is contained in:
parent
333ea0e300
commit
226543582e
1 changed files with 5 additions and 8 deletions
11
sky/disk.cpp
11
sky/disk.cpp
|
@ -178,16 +178,13 @@ uint8 *SkyDisk::loadFile(uint16 fileNr, uint8 *dest) {
|
|||
else {
|
||||
#ifdef SCUMM_BIG_ENDIAN
|
||||
// Convert dataFileHeader to BE (it only consists of 16 bit words)
|
||||
for (uint i = 0; i < sizeof(struct dataFileHeader); i+=2) {
|
||||
*(uint16 *)outputPtr = READ_LE_UINT16(inputPtr);
|
||||
inputPtr += 2;
|
||||
outputPtr += 2;
|
||||
}
|
||||
#else
|
||||
uint16 *headPtr = (uint16 *)_fileDest;
|
||||
for (uint i = 0; i < sizeof(struct dataFileHeader) / 2; i++)
|
||||
*(headPtr + i) = READ_LE_UINT16(headPtr + i);
|
||||
#endif
|
||||
memcpy(outputPtr, inputPtr, sizeof(struct dataFileHeader));
|
||||
inputPtr += sizeof(struct dataFileHeader);
|
||||
outputPtr += sizeof(struct dataFileHeader);
|
||||
#endif
|
||||
}
|
||||
|
||||
RncDecoder rncDecoder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue