simplified write_cell_fb interface logic for drivers by removing u16 cell parameter
This commit is contained in:
parent
02e6b3f7b6
commit
6f25710ca9
@ -10,19 +10,19 @@
|
||||
|
||||
// State trackers from header
|
||||
static u8* Frame_Buffer = (u8*)FRAME_BUFFER_ADDR;
|
||||
s32 Frame_Buffer_Cursor = 0;
|
||||
s32 Frame_Buffer_Cursor = 0x0000;
|
||||
|
||||
// Writes character to a given cell in the framebuffer
|
||||
// @cell parameter is the logical (linear)index into the buffer
|
||||
void write_cell_fb(u16 cell, u8 c, u8 fg, u8 bg) {
|
||||
Frame_Buffer[cell] = c;
|
||||
Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f);
|
||||
Frame_Buffer_Cursor++;
|
||||
void write_cell_fb(u8 c, u8 fg, u8 bg) {
|
||||
Frame_Buffer[Frame_Buffer_Cursor] = c;
|
||||
Frame_Buffer[Frame_Buffer_Cursor+1] = (fg & 0x0f << 4) | (bg & 0x0f);
|
||||
Frame_Buffer_Cursor += 2;
|
||||
}
|
||||
|
||||
void clear_fb(void) {
|
||||
for(unsigned cell=0;cell<AREA; cell+=2) {
|
||||
write_cell_fb(cell, ' ', 0x00, 0x00);
|
||||
write_cell_fb(' ', 0x00, 0x00);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
extern s32 Frame_Buffer_Cursor;
|
||||
|
||||
void write_cell_fb(u16, u8, u8, u8);
|
||||
void write_cell_fb(u8, u8, u8);
|
||||
|
||||
void clear_fb(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user