-
Notifications
You must be signed in to change notification settings - Fork 4
/
residx_struct.bt
42 lines (35 loc) · 942 Bytes
/
residx_struct.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
/* -*- Mode: C; -*- */
//--------------------------------------
//--- 010 Editor v6.0.3 Binary Template
//
// File: residx_struct.bt
// Author: ufdada
// Revision: 1.0
// Purpose: Resource Index File
//--------------------------------------
local int i;
enum <int16> textType { MBToUni, UniToMB, UNKNOWN, Text, Font };
struct Header {
char magic[4]; // BFRI
int numFiles;
} header;
string getEntryFilename(struct Entry &e) {
local string filename;
filename = ReadString(e.offset + 8);
return filename;
}
string getFilename(struct FileList &fl) {
return fl.filename;
}
void setFilename(struct FileList &fl, string s) {
fl.filename = s;
}
struct Entry {
int fileId;
textType type;
int16 offset;
int unused;
} entry[header.numFiles]<read=getEntryFilename>;
struct FileList {
string filename;
} files[header.numFiles]<optimize=false, read=getFilename, write=setFilename>;