This thread will chronicle the creation of the XWF (eXtensible World File -- good name?) file format.
I believe we've pretty much agreed that the proper way to do this is an atomic structure where every atom either contains data directly or is a container for other atoms, or both. So, the first thing that needs to be decided is the structure of the atom header.
I propose the following:
Code:
struct Atom {
char type[4];
unsigned long children;
unsigned long size;
};
Where `type' is a FourCC (4 character code) representing the type of atom it is, e.g. vertex data, texture, placeable object, etc. `children' is the number of child atoms the current atom contains. `size' is the size in bytes of pure data that follows.
This would then be followed by `size' bytes of pure data and then `children' number of atoms.
I also propose we store all strings in this format: a 2-byte unsigned integer in network order followed by that number of bytes.
Now we need to figure out the FourCCs we will need for the initial version.
Please post your input here.
Happy Hacking,
Lord Daeken M. BlackBlade
(Cody W. Brocious)
Edit #1: Changed children to long from char as per WC's suggestion.
Edit #2: Changed longs to unsigned longs.