Added red mark at end of long line

This commit is contained in:
Nathan McRae 2025-01-14 20:42:52 -08:00
parent e87ca40870
commit 2349c13b67

View File

@ -110,6 +110,32 @@ pub fn main() !void {
c.SDL_Log("Unable to draw point: %d", draw_result); c.SDL_Log("Unable to draw point: %d", draw_result);
return error.SDLDrawingFailed; return error.SDLDrawingFailed;
} }
} else {
const red_color_result = c.SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
if (red_color_result != 0) {
c.SDL_Log("Unable to set draw color: %d", red_color_result);
return error.SDLInitializationFailed;
}
const draw_result = c.SDL_RenderDrawPoint(renderer, (column + 1) * column_width - 1, y);
if (draw_result != 0) {
c.SDL_Log("Unable to draw point: %d", draw_result);
return error.SDLDrawingFailed;
}
if (!color) {
const white_color_result = c.SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
if (white_color_result != 0) {
c.SDL_Log("Unable to set draw color: %d", white_color_result);
return error.SDLInitializationFailed;
}
} else {
const black_color_result = c.SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
if (black_color_result != 0) {
c.SDL_Log("Unable to set draw color: %d", black_color_result);
return error.SDLInitializationFailed;
}
}
} }
x += 1; x += 1;