xy_to_mem should be called xy_to_indx
This commit is contained in:
parent
0418a497c7
commit
d2f3b982be
@ -1,6 +1,6 @@
|
||||
#include <grub/text_fb_info.h>
|
||||
#include "../vga.h"
|
||||
#define xy_to_mem(x,y) ((x+(y*height))*2)
|
||||
#define xy_to_indx(x,y) ((x+(y*height))*2)
|
||||
char* screen;
|
||||
int width;
|
||||
int height;
|
||||
@ -8,8 +8,8 @@ vga_colors fg_color;
|
||||
vga_colors bg_color;
|
||||
|
||||
void vga_set_char(int x,int y,char c) {
|
||||
screen[xy_to_mem(x,y)]=c;
|
||||
screen[xy_to_mem(x,y)+1]=(bg_color<<4)|fg_color;
|
||||
screen[xy_to_indx(x,y)]=c;
|
||||
screen[xy_to_indx(x,y)+1]=(bg_color<<4)|fg_color;
|
||||
}
|
||||
|
||||
void vga_init(text_fb_info framebuffer_info) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user