Minor code clean up, and added some convenience to the draw_string function.

This commit is contained in:
2020-08-06 17:00:05 -05:00
parent 9fe73abe53
commit db1a68188f
5 changed files with 35 additions and 39 deletions
+4 -1
View File
@@ -46,6 +46,8 @@ void print_banner(){
}
}
}
cursor_y = 3;
}
//index = (y_value * width_of_screen) + x_value;
void draw_rect(int start_x, int start_y, int end_x, int end_y, unsigned char fg, unsigned char bg){
@@ -74,13 +76,14 @@ void draw_string(char* string, unsigned char fg, unsigned char bg)
if(current_char == '\n'){
cursor_y++;
cursor_x = 0;
continue;
}
*where = string[i] | attr << 8;
}
cursor_x = cursor_x + length + 1;
if(cursor_x != 0) cursor_x = cursor_x + length + 1;
}
void set_cursor(unsigned char x, unsigned char y){