forked from rafalh/rf-reversed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvpp_format.h
More file actions
44 lines (34 loc) · 1.07 KB
/
vpp_format.h
File metadata and controls
44 lines (34 loc) · 1.07 KB
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
/*****************************************************************************
*
* PROJECT: Open Faction
* LICENSE: See LICENSE in the top level directory
* FILE: vpp_format.h
* PURPOSE: VPP format documentation
* DEVELOPERS: Rafał Harabień
*
*****************************************************************************/
#ifndef VPP_FORMAT_H_INCLUDED
#define VPP_FORMAT_H_INCLUDED
#include <stdint.h>
#ifdef __BIG_ENDIAN__
#error Big Endian not supported
#endif
#pragma pack(push, 1)
#define VPP_SIGNATURE 0x51890ACE
#define VPP_ALIGNMENT 0x800 /* 2048 */
#define VPP_MAX_FILES 65536
/* Note: all values are in little endian */
typedef struct _vpp_header_t
{
uint32_t signature; /* VPP_SIGNATURE */
uint32_t version; /* 0x00000001 */
int32_t file_count; /* Note: maximum number of files in archive is 65536 */
int32_t archive_size; /* Size of entire VPP */
} vpp_header_t;
typedef struct _vpp_entry_t
{
char file_name[60];
int32_t file_size;
} vpp_entry_t;
#pragma pack(pop)
#endif // VPP_FORMAT_H_INCLUDED