-
Notifications
You must be signed in to change notification settings - Fork 23
/
ImageHeader.h
43 lines (37 loc) · 1.04 KB
/
ImageHeader.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
#pragma once
#define IMAGETYPEENCODE(x) (x[0] + (x[1] << 8) + (x[2] << 16) + (x[3] << 24))
typedef DWORD IMAGETYPE;
struct ImageHeader
{
// The Dolphin version which wrote the image
union
{
struct
{
DWORD versionMS; // Win32 most significant version number
DWORD versionLS; // Win32 least significant version number
};
struct
{
WORD versionML;
WORD versionMH;
WORD versionLL;
WORD versionLH;
};
};
struct
{
DWORD bIsCompressed : 1; // Whether or not this image has been compressed when saved
} flags;
DWORD nTableSize; // Number of object table entries written
DWORD nGlobalPointers; // Number of "global" pointers
LPVOID BasePointer; // Base address of OT when saved (used to fixup)
DWORD nNextIdHash; // The next identity hash value when image was saved
DWORD nMaxTableSize; // The maximum size of OT table required by this image
bool HasSingleByteNullTerms() const { return versionLH < 54; }
};
struct ISTImageHeader
{
IMAGETYPE imageType; // Should be "IST"
ImageHeader header;
};