|
|
@ -44,20 +44,24 @@ void dbg_drawall()
|
|
|
|
for (int i = 0; i < command_i; i++)
|
|
|
|
for (int i = 0; i < command_i; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const float size = 0.05f;
|
|
|
|
const float size = 0.05f;
|
|
|
|
switch(commands[i].type)
|
|
|
|
switch (commands[i].type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case rect:
|
|
|
|
case rect:
|
|
|
|
|
|
|
|
{
|
|
|
|
V2 center = commands[i].center;
|
|
|
|
V2 center = commands[i].center;
|
|
|
|
V2 upper_left = V2add(center, (V2){.x = -size / 2.0f, .y = -size / 2.0f});
|
|
|
|
V2 upper_left = V2add(center, (V2){.x = -size / 2.0f, .y = -size / 2.0f});
|
|
|
|
sgp_draw_filled_rect(upper_left.x, upper_left.y, size, size);
|
|
|
|
sgp_draw_filled_rect(upper_left.x, upper_left.y, size, size);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
case line:
|
|
|
|
case line:
|
|
|
|
|
|
|
|
{
|
|
|
|
V2 from = commands[i].from;
|
|
|
|
V2 from = commands[i].from;
|
|
|
|
V2 to = commands[i].to;
|
|
|
|
V2 to = commands[i].to;
|
|
|
|
sgp_draw_line(from.x, from.y, to.x, to.y);
|
|
|
|
sgp_draw_line(from.x, from.y, to.x, to.y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
command_i = 0;
|
|
|
|
command_i = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|