-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathWallopFileNotes.txt
More file actions
40 lines (32 loc) · 1.45 KB
/
WallopFileNotes.txt
File metadata and controls
40 lines (32 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Basic speciication or a wallop file. This file represents a scene.
> May or may not use this moving forward.. Who knows? Probably not though.
HEADER:
First 6 bytes are a string identifier "WALLOP".
Next 2 bytes are for a format-version specifier in the form major.minor.
Different major numbers are incompatible
Different minor numbers are compatible
Next byte represents the length of the header block
Next 4-bytes is an offset from position (0) to (string table start)
Next 4-bytes is an offset from position(0) to (chunk index start)
Next 4-bytes is an offset from position(0) to (payload start)
Next byte is for various flags
bit-1 - Is the payload compressed?
STRING TABLE:
First byte represents the number of strings to expect
Series of strings
CHUNK INDEX:
16-bit unsigned int representing the number of chunks.
Series of chunk infos
STRING:
First byte represents the length of the string block.
Second byte - the length represents the string in 16-bit UTF form.
CHUNK INFO:
First byte is the length of this info block
Second byte is an index into the string table representing this item's tag
Next byte is the chunk type ID
Next 8 bytes are the chunk's start offset from the payload start
Next 8 bytes are the chunk's length, regardless of compression
Next 4 bytes are a hash of the chunk to verify data
PAYLOAD:
Just raw data to be consumed later.
Might be compressed depending on the respective flag in the header.