-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathann.hexpat
More file actions
90 lines (77 loc) · 1.55 KB
/
ann.hexpat
File metadata and controls
90 lines (77 loc) · 1.55 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import std.core;
enum CompressionType : u16 {
none=0,
clzw=2,
clzw_in_crle=3,
crle=4
};
struct Header {
u32 magic;
u16 framesCount;
u16 bpp;
u16 eventsCount;
u8 someName[0xd];
u32 fps;
u32 flags;
u8 transparency; // not verified
u16 randomFramesNumber;
padding[0xa];
u32 authorLen;
char author[authorLen];
u32 descriptionLen;
char description[descriptionLen];
};
struct Frame {
padding[4];
padding[4];
s16 positionX;
s16 positionY;
padding[4];
// not correct, there is more here (flags?)
u32 hasSounds;
padding[4];
u8 transparency; // not verified
padding[5];
u32 nameLen;
char name[nameLen];
if (hasSounds != 0) {
u32 sfxSize;
char sounds[sfxSize];
}
};
struct Event {
char name[0x20];
u16 framesCount;
padding[6];
u32 loopNumber;
padding[2];
u32 fps;
u32 flags;
u8 transparency;
padding[0xc];
u16 framesIds[framesCount];
Frame frames[framesCount];
};
struct ANNImage {
u16 width;
u16 height;
u16 positionX;
u16 positionY;
CompressionType compression;
u32 imageLen;
padding[4];
padding[0xa];
u32 alphaLen;
char name[0x14];
};
struct ImageDataPair {
u8 colorData[parent.annImages[std::core::array_index()].imageLen];
u8 alphaData[parent.annImages[std::core::array_index()].alphaLen];
};
struct ANNFile {
Header header;
Event events[header.eventsCount];
ANNImage annImages[header.framesCount];
ImageDataPair images[header.framesCount];
};
ANNFile animo @ 0x00;