Drawing wall splines

This commit is contained in:
Luka Jankovic 2025-06-16 23:44:44 +02:00
parent 09cc69d38d
commit b217a72e6d
4 changed files with 27 additions and 29 deletions

View file

@ -40,11 +40,15 @@ bool kubo_context_add_wall(struct kubo_context *context,
struct kubo_wall *kubo_context_get_pending_wall(struct kubo_context *context) {
if (context->num_walls > 0 &&
(context->walls[context->num_walls - 1]->wall_state == KUBO_WALL_INIT ||
context->walls[context->num_walls - 1]->wall_state ==
KUBO_WALL_STARTED)) {
return context->walls[context->num_walls - 1];
if (context->num_walls > 0) {
switch (context->walls[context->num_walls - 1]->state) {
case KUBO_WALL_INIT:
case KUBO_WALL_DRAWING:
return context->walls[context->num_walls - 1];
break;
default:
break;
}
}
struct kubo_wall *wall = kubo_wall_init();