twn_lines.c: introduction with proper impl

This commit is contained in:
veclavtalica
2025-02-28 23:50:12 +03:00
parent 844283c2fb
commit e47b761a2c
8 changed files with 124 additions and 50 deletions

View File

@ -121,6 +121,8 @@ void game_tick(void) {
if (input_action_pressed("down") && state->r > 2)
state->r -= 1;
draw_circle(mouse_snap, state->r * 8, (Color){125, 125, 125, 125});
int32_t const rsi = (int32_t)state->r * (int32_t)state->r;
int32_t acc = 1;
for (int32_t iy = (int32_t)state->r - 1; iy >= 0; --iy) {
@ -133,8 +135,6 @@ void game_tick(void) {
}
}
draw_circle(mouse_snap, state->r * 8, (Color){125, 125, 125, 125});
/* uncomment to see performance difference between variants */
// benchmark(state);
}