-
Notifications
You must be signed in to change notification settings - Fork 0
/
NPCK Header.bt
67 lines (63 loc) · 1.66 KB
/
NPCK Header.bt
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
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File:
// Authors: Silvris
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
//names/alternative names provided by NSA Cloud
#include "Audiokinetics RIFF.bt"
local int i;
typedef struct{
uint ID<bgcolor=0xFF0000>;
uint unkn;
uint Length;
uint Offset<format=hex,bgcolor=0x00FF00>;
uint language;
}embeddedMediaStruct;
typedef struct(uint headerStart){
uint postHeaderOffset;
uint index;
local uint retVal = FTell();
FSeek(headerStart + postHeaderOffset);
wstring value;
FSeek(retVal);
}stringData;
string readStringData(stringData &s){
return s.value;
};
struct stringInfo(uint length){
local uint stringHeaderStart = FTell();
uint stringDataCount;
for(i=0;i<stringDataCount;i++){
stringData stringdata(stringHeaderStart)<read=readStringData>;
};
FSeek(stringHeaderStart + length);
};
char AKPKHeader[4];
uint HeaderLength;//dataOffset
uint unkn2;
uint languageLength;
uint bnkTableLength;//bankIndexLength
uint wemTableLength;//mediaIndexLength
uint unkn6;//unknStructLength, apparently not present in Capcom pcks
stringInfo strings(languageLength);
uint bnkCount;//possible bankIndex value?
embeddedMediaStruct bnks[bnkCount];
uint wemCount;
embeddedMediaStruct wems[wemCount];
uint unknStructCount;//normally 0
if(FileSize() > (HeaderLength+8)){
//blocks "header only" pcks
struct EmbeddedWems{
for(i=0;i<wemCount;i++){
FSeek(wems[i].Offset);
RIFF embeddedAudio;
};
}embeddedWems;
};