|
@@ -83,6 +83,10 @@ void draw_console() {
|
|
* x and y are the coordinates, x is collumn number, y row number.
|
|
* x and y are the coordinates, x is collumn number, y row number.
|
|
*/
|
|
*/
|
|
void set_pixel(int x, int y) {
|
|
void set_pixel(int x, int y) {
|
|
|
|
+ //constrain x and y
|
|
|
|
+ x = MAX(MIN(x, 0), COLS - 1);
|
|
|
|
+ y = MAX(MIN(y, 0), ROWS - 1);
|
|
|
|
+
|
|
screen[y] = screen[y] & ~(1<<x) | (1<<x);
|
|
screen[y] = screen[y] & ~(1<<x) | (1<<x);
|
|
}
|
|
}
|
|
|
|
|