Skip to content

Instantly share code, notes, and snippets.

@joepie91
Last active October 7, 2022 23:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joepie91/f4fa61f7478642a3dcd944d585eddb72 to your computer and use it in GitHub Desktop.
Save joepie91/f4fa61f7478642a3dcd944d585eddb72 to your computer and use it in GitHub Desktop.
Format of the engine.package / game.package file for Foundation
FORMAT DOCUMENTATION
====================
All numeric values are in little-endian.
Overall division:
[file header] [index] [data section]
12 bytes variable length variable length
File header:
[data section offset] [?? unknown] [?? unknown]
4 bytes 4 bytes 4 bytes
Index (starts at 0xC, ends at [data section offset] exclusive):
array of:
[filename length] [filename] [is directory] [... variable header]
4 bytes variable length 1 byte (boolean) 8 bytes
Variable header for directory:
[item count] [ends at offset]
4 bytes 4 bytes
Variable header for file:
[start offset] [data length]
4 bytes 4 bytes
NOTE: The [start offset] is relative to the [data section offset]!
Data section is purely non-delimited data, accessible by byte offset from the index.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment