From d0050227bc983d09a1dc1d3d6ed5b0a32b63a2e9 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 19 Aug 2021 10:35:44 +0200 Subject: [PATCH] Better var name --- drivers/vga.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/vga.c b/drivers/vga.c index 76cf14d..3ea9cf6 100644 --- a/drivers/vga.c +++ b/drivers/vga.c @@ -19,10 +19,10 @@ char* get_vga_charpos_pointer(unsigned int col, unsigned int row) { return (char*)(VIDEO_MEM + 2*((row*80) + col)); } -void writechar(char c, unsigned int col, unsigned int row, int colorcode) { +void writechar(char c, unsigned int col, unsigned int row, int attribute_byte) { char* mem = get_vga_charpos_pointer(col, row); *mem = c; // Write the character - *(mem+1) = colorcode; // Write the colorcode + *(mem+1) = attribute_byte; // Write the attribute_byte } @@ -49,13 +49,13 @@ void set_cursor_pos(unsigned int x, unsigned int y) { cursor_row = y; } -void print(char* str, int colorcode) { +void print(char* str, int attribute_byte) { for( char* c = str; *c != '\0'; c++ ) - writechar(*c, (unsigned int)(c - str) + cursor_col, cursor_row, colorcode); + writechar(*c, (unsigned int)(c - str) + cursor_col, cursor_row, attribute_byte); } -void println(char* str, int colorcode) { - print(str, colorcode); +void println(char* str, int attribute_byte) { + print(str, attribute_byte); cursor_row++; // Increment to next y-pos (newline) }