xy_to_mem should be called xy_to_indx

This commit is contained in:
pjht 2019-02-09 17:22:51 -06:00
parent 0418a497c7
commit d2f3b982be

View File

@ -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) {