Add Bocfel interpreter
[projects/chimara/chimara.git] / interpreters / bocfel / blorb.h
1 #ifndef ZTERP_BLORB_H
2 #define ZTERP_BLORB_H
3
4 #include <stdint.h>
5 #include <stddef.h>
6
7 #include "io.h"
8
9 #define BLORB_PICT      0x50696374
10 #define BLORB_SND       0x536e6420
11 #define BLORB_EXEC      0x45786563
12
13 typedef struct zterp_blorb zterp_blorb;
14
15 typedef struct
16 {
17   uint32_t usage;
18   int number;
19   uint32_t type;
20   char name[5];
21   uint32_t offset;
22   uint32_t size;
23 } zterp_blorb_chunk;
24
25 zterp_blorb *zterp_blorb_parse(zterp_io *);
26 void zterp_blorb_free(zterp_blorb *);
27 const zterp_blorb_chunk *zterp_blorb_find(zterp_blorb *, uint32_t, int);
28
29 #endif