Compare commits
3 Commits
f48cbafea4
...
49a30e87b8
Author | SHA1 | Date |
---|---|---|
Potter360 | 49a30e87b8 | |
Potter360 | bd4f926a13 | |
Potter360 | 0214642db3 |
2
Makefile
2
Makefile
|
@ -36,6 +36,6 @@ uninstall:
|
|||
rm $(DESTDIR)/local/lib/omega.a
|
||||
rm -r $(DESTDIR)/local/include/omega
|
||||
clean:
|
||||
rm -rf build omega.a
|
||||
rm -rf build
|
||||
|
||||
.PHONY: all compile clean
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#define rgb565(r, g, b) (((r & 0x1F) << 11) | ((g & 0x3F) << 5) | (b & 0x1F))
|
||||
#define C_BLACK rgb565(0,0,0)
|
||||
|
@ -23,7 +25,7 @@ void dupdate(void);
|
|||
// initialize vram with white pixels
|
||||
void dinit(void);
|
||||
void dimage(int x, int y, image_t *image);
|
||||
void dclear(void);
|
||||
void dclear(uint16_t color);
|
||||
void dtext(int x, int y, char *str, uint16_t color);
|
||||
void dprintf(int x, int y, uint16_t color, char *format, ...);
|
||||
void drect(int x1, int y1, int x2, int y2, uint16_t color);
|
||||
|
|
|
@ -39,7 +39,7 @@ ONORETURN void cpu_panic(void)
|
|||
|
||||
while(1)
|
||||
{
|
||||
dclear();
|
||||
dclear(C_WHITE);
|
||||
drect(0,0,DWIDTH,10,C_RED);
|
||||
dprintf(1,1,C_WHITE, "An exception occured !");
|
||||
dprintf(1,20,C_BLACK, "%x : %s", code, name);
|
||||
|
|
|
@ -68,11 +68,11 @@ void dline(int x0, int y0, int x1, int y1, uint16_t color)
|
|||
x=x+1;
|
||||
}
|
||||
}
|
||||
void dclear(void)
|
||||
void dclear(uint16_t color)
|
||||
{
|
||||
for(int i = 0;i<DWIDTH;i++){
|
||||
for(int j=0;j<DHEIGHT;j++){
|
||||
dpixel(i,j,0xffff);
|
||||
dpixel(i,j,color);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue