Last active
May 14, 2017 16:41
-
-
Save kolen/55e0985126b67bbfcad2acf2f3f13918 to your computer and use it in GitHub Desktop.
File format for katai (katai.io)
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: magic_and_mayhem_spr | |
application: Magic & Mayhem | |
file-extension: spr | |
endian: le | |
seq: | |
- id: header | |
type: header | |
- id: pallettes | |
size: 256 * 3 | |
repeat: expr | |
repeat-expr: header.num_pallettes | |
- id: frames | |
size-eos: true | |
type: frames | |
types: | |
header: | |
seq: | |
- id: magic | |
contents: "SPR\0" | |
- id: size | |
type: s4 | |
- id: spr_type | |
type: u4 | |
enum: spr_type | |
- id: num_frames | |
type: u4 | |
- id: num_pallettes | |
type: u4 | |
- id: unknown_2 | |
type: u4 | |
frames: | |
seq: | |
- id: frame_offsets | |
type: frame_entry | |
repeat: expr | |
repeat-expr: _root.header.num_frames | |
instances: | |
frame_offsets_size: | |
value: 4 * _root.header.num_frames | |
frame: | |
seq: | |
- id: size | |
type: u4 | |
- id: width | |
type: u4 | |
- id: height | |
type: u4 | |
- id: center_x | |
type: s4 | |
- id: center_y | |
type: s4 | |
- id: name | |
type: str | |
encoding: ascii | |
size: 8 | |
- id: pallette_id | |
type: u4 | |
- id: unknown_1 | |
type: u4 | |
- id: unknown_2 | |
type: u4 | |
- id: pixels | |
type: pixels | |
size: size | |
pixels: | |
seq: | |
- id: lines | |
type: line | |
repeat: expr | |
repeat-expr: _parent.height | |
line: | |
seq: | |
- id: offset_deltas | |
type: u4 | |
- id: offset_pixels | |
type: u4 | |
instances: | |
deltas: | |
size-eos: true | |
pos: offset_deltas | |
pixels: | |
size-eos: true | |
pos: offset_pixels | |
frame_entry: | |
seq: | |
- id: offset | |
type: u4 | |
instances: | |
sprite: | |
pos: offset + _parent.frame_offsets_size | |
type: frame | |
enums: | |
spr_type: | |
0x4: standard # all creatures and tilesets | |
0x2: special # interf64.spr LOGO.spr magico64.spr magico80.spr | |
# overlay.spr scanner.spr Scrollbutt.spr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment