Refactoring

This commit is contained in:
Loic Guegan 2021-04-28 15:07:12 +02:00
parent 778e43c0a2
commit 067d6e340b
9 changed files with 45 additions and 37 deletions

View file

@ -7,11 +7,11 @@ FB_CFG fb_cfg;
void framebuffer_init(FB_CFG config){
fb_cfg=config;
PAGING_MAP_RANGE(fb_cfg.location, fb_cfg.pitch*fb_cfg.height);
}
void framebuffer_draw(FB_PIXEL p){
u8 *pixel=(u8*)(fb_cfg.location+p.x*(fb_cfg.depth/8)+p.y*fb_cfg.pitch);
PAGING_MAP(pixel);
pixel[0]=p.r;
pixel[1]=p.g;
pixel[2]=p.b;

View file

@ -38,7 +38,6 @@ void psf_putchar(char c){
u8* glyph=(psf_status.psf_addr+psf_status.header.header_length+c*psf_status.header.glyph_size);
FB_PIXEL pixel;
for(int i=0;i<psf_status.header.glyph_height;i++){
PAGING_MAP(glyph);
for(int k=0;k<(psf_status.header.glyph_width/8);k++){
u8 mask=1<<7;
u8 row=*(glyph+k);