-
-
Notifications
You must be signed in to change notification settings - Fork 188
/
swf.hexpat
29 lines (24 loc) · 1.03 KB
/
swf.hexpat
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
#pragma author saturnaliam
#pragma description Shockwave Flash Movie (SWF)
#pragma endian little
import type.magic;
// RECTs are more complicated, but for the header,
// this works fine.
bitfield Rect {
nSize : 5 [[name("N Size")]];
signed xMin : 15 [[name("X Min")]];
signed xMax : 15 [[name("X Max")]];
signed yMin : 15 [[name("Y Min")]];
signed yMax : 15 [[name("Y Max")]];
};
struct Header {
char compressionSignature [[name("Compression"), comment("F - Uncompressed\nC - zlib Compressed\nZ - LZMA compressed")]];
type::Magic<"WS"> signature [[name("Signature")]];
u8 swfVersion [[name("SWF Version")]];
u32 bytesSize [[name("Uncompressed Size")]];
be Rect rect [[name("Frame Size"), comment("Needs to be uncompressed to have the correct value.")]];
padding[1];
u8 frameRate [[name("Framerate"), comment("Needs to be uncompressed to have the correct value.")]];
u16 frameCount [[name("Frame Count"), comment("Needs to be uncompressed to have the correct value.")]];
};
Header header @ 0x00;