Minor code clean up, and added some convenience to the draw_string function.
This commit is contained in:
+4
-1
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user