0021ef93bdc2e0a77fcdc7c0a993620cfc11c595
[gbajam22] / src / data.h
1 #ifndef DATA_H_
2 #define DATA_H_
3
4 #include <stdint.h>
5 /*#include "data/snd.h"*/
6
7 #define CONV_RGB24_RGB15(r, g, b) \
8         (((r) >> 3) | (((uint16_t)(g) & 0xf8) << 2) | (((uint16_t)(b) & 0xf8) << 7))
9
10 #define VOX_SZ  512
11 #define CMAP_SPAWN0     240
12
13 #define SPRID(x, y)             (SPRID_BASE + ((y) * 4) + (x) / 4)
14
15 enum {
16         SPRID_BASE              = 512,
17         SPRID_UILEFT    = SPRID(0, 0),
18         SPRID_UIMID             = SPRID(16, 0),
19         SPRID_UIRIGHT   = SPRID(32, 0),
20         SPRID_UINUM             = SPRID(48, 0),
21         SPRID_UISLASH   = SPRID(120, 16),
22         SPRID_CROSS             = SPRID(0, 16),
23         SPRID_UITGT             = SPRID(16, 16),
24         SPRID_LEDOFF    = SPRID(32, 16),
25         SPRID_LEDRED    = SPRID(40, 16),
26         SPRID_LEDBLU    = SPRID(48, 16),
27         SPRID_LEDGRN    = SPRID(56, 16),
28         /*SPRID_ENEMY           = SPRID(0, 64)*/
29         SPRID_ENEMY0    = SPRID(0, 32),
30         SPRID_HUSK              = SPRID(112, 64),
31         SPRID_LAS0              = SPRID(0, 64),
32         SPRID_LAS1              = SPRID(32, 64),
33         SPRID_LAS2              = SPRID(64, 64),
34         SPRID_LAS3              = SPRID(0, 96),
35         SPRID_SPARK0    = SPRID(32, 96),
36         SPRID_SHOT0             = SPRID(64, 16),
37         SPRID_SHOT1             = SPRID(80, 16),
38         SPRID_SHOT2             = SPRID(96, 16)
39 };
40
41 /* main game data */
42 extern unsigned char color_pixels[];
43 extern unsigned char color_cmap[];
44 extern unsigned char color_gba_cmap[];
45 extern unsigned char height_pixels[];
46
47 extern unsigned char spr_game_pixels[];
48 extern unsigned char spr_game_cmap[];
49
50 /* menu screen assets */
51 extern unsigned char menuscr_pixels[];
52 extern unsigned char menuscr_cmap[];
53 extern unsigned char menuscr_gba_cmap[];
54 extern unsigned char spr_menu_pixels[];
55 extern unsigned char spr_menu_cmap[];
56
57 /* logo splash assets */
58 extern unsigned char spr_logo_pixels[];
59 extern unsigned char spr_logo_cmap[];
60
61 #endif  /* DATA_H_ */