aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-12 19:38:26 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-12 19:38:26 +0100
commita6b861d8d8a516f6df14fe085da9c34488291d0a (patch)
tree0bcde85b658cd9b813b159689226e42905d37c55
parent5f09a71b433e01a9dc17f93c5d9f79117cef618e (diff)
parentc9a093dfb670e29fb92cfd75938aa8f293a0767a (diff)
Merge branch 'jaro/mediator_concealing_scene' of github.com:lonkaars/crepe into jaro/mediator_concealing_scene
-rw-r--r--src/crepe/api/Scene.h15
-rw-r--r--src/crepe/api/Scene.hpp3
2 files changed, 7 insertions, 11 deletions
diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h
index cb8147f..9ef75b5 100644
--- a/src/crepe/api/Scene.h
+++ b/src/crepe/api/Scene.h
@@ -2,9 +2,9 @@
#include <string>
+#include "../manager/ComponentManager.h"
#include "../manager/Mediator.h"
#include "../manager/ResourceManager.h"
-#include "../manager/ComponentManager.h"
#include "../util/OptionalRef.h"
#include "GameObject.h"
@@ -60,15 +60,12 @@ private:
OptionalRef<Mediator> mediator;
protected:
-
/**
* \brief Retrieve the reference to the SaveManager instance
*
* \returns A reference to the SaveManager instance held by the Mediator.
*/
- SaveManager& get_save_manager() const{
- return mediator->save_manager;
- }
+ SaveManager & get_save_manager() const { return mediator->save_manager; }
/**
* \brief Create a new game object using the component manager
@@ -84,8 +81,8 @@ protected:
* \note This method automatically assigns a new entity ID
*/
GameObject new_object(const std::string & name, const std::string & tag = "",
- const vec2 & position = {0, 0}, double rotation = 0,
- double scale = 1) {
+ const vec2 & position = {0, 0}, double rotation = 0,
+ double scale = 1) {
// Forward the call to ComponentManager's new_object method
return mediator->component_manager->new_object(name, tag, position, rotation, scale);
}
@@ -96,7 +93,7 @@ protected:
* \param asset Asset the concrete resource is instantiated from
* \param persistent Whether this resource is persistent (true=keep, false=destroy)
*/
- void set_persistent(const Asset & asset, bool persistent){
+ void set_persistent(const Asset & asset, bool persistent) {
mediator->resource_manager->set_persistent(asset, persistent);
}
@@ -108,10 +105,8 @@ protected:
*/
template <typename... Args>
void logf(Args &&... args);
-
};
} // namespace crepe
-
#include "Scene.hpp"
diff --git a/src/crepe/api/Scene.hpp b/src/crepe/api/Scene.hpp
index b0ef392..ee89981 100644
--- a/src/crepe/api/Scene.hpp
+++ b/src/crepe/api/Scene.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "../util/Log.h"
+#include "Scene.h"
#include "Scene.h"
@@ -11,4 +12,4 @@ void Scene::logf(Args &&... args) {
Log::logf(std::forward<Args>(args)...);
}
-}
+} // namespace crepe