OpenMW 0.33.0
- EmperorArthur
- Posts: 33
- Joined: 17 May 2014, 07:52
Re: OpenMW 0.33.0
I'll have to see if there's a way for the compiler to tell if it's compiling for a big endian architecture or not. I suspect there is, but haven't looked. If there is, it should be pretty easy to make the changes needed to read nif files on a big endian machine.
Re: OpenMW 0.33.0
There was some work my dougmencken on endian-awareness quite a while ago. I think he had it in a sort-of working state. You might want to check out his fork to see where it's at.
Edit: soft-of -> sort-of
Edit: soft-of -> sort-of
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: OpenMW 0.33.0
On my other project, WildMIDI, we use Cmake to do Endianess testing and set a define in a common header file.
Re: OpenMW 0.33.0
I think most compilers have certain macros predefined to specify which endian the target system is. I also know for certain that Ogre defines some macros for it.
Re: OpenMW 0.33.0
The cmake approach seems sensible. I'd prefer not to drag in Ogre headers everywhere. They are pretty bloated with other compiler-specific stuff (noticed that the other week when I ran cppcheck and it took hours with testing all the code paths enabled).