diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-13 17:46:59 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-13 19:25:08 +0000 |
commit | 3acea6d17bee24c2079c0eeb33694c2539debabd (patch) | |
tree | 40f29a051d9306508635231bfd40168abb42d735 | |
parent | Introduce the UI shader (diff) | |
download | ilt-3acea6d17bee24c2079c0eeb33694c2539debabd.tar.bz2 ilt-3acea6d17bee24c2079c0eeb33694c2539debabd.tar.xz ilt-3acea6d17bee24c2079c0eeb33694c2539debabd.zip |
Move TickDuration to its own files
-rw-r--r-- | game/network/rail.h | 1 | ||||
-rw-r--r-- | game/terrain.h | 1 | ||||
-rw-r--r-- | game/vehicles/train.h | 2 | ||||
-rw-r--r-- | game/vehicles/vehicle.h | 1 | ||||
-rw-r--r-- | game/worldobject.h | 4 | ||||
-rw-r--r-- | lib/chronology.hpp | 8 |
6 files changed, 13 insertions, 4 deletions
diff --git a/game/network/rail.h b/game/network/rail.h index bfbb928..47969d6 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -1,6 +1,7 @@ #ifndef RAILLINKS_H #define RAILLINKS_H +#include "chronology.hpp" #include "game/worldobject.h" #include "gfx/models/mesh.h" #include "gfx/renderable.h" diff --git a/game/terrain.h b/game/terrain.h index 979a8e0..c32f092 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -1,6 +1,7 @@ #ifndef TERRAIN_H #define TERRAIN_H +#include "chronology.hpp" #include "collection.hpp" #include "game/worldobject.h" #include <gfx/models/mesh.h> diff --git a/game/vehicles/train.h b/game/vehicles/train.h index e3dad73..ef49209 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -1,11 +1,11 @@ #ifndef TRAIN_H #define TRAIN_H +#include "chronology.hpp" #include "game/activities/go.h" // IWYU pragma: keep #include "game/activities/idle.h" // IWYU pragma: keep #include "game/activity.h" #include "game/network/link.h" -#include "game/worldobject.h" #include "railVehicle.h" #include "vehicle.h" #include <collection.hpp> diff --git a/game/vehicles/vehicle.h b/game/vehicles/vehicle.h index 1fc8365..07bd492 100644 --- a/game/vehicles/vehicle.h +++ b/game/vehicles/vehicle.h @@ -1,6 +1,7 @@ #ifndef VEHICLE_H #define VEHICLE_H +#include "chronology.hpp" #include "linkHistory.h" #include <game/activity.h> #include <game/network/link.h> diff --git a/game/worldobject.h b/game/worldobject.h index 0340ac4..ba77cd0 100644 --- a/game/worldobject.h +++ b/game/worldobject.h @@ -1,11 +1,9 @@ #ifndef WORLDOBJECT_H #define WORLDOBJECT_H -#include <chrono> +#include "chronology.hpp" #include <special_members.hpp> -using TickDuration = std::chrono::duration<float, std::chrono::seconds::period>; - class WorldObject { public: WorldObject() = default; diff --git a/lib/chronology.hpp b/lib/chronology.hpp new file mode 100644 index 0000000..5edf95a --- /dev/null +++ b/lib/chronology.hpp @@ -0,0 +1,8 @@ +#ifndef CHRONOLOGY_H +#define CHRONOLOGY_H + +#include <chrono> + +using TickDuration = std::chrono::duration<float, std::chrono::seconds::period>; + +#endif |