Added stuff for changing colors

This commit is contained in:
Gitea 2021-01-06 15:28:36 -06:00
parent 125a613de1
commit 12fbfa0de9
2 changed files with 20 additions and 2 deletions

View File

@ -43,8 +43,8 @@ void term_scroll(void) {
}
}
void term_setcolor(uint8_t color) {
term_color = color;
void term_setcolor(uint8_t fg, uint8_t bg) {
term_color = vga_entry_color(fg, bg);
}
void term_putentryat(unsigned char c, uint8_t color, size_t x, size_t y) {

View File

@ -3,9 +3,27 @@
#include <stddef.h>
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define GREY 8
#define LGREY 7
#define LBLUE 9
#define LGREEN 10
#define LCYAN 11
#define LRED 12
#define LMAGENTA 13
#define LBROWN 14
#define WHITE 15
void term_init(void);
void term_scroll(void);
void term_putc(char c);
void term_setcolor(uint8_t, uint8_t);
void term_write(const char* str, size_t size);
void term_writestr(const char* str);