-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.h
62 lines (50 loc) · 1.12 KB
/
archive.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
#ifndef ARCHIVE_H
#define ARCHIVE_H
#include <stdint.h>
#include <stdio.h>
typedef struct biik_archive_entry {
uint32_t entry_size;
uint32_t offset;
char *name;
uint32_t type;
uint32_t size;
uint32_t header_size;
char *name2;
} biik_archive_entry;
enum {
ENTRY_TYPE_GRAPHIC = 1,
ENTRY_TYPE_TRACKER = 2,
ENTRY_TYPE_SCRIPT = 9,
ENTRY_TYPE_DRAW = 11,
ENTRY_TYPE_COORDS = 15
};
typedef struct biik_archive_header {
char signature[8];
uint32_t size;
uint32_t version;
uint32_t game_id;
uint32_t index_offset;
uint32_t unknown;
uint32_t index_size;
uint32_t index_header_size;
char *index_title;
int entry_count;
biik_archive_entry **entries;
} biik_archive_header;
enum {
GAME_ID_DINODEMO = 1,
GAME_ID_MOUSE = 3,
GAME_ID_FLOSSY = 5,
GAME_ID_DINOSAUR = 6,
GAME_ID_BETSI = 8,
GAME_ID_GUARDIANS = 13,
GAME_ID_PATCH = 17,
GAME_ID_FIFI = 18,
GAME_ID_DARRYL = 255
};
const char *get_game_name(uint32_t id);
const char *get_type_name(uint32_t id);
int entry_to_file_type(uint32_t type);
biik_archive_header *read_archive_header(FILE *archive);
void free_archive_header(biik_archive_header *header);
#endif