using write_cell to test color palette
This commit is contained in:
parent
2600868abd
commit
e09e9ffc82
@ -12,21 +12,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
enum typedef Colors{
|
enum typedef Colors{
|
||||||
Black,
|
Black, Blue, Green,
|
||||||
Blue,
|
Cyan, Red, Magenta,
|
||||||
Green,
|
Brown, LightGrey, DarkGrey,
|
||||||
Cyan,
|
LightBlue, LightGreen, LightCyan,
|
||||||
Red,
|
LightRed, LightMagenta, LightBrown,
|
||||||
Magenta,
|
|
||||||
Brown,
|
|
||||||
LightGrey,
|
|
||||||
DarkGrey,
|
|
||||||
LightBlue,
|
|
||||||
LightGreen,
|
|
||||||
LightCyan,
|
|
||||||
LightRed,
|
|
||||||
LightMagenta,
|
|
||||||
LightBrown,
|
|
||||||
White,
|
White,
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
@ -36,17 +26,13 @@ enum typedef Colors{
|
|||||||
static char* Frame_Buffer = (char*)0x000B8000;
|
static char* Frame_Buffer = (char*)0x000B8000;
|
||||||
// Writes character to a given cell in the framebuffer
|
// Writes character to a given cell in the framebuffer
|
||||||
// Safety handled by caller function
|
// Safety handled by caller function
|
||||||
void write_cell(const unsigned cell, const char c, const char fg_bg) {
|
void write_cell(unsigned cell, char c, char fg, char bg) {
|
||||||
Frame_Buffer[cell] = c;
|
Frame_Buffer[cell] = c;
|
||||||
Frame_Buffer[cell+1] = fg_bg;
|
Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void colors() {
|
void colors() {
|
||||||
// finding what the fucking colors are that we can draw
|
for(int i =0;i<0x10;i++) {
|
||||||
unsigned char color = 0x00;
|
write_cell(i, 'a', 8, 8);
|
||||||
for(int i =0;i<0x20;i++) {
|
|
||||||
Frame_Buffer[i] = 'a';
|
|
||||||
Frame_Buffer[i+1] = color;
|
|
||||||
color++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user