blob: 138367dd5f890fe02cca7e8a7e14d874fdef5edf (
plain)
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
|
#ifndef __MPQ_BIOS_H__
#define __MPQ_BIOS_H__
#include "inttypes.h"
struct mpq_internals_t;
typedef struct {
struct mpq_internals_t * mpq_i;
} mpq_archive_t;
#define MPQ_FLAGS_ISFILE 0x80000000
#define MPQ_FLAGS_HAS_META 0x04000000
#define MPQ_FLAGS_UNIT 0x01000000
#define MPQ_FLAGS_ADJUST 0x00020000
#define MPQ_FLAGS_ENCRYPTED 0x00010000
#define MPQ_FLAGS_COMPRESSED 0x00000200
#define MPQ_FLAGS_IMPLODED 0x00000100
enum mpqlib_ioctl_t {
MPQLIB_IOCTL_NO_ACTION = 0,
MPQLIB_IOCTL_GET_FORMAT_VERSION,
MPQLIB_IOCTL_GET_SECTOR_SIZE,
MPQLIB_IOCTL_GET_BLOCK_OFFSET,
MPQLIB_IOCTL_GET_BLOCK_SIZE,
MPQLIB_IOCTL_GET_FILE_SIZE,
MPQLIB_IOCTL_GET_FLAGS,
};
#ifdef __cplusplus
extern "C" {
#endif
void mpqlib_init();
mpq_archive_t * mpqlib_open_archive(const char * fname);
mpq_archive_t * mpqlib_reopen_archive(int fd);
void mpqlib_printtables(mpq_archive_t *);
void mpqlib_close_archive(mpq_archive_t *);
int mpqlib_find_hash_entry(mpq_archive_t *, const char * name, uint32_t language, uint32_t platform);
uint64_t mpqlib_ioctl(mpq_archive_t *, enum mpqlib_ioctl_t command, int entry);
#ifdef __cplusplus
}
#endif
#endif
|