diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 16:34:00 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-05 16:34:00 +0100 |
commit | 3d27e696185d6f4dfc9e978517ed17844044c5bc (patch) | |
tree | af65fdcdb44a1f9e6a84a294f267e6f743fea599 /src/example | |
parent | 6071387c2bbe6d36a95c113ad137e8e2ce80be27 (diff) | |
parent | ae6a103946e437ca85cc69c5fc2cbf68d35ffeae (diff) |
Merge remote-tracking branch 'origin/max/gameobject' into max/scenes
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/asset_manager.cpp | 6 | ||||
-rw-r--r-- | src/example/audio_internal.cpp | 7 | ||||
-rw-r--r-- | src/example/components_internal.cpp | 1 | ||||
-rw-r--r-- | src/example/ecs.cpp | 1 | ||||
-rw-r--r-- | src/example/log.cpp | 5 | ||||
-rw-r--r-- | src/example/particle.cpp | 14 | ||||
-rw-r--r-- | src/example/physics.cpp | 8 | ||||
-rw-r--r-- | src/example/rendering.cpp | 5 | ||||
-rw-r--r-- | src/example/script.cpp | 7 |
9 files changed, 22 insertions, 32 deletions
diff --git a/src/example/asset_manager.cpp b/src/example/asset_manager.cpp index 7e15d1f..cf64f89 100644 --- a/src/example/asset_manager.cpp +++ b/src/example/asset_manager.cpp @@ -1,11 +1,9 @@ - - -#include <crepe/Sound.h> #include <crepe/api/AssetManager.h> #include <crepe/api/Texture.h> +#include <crepe/facade/Sound.h> using namespace crepe; -using namespace crepe::api; + int main() { // this needs to be called before the asset manager otherwise the destructor diff --git a/src/example/audio_internal.cpp b/src/example/audio_internal.cpp index c7dd163..1ea839d 100644 --- a/src/example/audio_internal.cpp +++ b/src/example/audio_internal.cpp @@ -3,14 +3,13 @@ * Standalone example for usage of the internal \c Sound class. */ -#include <crepe/Sound.h> #include <crepe/api/Config.h> +#include <crepe/facade/Sound.h> #include <crepe/util/log.h> #include <thread> using namespace crepe; -using namespace crepe::api; using namespace std; using namespace std::chrono_literals; using std::make_unique; @@ -18,8 +17,8 @@ using std::make_unique; // Unrelated stuff that is not part of this POC int _ = []() { // Show dbg_trace() output - auto & cfg = api::Config::get_instance(); - cfg.log.level = util::LogLevel::TRACE; + auto & cfg = Config::get_instance(); + cfg.log.level = LogLevel::TRACE; return 0; // satisfy compiler }(); diff --git a/src/example/components_internal.cpp b/src/example/components_internal.cpp index 3c68974..ea1eaad 100644 --- a/src/example/components_internal.cpp +++ b/src/example/components_internal.cpp @@ -15,7 +15,6 @@ #include <crepe/util/log.h> -using namespace crepe::api; using namespace crepe; using namespace std; diff --git a/src/example/ecs.cpp b/src/example/ecs.cpp index 5646edd..eb5eeba 100644 --- a/src/example/ecs.cpp +++ b/src/example/ecs.cpp @@ -5,7 +5,6 @@ #include "../crepe/api/GameObject.h" #include "../crepe/api/Transform.h" -using namespace crepe::api; using namespace crepe; using namespace std; diff --git a/src/example/log.cpp b/src/example/log.cpp index 75f133c..db8aa48 100644 --- a/src/example/log.cpp +++ b/src/example/log.cpp @@ -7,13 +7,12 @@ #include <crepe/util/log.h> using namespace crepe; -using namespace crepe::util; // unrelated setup code int _ = []() { // make sure all log messages get printed - auto & cfg = api::Config::get_instance(); - cfg.log.level = util::LogLevel::TRACE; + auto & cfg = Config::get_instance(); + cfg.log.level = LogLevel::TRACE; return 0; // satisfy compiler }(); diff --git a/src/example/particle.cpp b/src/example/particle.cpp index fe8a43b..69da015 100644 --- a/src/example/particle.cpp +++ b/src/example/particle.cpp @@ -1,15 +1,15 @@ -#include "Particle.h" -#include "ParticleSystem.h" -#include "SDLApp.h" -#include "api/ParticleEmitter.h" #include <chrono> +#include <iostream> +#include <thread> + #include <crepe/Component.h> #include <crepe/ComponentManager.h> +#include <crepe/Particle.h> #include <crepe/api/GameObject.h> -#include <iostream> -#include <thread> +#include <crepe/api/ParticleEmitter.h> +#include <crepe/facade/SDLApp.h> +#include <crepe/system/ParticleSystem.h> -using namespace crepe::api; using namespace crepe; using namespace std; diff --git a/src/example/physics.cpp b/src/example/physics.cpp index 1bafdf3..c7db6ac 100644 --- a/src/example/physics.cpp +++ b/src/example/physics.cpp @@ -1,15 +1,15 @@ -#include "PhysicsSystem.h" #include <chrono> +#include <iostream> +#include <thread> + #include <crepe/Component.h> #include <crepe/ComponentManager.h> #include <crepe/api/Force.h> #include <crepe/api/GameObject.h> #include <crepe/api/Rigidbody.h> #include <crepe/api/Transform.h> -#include <iostream> -#include <thread> +#include <crepe/system/PhysicsSystem.h> -using namespace crepe::api; using namespace crepe; using namespace std; diff --git a/src/example/rendering.cpp b/src/example/rendering.cpp index 9624093..f3d8a7d 100644 --- a/src/example/rendering.cpp +++ b/src/example/rendering.cpp @@ -1,8 +1,6 @@ - - #include <crepe/ComponentManager.h> -#include <crepe/RenderSystem.h> #include <crepe/api/GameObject.h> +#include <crepe/system/RenderSystem.h> #include <crepe/util/log.h> #include <crepe/api/AssetManager.h> @@ -17,7 +15,6 @@ using namespace std; using namespace crepe; -using namespace crepe::api; int main() { diff --git a/src/example/script.cpp b/src/example/script.cpp index e4c8319..928eddf 100644 --- a/src/example/script.cpp +++ b/src/example/script.cpp @@ -4,7 +4,7 @@ */ #include <crepe/ComponentManager.h> -#include <crepe/ScriptSystem.h> +#include <crepe/system/ScriptSystem.h> #include <crepe/util/log.h> #include <crepe/api/BehaviorScript.h> @@ -14,14 +14,13 @@ #include <crepe/api/Transform.h> using namespace crepe; -using namespace crepe::api; using namespace std; // Unrelated stuff that is not part of this POC int _ = []() { // Show dbg_trace() output - auto & cfg = api::Config::get_instance(); - cfg.log.level = util::LogLevel::TRACE; + auto & cfg = Config::get_instance(); + cfg.log.level = LogLevel::TRACE; return 0; // satisfy compiler }(); |