Tree[d]

Miscellaneous Forums/Content Creation Tools/Tree[d]

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The first two bytes in the file are the first chunk id.

That would be the ID of this chunk:
GLS_HEADER

The chunk follows those two bytes, and if you look at how the chunk says it's data is set up, it should be obvious how big the chunk is. The chunk may vary in size, but there will be bytes within the chunk that tell you how big each part of the chunk is.

Once you read all the bytes in the chunk you are at the next chunk ID. Read those two bytes in and then read in the chunk data as that particular style of chunk specifies.