Created
January 30, 2022 01:08
-
-
Save spotlightishere/b77b2ba85c9323f8f89f212333cea55b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meta: | |
id: icondatapack | |
file-extension: icondatapack | |
endian: le | |
seq: | |
- id: magic | |
type: strz | |
size: 16 | |
encoding: ASCII | |
doc: | | |
Appears to be "ICONDATAPACK", "ICONMAPPACK", | |
or "ICONCONFIGPACK". | |
- id: spacing | |
size: 0x30 | |
doc: | | |
grl::codec::ResourcePack::decodeHeader | |
appears to always read to 0x40 in. | |
- id: chapter_amount | |
type: u2 | |
doc: | | |
Observed to be 3 within an `icondatapack`, representing | |
three "chapters" within the header. | |
`iconconfigpack`s appear to have 4. | |
- id: chapters | |
type: chapter_info | |
repeat: expr | |
repeat-expr: chapter_amount | |
doc: | | |
Immediately follows the header. | |
types: | |
chapter_info: | |
doc: Only appears in the header. | |
seq: | |
- id: chapter_type | |
type: u2 | |
doc: | | |
Seemingly always 0x1 to 0xf. | |
- id: chapter_offset | |
type: u8 | |
doc: | | |
Offset in the file from 0. | |
instances: | |
chapter_data: | |
pos: chapter_offset | |
type: | |
switch-on: chapter_type | |
cases: | |
0x1: unk_1 | |
0xd: unk_d | |
0xe: atlas | |
unk_1: | |
seq: | |
- id: full_chapter_length | |
type: u8 | |
- id: compressed_length | |
type: u8 | |
- id: compressed_data | |
size: compressed_length | |
unk_d: | |
seq: | |
- id: full_chapter_length | |
type: u8 | |
- id: compressed_length | |
type: u8 | |
- id: compressed_data | |
size: compressed_length | |
atlas: | |
seq: | |
- id: full_chapter_length | |
type: u8 | |
- id: compressed_length | |
contents: [0, 0, 0, 0, 0, 0, 0, 0] | |
doc: | | |
Asserted to always be zero. | |
- id: image_count | |
type: u2 | |
- id: probably_padding | |
contents: [0, 0] | |
doc: | | |
Never observed to be anything else. | |
- id: images | |
repeat: expr | |
repeat-expr: image_count | |
type: image_data | |
doc: | | |
The name Atlas was derived from an assertion message | |
stating it cannot be compressed. | |
image_data: | |
seq: | |
- id: image_length | |
type: u4 | |
- id: data | |
size: image_length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment