Page 15 of 15

Re: OpenMW 0.33.0

Posted: 13 Nov 2014, 13:00
by EmperorArthur
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

Posted: 13 Nov 2014, 13:11
by scrawl
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 :D

Re: OpenMW 0.33.0

Posted: 13 Nov 2014, 14:02
by psi29a
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

Posted: 13 Nov 2014, 14:44
by Chris
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

Posted: 13 Nov 2014, 14:47
by scrawl
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).