blob: 8a78a0e928ef0fbaa6efc9d8614261c73920ccfa (
plain) (
blame)
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//===========================================================================//
#define VPKFILENUMBER_EMBEDDED_IN_DIR_FILE 0x7fff // if a chunk refers to this file number, it is data embedded in the same file as the directory block.
#define VPK_HEADER_MARKER 0x55aa1234 // significes that this is a new vpk header format
#define VPK_CURRENT_VERSION 2
#define VPK_PREVIOUS_VERSION 1
struct VPKDirHeader_t
{
int32 m_nHeaderMarker;
int32 m_nVersion;
int32 m_nDirectorySize;
int32 m_nEmbeddedChunkSize;
int32 m_nChunkHashesSize;
int32 m_nSelfHashesSize;
int32 m_nSignatureSize;
VPKDirHeader_t( void )
{
m_nHeaderMarker = VPK_HEADER_MARKER;
m_nVersion = VPK_CURRENT_VERSION;
m_nDirectorySize = 0;
m_nEmbeddedChunkSize = 0;
m_nChunkHashesSize = 0;
m_nSelfHashesSize = 0;
m_nSignatureSize = 0;
}
uint32 ComputeSizeofSignedDataAfterHeader() const
{
return m_nDirectorySize + m_nEmbeddedChunkSize + m_nChunkHashesSize + m_nSelfHashesSize;
}
};
struct VPKDirHeaderOld_t
{
int32 m_nHeaderMarker;
int32 m_nVersion;
int32 m_nDirectorySize;
VPKDirHeaderOld_t( void )
{
m_nHeaderMarker = VPK_HEADER_MARKER;
m_nVersion = VPK_PREVIOUS_VERSION;
m_nDirectorySize = 0;
}
};
#include "vpklib/packedstore.h"
|