Clean up
This commit is contained in:
parent
0d4d3e9212
commit
27673079fa
10
src/main.zig
10
src/main.zig
|
@ -81,7 +81,12 @@ pub fn main() !void {
|
||||||
}
|
}
|
||||||
defer c.TTF_Quit();
|
defer c.TTF_Quit();
|
||||||
|
|
||||||
const text_color: c.SDL_Color = c.SDL_Color{ .r = 0, .g = 0, .b = 0, .a = 255 };
|
const text_color: c.SDL_Color = c.SDL_Color{
|
||||||
|
.r = 0,
|
||||||
|
.g = 0,
|
||||||
|
.b = 0,
|
||||||
|
.a = 255
|
||||||
|
};
|
||||||
|
|
||||||
// TODO: can we embed this file?
|
// TODO: can we embed this file?
|
||||||
const font: ?*c.TTF_Font = c.TTF_OpenFont("FreeSans.ttf", 12);
|
const font: ?*c.TTF_Font = c.TTF_OpenFont("FreeSans.ttf", 12);
|
||||||
|
@ -205,8 +210,6 @@ pub fn main() !void {
|
||||||
return error.SDLInitializationFailed;
|
return error.SDLInitializationFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const surface = c.SDL_GetWindowSurface(screen);
|
|
||||||
|
|
||||||
var quit = false;
|
var quit = false;
|
||||||
while (!quit) {
|
while (!quit) {
|
||||||
var event: c.SDL_Event = undefined;
|
var event: c.SDL_Event = undefined;
|
||||||
|
@ -268,7 +271,6 @@ pub fn main() !void {
|
||||||
if (y > window_height) {
|
if (y > window_height) {
|
||||||
y = 0;
|
y = 0;
|
||||||
column += 1;
|
column += 1;
|
||||||
// std.debug.print("Column: {any}, x: {any}\n", .{column, column*column_width});
|
|
||||||
}
|
}
|
||||||
x = column * column_width + (column + 1) * buffer;
|
x = column * column_width + (column + 1) * buffer;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user