From 8ad11975221b1448865400cab14a1560b71c6ade Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 7 May 2022 23:51:13 +0200 Subject: Added support for sample dump loading --- View.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'View.cpp') diff --git a/View.cpp b/View.cpp index 90bc542..3aba502 100644 --- a/View.cpp +++ b/View.cpp @@ -13,7 +13,8 @@ View::View(std::unique_ptr source) : m_camera {}, m_source {std::move(source)}, - m_projected {} + m_projected {}, + m_grid {0} { m_camera.position = Vector3{10.0f, 10.0f, 10.0f}; m_camera.target = Vector3{0.0f, 0.0f, 0.0f}; @@ -27,10 +28,16 @@ View::View(std::unique_ptr source) : void View::update(const float dt) { + const auto grids = m_source->grids(); + if (IsKeyPressed(KEY_SPACE)) { + m_grid++; + if (m_grid >= grids.size()) + m_grid = 0; + } UpdateCamera(&m_camera); const int height = GetScreenHeight(); const int width = GetScreenWidth(); - const auto killmails = m_source->all(); + const auto killmails = grids.at(m_grid).killmails; m_projected.clear(); m_projected.reserve(killmails.size()); for (const auto& km : killmails) { -- cgit v1.1