X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=31489c6de7aef91e20c93c1164771260eb251e62;hb=dd8b3145a03ed676b0ae6311c29fc3d68f666b15;hp=2f2239efe1d9c77b03b1bd10e7151a7c0c659a0c;hpb=2025d49798b93180237b6ce62d3ff5d6ee8ebc6e;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 2f2239e..31489c6 100644 --- a/src/world/Simulation.hpp +++ b/src/world/Simulation.hpp @@ -2,6 +2,7 @@ #define BLOBS_WORLD_SIMULATION_HPP_ #include "Set.hpp" +#include "../app/Assets.hpp" #include @@ -18,7 +19,7 @@ class TileType; class Simulation { public: - explicit Simulation(Body &root, const Set &, const Set &); + explicit Simulation(Body &root, app::Assets &); ~Simulation(); Simulation(const Simulation &) = delete; @@ -28,7 +29,7 @@ public: Simulation &operator =(Simulation &&) = delete; public: - void Tick(); + void Tick(double dt); void AddBody(Body &); void AddPlanet(Planet &); @@ -37,8 +38,10 @@ public: Body &Root() noexcept { return root; } const Body &Root() const noexcept { return root; } - const Set &Resources() const noexcept { return resources; } - const Set &TileTypes() const noexcept { return tile_types; } + app::Assets &Assets() noexcept { return assets; } + const app::Assets &Assets() const noexcept { return assets; } + const Set &Resources() const noexcept { return assets.data.resources; } + const Set &TileTypes() const noexcept { return assets.data.tile_types; } const std::set &Bodies() const noexcept { return bodies; } const std::set &Planets() const noexcept { return planets; } @@ -48,8 +51,7 @@ public: private: Body &root; - const Set &resources; - const Set &tile_types; + app::Assets &assets; std::set bodies; std::set planets; std::set suns;