-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlcd.h
More file actions
63 lines (57 loc) · 1.44 KB
/
Copy pathlcd.h
File metadata and controls
63 lines (57 loc) · 1.44 KB
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
63
struct LCD {
int windowX;
int windowY;
int scrollX;
int scrollY;
int line;
int frame;
int lyCompare;
} LCD;
// LCD Control
struct LCDC {
int lcdDisplay; // 7
int windowTileMap; // 6
int windowDisplay; // 5
int tileDataSelect; // 4
int tileMapSelect; // 3
int spriteSize; // 2
int spriteDisplay; // 1
int bgWindowDisplay; // 0
} LCDC;
// LCD STAT
struct LCDS {
int lyInterrupt;
int oamInterrupt;
int vblankInterrupt;
int hblankInterrupt;
int lyFlag;
int modeFlag;
} LCDS;
struct sprite {
int y;
int x;
int patternNum;
int flags;
} sprite;
void setLCDC(unsigned char address);
void setLCDS(unsigned char address);
void setBGPalette(unsigned char address);
void setSpritePalette1(unsigned char address);
void setSpritePalette2(unsigned char address);
void setScrollX(unsigned char address);
void setScrollY(unsigned char address);
void setWindowX(unsigned char address);
void setWindowY(unsigned char address);
void setLyCompare(unsigned char address);
unsigned char getLCDC(void);
unsigned char getLCDS(void);
unsigned char getScrollX(void);
unsigned char getScrollY(void);
unsigned char getWindowX(void);
unsigned char getWindowY(void);
int getLine(void);
int lcdCycle(int timeStart);
void renderLine(int line);
void drawBgWindow(unsigned int *buf, int line);
void drawSprites(unsigned int *buf, int line, int blocks, struct sprite *sprite);
void draw_stuff(void);