Results 1 to 2 of 2

Thread: File saving and endianness

  1. #1

    Default File saving and endianness

    Hello!

    I was wondering, if I were to save a VariantDB to disk on Windows, then have it stored with the game files to be loaded on an ARM platform, would I run into issues with byte order differences? Looking through the code, it looks like it's just using fread and fwrite, so I'd imagine that it's not taking the byte order into account. Are there some utility functions to deal with this? If not, I was thinking of adding something to rtpack, like a launch parameter -arm_build, that will take files with a certain file extension and swap bytes around before writing them to the bin directory.

    Let me know if I'm on the right track or if I've completely missed something.

    -Christoph


    Edit:

    To answer my question, yes, I did miss something painfully obvious: both x86 and mobile ARM devices are little endian. I guess I was thinking of PowerPC, which is not really worth supporting anymore. I'll just leave this thread here for future devs who are worrying about byte order on other devices.

    That makes things significantly easier.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,354

    Default

    Yep exactly right - as far as I know there are no "important" (for lack of a better word) platforms that are big endian right now. If someone else knows differently, chime in!
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Segfault when saving xml
    By Ockonal in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 12-16-2010, 11:46 PM
  2. CL_CollisionOutline - saving in file and loading
    By Unfixab1e in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 07-03-2010, 11:09 AM
  3. Issues with saving collisions...
    By speeder in forum Novashell Game Creation System
    Replies: 0
    Last Post: 05-09-2010, 04:30 AM
  4. pillbugs and saving
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 05-01-2005, 10:51 PM
  5. saving game
    By lowec in forum Dink Smallwood HD
    Replies: 1
    Last Post: 01-09-2005, 12:25 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •