-
Notifications
You must be signed in to change notification settings - Fork 6
/
JPC File Format.txt
67 lines (57 loc) · 2.17 KB
/
JPC File Format.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
63
64
65
66
67
.jpc files are particle lists, they're located in the /res/Particle folder.
Particle list header format (0x20 bytes long):
00,08: "JPAC1-00"
08,02: Number of particles in this particle list.
0A,02: Number of textures in this particle list.
0C,14: Padding, just null bytes.
Following the header are a list of particles:
Particle header format (0x20 bytes long):
00,08: "JEFFjpa1"
08,04: ???
0C,04: Number of sections this particle has.
10,04: Length of this entire particle in bytes (the particle header + all the sections for this particle).
Inaccurate in some rare cases. Not actually read.
14,01: Number of ??? (read by calcKey__14JPABaseEmitter)
15,01: Number of ??? (read by initField__15JPAFieldManager)
16,01: Number of texture IDs listed in the TDB1 section. (Unused?)
17,01: (Maybe padding?)
18,02: ID number of this particle.
1A,06: Padding, just null bytes.
After each particle header are a number of particle sections:
Particle section format:
00,04: Magic bytes identifying the type of this section.
04,04: Length of this section in bytes.
(The rest varies depending on the type of the section.)
Particle sections:
* BEM1
* FLD1 (optional) (can have multiple per particle)
* KFA1 (optional) (can have multiple per particle)
* BSP1
* ESP1
* SSP1 (optional)
* ETX1 (optional)
* TDB1
ESP1 (Extra Shape Arc) section format:
0C,04: Bitfield
00000100 - EnableScale
0000C000 - PivotX
00030000 - PivotY
SSP1 (Sweep Shape Arc) section format:
50,1: Texture index.
This is an index in the TDB1's list of texture IDs.
ETX1 (Ex Tex Shape Arc) section format:
2C,01: IndTextureID
This is an index in the TDB1's list of texture IDs.
2D,01: SubTextureID
TDB1 (maybe stands for Texture DataBase?) section format:
0C+: List of texture IDs (halfwords).
The texture ID is an index in the list of TEX1 sections in this JPC file.
The total number of texture IDs here is specified in the particle's header, not in this chunk.
After all of the particles are a list of TEX1 sections which contain the actual image data of the particles.
TEX1 section format:
00,04: "TEX1"
04,04: Length of this section in bytes.
08,04: ???
0C,14: Filename?
20,20: BTI header.
40+: BTI data (image data and maybe palette data).