This repository has been archived by the owner on Apr 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LGT.bt
99 lines (91 loc) · 1.89 KB
/
LGT.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: LGT.bt
// Authors: Alexandr Evdokimov
// Version: 0.1
// Purpose: Hitman Codename 47 LGT file
//
// History:
//
// 2018.06 v 0.01 initial release
//
//------------------------------------------------
local uint c = 0;
typedef enum <char> {
ABGR,
NLAP
} IDENTIFIER <name="Identifier">;
struct {
char TGL[4] <name="TGL signature">;
UINT MN; // ??
UINT FileSize;
UINT FileCount; // ?
} HEADER <name="File Header">;
typedef struct {
struct {
IDENTIFIER Name[4];
} ID;
if (ID.Name == "ABGR") {
UINT SectionSize;
//FSeek(FTell() + (SectionSize - 8));
struct {
struct {
UINT MN;
UINT16 Width;
UINT16 Height;
UINT MN;
UINT MN;
UINT16 MN;
UINT16 MN;
UINT16 MN;
UINT16 MN;
BYTE A;
} HEADER;
struct {
BYTE A;
BYTE B;
BYTE G;
BYTE R;
} PIXEL[HEADER.Width*HEADER.Height];
} ABGR;
};
if (ID.Name == "NLAP") {
struct {
struct {
UINT SectionSize;
UINT Index;
UINT16 Width;
UINT16 Height;
UINT Count;
UINT MN;
UINT16 MN;
UINT16 MN;
UINT16 MN;
UINT16 MN;
BYTE A;
} HEADER;
typedef struct {
BYTE Index;
} INDEX;
typedef struct (int arraySize) {
INDEX array[arraySize];
} INDEX_ARRAY;
INDEX_ARRAY Indexes(HEADER.Width*HEADER.Height) <name="Indexes">;
UINT Count;
struct {
BYTE A;
BYTE B;
BYTE G;
BYTE R;
} PALETTE[Count];
} NLAP;
};
} FILE <optimize=false, name=fileType>;
typedef struct (int arraySize) {
FILE array[arraySize] <optimize=false>;
} FILE_ARRAY;
FILE_ARRAY Files(HEADER.FileCount) <name="Files">;
string fileType(FILE &file) {
return file.ID.Name;
};