-
Notifications
You must be signed in to change notification settings - Fork 2
/
kkp.h
64 lines (51 loc) · 1.17 KB
/
kkp.h
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
#pragma once
#include <string>
#include <vector>
class KKP
{
public:
static bool isX64;
#pragma pack(push)
#pragma pack(1)
struct KKPFile
{
std::string name;
int size = 0;
float packedSize = 0;
};
struct KKPSymbol
{
std::string name;
int unpackedSize = 0;
double packedSize = 0;
bool isCode = false;
int fileID = 0;
unsigned int sourcePos = 0xffffffff;
double cumulativePackedSize = 0;
int cumulativeUnpackedSize = 0;
int originalSymbolID = -1;
bool selected = false;
bool onHotPath = false; // used to force open the folder view when a symbol is selected
std::vector<KKPSymbol> children;
};
struct KKPByteData
{
unsigned char data = 0;
short symbol = 0;
double packed = 0;
short line = 0;
short file = 0;
};
#pragma pack(pop)
KKPSymbol root;
std::vector<KKPFile> files;
std::vector<KKPByteData> bytes;
std::vector<KKPSymbol> sortableSymbols;
void Load( const std::string& fileName );
void LoadSym( const std::string& fileName );
void AddSymbol( const KKPSymbol& symbol );
void Sort( int sortColumn, bool descending );
};
extern KKP kkp;
void OpenKKP();
void OpenSYM();