Big endian fixes
I started working on porting TFE to big endian systems. I focused mostly on loading the original game data, editor-only features were not tested. This should allow TFE to run on various alternate systems, like PS3, XB360, Wii, WiiU, Amiga and its derivatives. To avoid reinventing the wheel I wrapped SDL_endian.h in a header (TFE_System/endian.h), so it can be replaced with custom implementations if necessary.
Great idea! What do you think about calling the functions "readLE32()" or similar (or le32_to_cpu() like Linux kernel uses), to indicate to the casual code reader that the attempt is to read 32-bit little-endian formatted data into host cpu endianness?
The name readLE32 implies some kind of I/O for me, also these functions are used for saving too, e.g. for DARKPILO.CFG. I didn't put much tought into the naming convention though, just copied what they are called in SDL2, so le32_to_cpu and co are fine by me. I'll look up how they are named in the linux kernel and replace them here.
I renamed the functions and rebased the PR. The float variants had no Linux kernel equivalents, so I took some liberties there. Let me know what you think.
I compared the disassembly in a few places and at least on x86 all your changes are simply optimized away by the compiler, so good job :) What system did you test this on? Are the saves of BE and LE compatible?
I'm working on a custom Amiga port, TFE's own formats are currently not endian swapped, but I can add it there as well.
Just rebased this to the latest head. Let me know if there's anything else I should change/add before it can be merged.