3 ms·
... but then you don't have a "zero load time file format", at least on systems that have different endianness than the file was generated. (At least, unless yo
by saurik 15y ago
... but then you don't have a "zero load time file format", at least on systems that have different endianness than the file was generated. (At least, unless you are willing to have the entire program not assume the endianness of its own internal data structures, which would be kind of insane.)
- palish 15y agoIn the gamedev world, typically little endian is "the fast one", and big endian is where conversion is required. (This is merely because Windows is the dominant gamedev platform.)
- JoachimSchipper 15y agoJust abstract it away: #define NRELATEDWORDS(data, idx) (ntohl(*(uint32_t *) &(data)[idx])