Asking author about, he says that yeah, big-endian wasn't consider so it is.
I tried to replace in that WAP_LoadRezArchive, that part:
// Read rez file version
FileRead(&(rezArchive->version), fileStream, 127);
// Read rez payload offset (offset of first directory)
FileRead(&(rezArchive->rootDirectory->offset), fileStream, 131);
//
FileRead(&(rezArchive->rootDirectory->size), fileStream, 135);
On that one:
// Read rez file version
FileRead(&(rezArchive->version), fileStream, 127);
rezArchive->version = SDL_SwapLE32(rezArchive->version);
// Read rez payload offset (offset of first directory)
FileRead(&(rezArchive->rootDirectory->offset), fileStream, 131);
rezArchive->rootDirectory->offset = SDL_SwapLE32(rezArchive->rootDirectory->offset);
//
FileRead(&(rezArchive->rootDirectory->size), fileStream, 135);
rezArchive->rootDirectory->size = SDL_SwapLE32(rezArchive->rootDirectory->size);
But it only make it freezes. Probabaly that 127 bytes header need adjustements as well as some other stuff.
Authour through say, that probably what would solve this would be making FileRead and all other reading generics to be endian agnostic. But he don't have any device which has big endian, so there would be no way for him to test it at the moment :(
In other words, someone should help there with big-endian fixes, anyone ?:)
At moment i only find one generic reading function:
template<typename T>
static void FileRead(T* dest, std::ifstream* file, int32_t offset)
{
file->seekg(offset, std::ios::beg);
file->read((char*)dest, sizeof(*dest));
}
Not sure how to make it endian agnostic, so help need it.