This commit is contained in:
2024-10-11 01:52:10 -04:00
parent 823a8f79d3
commit a663e45131
7 changed files with 96 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
// "Squashes" two dimensional coordinates onto the one dimensional screen buffer
draw :: (using screen: *Screen, p: Vec2s64, char: u8 = DEFAULT_PIXEL_CHAR) {
if p.x >= 0 && p.x < width && p.y >= 0 && p.y < height {
buffer[p.y * width + p.x] = cast(u8)char;
buffer[p.y * width + p.x] = char;
}
}