lcd.h
 1  
 2  
 3  #ifndef __LCD_H__
 4  #define __LCD_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  	byte buf[256];
20  	un16 pal2[64];
21  	byte pri[256];
22  	struct vissprite vs[16];
23  	int ns, l, x, y, s, t, u, v, wx, wy, wt, wv;
24  };
25  
26  struct obj
27  {
28  	byte y;
29  	byte x;
30  	byte pat;
31  	byte flags;
32  };
33  
34  struct lcd
35  {
36  	byte vbank[2][8192];
37  	union
38  	{
39  		byte mem[256];
40  		struct obj obj[40];
41  	} oam;
42  	byte pal[128];
43  };
44  
45  extern struct lcd lcd;
46  extern struct scan scan;
47  
48  
49  extern void lcd_reset();
50  extern void lcd_begin();
51  
52  
53  
54  #endif
55  
56  
57