diff options
Diffstat (limited to 'apps/plugins/rockboy/lcd-gb.h')
-rw-r--r-- | apps/plugins/rockboy/lcd-gb.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/lcd-gb.h b/apps/plugins/rockboy/lcd-gb.h new file mode 100644 index 0000000000..3a612887e5 --- /dev/null +++ b/apps/plugins/rockboy/lcd-gb.h | |||
@@ -0,0 +1,76 @@ | |||
1 | |||
2 | |||
3 | #ifndef __LCD_GB_H__ | ||
4 | #define __LCD_GB_H__ | ||
5 | |||
6 | #include "defs.h" | ||
7 | |||
8 | struct vissprite | ||
9 | { | ||
10 | byte *buf; | ||
11 | int x; | ||
12 | byte pal, pri, pad[6]; | ||
13 | }; | ||
14 | |||
15 | struct scan | ||
16 | { | ||
17 | int bg[64]; | ||
18 | int wnd[64]; | ||
19 | #ifdef GRAYSCALE | ||
20 | byte buf[4][256]; | ||
21 | #else | ||
22 | byte buf[8][256]; | ||
23 | #endif | ||
24 | byte pal1[128]; | ||
25 | un16 pal2[64]; | ||
26 | un32 pal4[64]; | ||
27 | byte pri[256]; | ||
28 | struct vissprite vs[16]; | ||
29 | int ns, l, x, y, s, t, u, v, wx, wy, wt, wv; | ||
30 | }; | ||
31 | |||
32 | struct obj | ||
33 | { | ||
34 | byte y; | ||
35 | byte x; | ||
36 | byte pat; | ||
37 | byte flags; | ||
38 | }; | ||
39 | |||
40 | struct lcd | ||
41 | { | ||
42 | byte vbank[2][8192]; | ||
43 | union | ||
44 | { | ||
45 | byte mem[256]; | ||
46 | struct obj obj[40]; | ||
47 | } oam; | ||
48 | byte pal[128]; | ||
49 | }; | ||
50 | |||
51 | extern struct lcd lcd; | ||
52 | extern struct scan scan; | ||
53 | |||
54 | |||
55 | void updatepatpix(void) ICODE_ATTR; | ||
56 | void tilebuf(void); | ||
57 | void bg_scan(void); | ||
58 | void wnd_scan(void); | ||
59 | void bg_scan_pri(void); | ||
60 | void wnd_scan_pri(void); | ||
61 | void spr_count(void); | ||
62 | void spr_enum(void); | ||
63 | void spr_scan(void); | ||
64 | void lcd_begin(void); | ||
65 | void lcd_refreshline(void); | ||
66 | void pal_write(int i, byte b); | ||
67 | void pal_write_dmg(int i, int mapnum, byte d); | ||
68 | void vram_write(int a, byte b); | ||
69 | void vram_dirty(void); | ||
70 | void pal_dirty(void); | ||
71 | void lcd_reset(void); | ||
72 | |||
73 | #endif | ||
74 | |||
75 | |||
76 | |||