Added red mark at end of long line
This commit is contained in:
parent
757a401eee
commit
80de6db167
26
src/main.zig
26
src/main.zig
|
@ -110,6 +110,32 @@ pub fn main() !void {
|
|||
c.SDL_Log("Unable to draw point: %d", draw_result);
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user