Object File Format - JayhawkZombie/EECS581Project GitHub Wiki

When encoding and decoding our assets, we must know the file format exactly. Listed here will be the file formats for versions of our cooking formats.

On this page, the type used to store information will be contained between []
[D] means "dependent", such as strings, whose length depends on the length encoded right before the start of the string.

Sections (not actually encoded in the file, it is just to show where custom class data can be inserted) are denoted on new lines (no new lines are actually present in the file) and the class using that section inside {}

V0.1 (incomplete - in progress):
Extension: .sfasset
Order of data:

[std::size_t]<length of ID string> [D]<ItemID string> [std::size_t]<NumKindOfTiles> [std::size_t]<NumTilesWide> [std::size_t]<NumTilesHigh> [std::size_t]<TileSheetHeight> [std::size_t]<TileSheetWidth> [D]<Encoded Tile Sheet Texture>
{Layout}
[std::size_t]<NumTilesInLevel> [D]<Encoded Tiles> [std:size_t]<NumObjectsInLevel> [D]<Encoded Objects>