summaryrefslogtreecommitdiffhomepage
path: root/View.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'View.cpp')
-rw-r--r--View.cpp11
1 files changed, 9 insertions, 2 deletions
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> 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> 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) {