summaryrefslogtreecommitdiff
path: root/kurator/src/Battle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kurator/src/Battle.cpp')
-rw-r--r--kurator/src/Battle.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/kurator/src/Battle.cpp b/kurator/src/Battle.cpp
index 0918e30..9df0b01 100644
--- a/kurator/src/Battle.cpp
+++ b/kurator/src/Battle.cpp
@@ -19,6 +19,7 @@
#include "components.h"
#include "Grid.h"
+#include "lines.h"
#include "markers.h"
#include "Pause.h"
#include "PopupEmitter.h"
@@ -78,7 +79,6 @@ time_controls(const char* id, float& time_factor)
static void progress_timers(sim::State& ctx);
static void move_ui_pops(sim::State& ctx);
static void blink_crosses(sim::State& ctx);
-static void animate_lines(sim::State& ctx);
void
@@ -149,17 +149,7 @@ blink_crosses(sim::State& ctx)
}
-void
-animate_lines(sim::State& ctx)
-{
- auto lines = ctx.registry.view<Line>();
- for (auto&& [entity, line] : lines.each())
- line.position += (1.0 + line.hlength) / line.duration * ctx.clock.dt;
-}
-
-
static void draw_crosses(const sim::State& ctx);
-static void draw_lines(const sim::State& ctx);
static void draw_pops(const sim::State& ctx);
@@ -201,21 +191,6 @@ draw_crosses(const sim::State& ctx)
void
-draw_lines(const sim::State& ctx)
-{
- auto lines = ctx.registry.view<Line>();
- for (const auto& [entity, line] : lines.each()) {
- const auto diff = line.end - line.start;
- const auto fstart = line.position - line.hlength;
- const auto fend = line.position + line.hlength;
- const auto start = ctx.camera.to_screen(line.start + diff.scale(fstart > 0.0 ? fstart : 0.0));
- const auto end = ctx.camera.to_screen(line.start + diff.scale(fend > 1.0 ? 1.0 : fend));
- DrawLine(start.x, start.y, end.x, end.y, line.color);
- }
-}
-
-
-void
draw_pops(const sim::State& ctx)
{
auto pops = ctx.registry.view<CenteredText, sim::Transform, UIOffset>();