-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMpcFormat.txt
62 lines (56 loc) · 1.24 KB
/
MpcFormat.txt
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
little-endian
ulong -> unsigned long
transparancy color:
RGB
255 240 240
105 146 103
frame count max is 256
pos length description
---file begin---
0 64 bytes MPC File Ver2.0 + null
64(0x40) 4 bytes( ) frames data length(head+data) sum
68(0x44) 4 bytes(long) width(global)
72(0x48) 4 bytes(long) height(global)
76(0x4C) 4 bytes(ulong) fram count
80(0x50) 4 bytes(long) direction
84(0x54) 4 bytes(ulong) colour count
88(0x58) 4 bytes(long) interval(ms/frame)
92(0x5C) 4 bytes(long) bottom
96(0x60) 32 bytes null
128(0x80) 4*(colour count) palette
+^ 4*(fram count) each frame data length
{
1: 0
2:framelen(1) + 1's count
3:framelen(2) + 2's count
4:framelen(3) + 3's count
.
.
.
n-1:framelen(n-2) + (n-3)'s count
n: framelen(n-1) + (n-2)'s count
}
frames data
{
1:
datalength 4bytes
width 4bytes
height 4bytes
null 8bytes
compressed data (datalength-20)bytes
2:
datalength 4bytes
width 4bytes
height 4bytes
null 2bytes
compressed data datalength
.
.
.
n:
width 4bytes
height 4bytes
null 2bytes
compressed data (framelen(n)-10)
}
---file end---