aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Scene.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:29:09 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 11:29:09 +0100
commitb6e835c5f9da24b78a005c6c8896ad35ac965234 (patch)
tree2d8f5cc147b7907137f6171b0e4c4269a8be4634 /src/crepe/api/Scene.h
parentcd157f835eefd1c7876ba090817a7fca0a0fc085 (diff)
parentb9fc66f6922b1f40f2dbe14e8dfc4caa469654bc (diff)
Merge branch 'master' into loek/scripts
Diffstat (limited to 'src/crepe/api/Scene.h')
-rw-r--r--src/crepe/api/Scene.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h
index ba9bb76..dcca9d4 100644
--- a/src/crepe/api/Scene.h
+++ b/src/crepe/api/Scene.h
@@ -2,13 +2,19 @@
#include <string>
+#include "../manager/ComponentManager.h"
#include "../manager/Mediator.h"
+#include "../manager/ResourceManager.h"
+#include "../util/Log.h"
#include "../util/OptionalRef.h"
+#include "GameObject.h"
+
namespace crepe {
class SceneManager;
class ComponentManager;
+class Asset;
/**
* \brief Represents a Scene
@@ -38,7 +44,7 @@ public:
// TODO: Late references should ALWAYS be private! This is currently kept as-is so unit tests
// keep passing, but this reference should not be directly accessible by the user!!!
-protected:
+private:
/**
* \name Late references
*
@@ -53,6 +59,36 @@ protected:
//! Mediator reference
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;
+
+ //! \copydoc ComponentManager::new_object
+ GameObject new_object(const std::string & name, const std::string & tag = "",
+ const vec2 & position = {0, 0}, double rotation = 0,
+ double scale = 1);
+
+ //! \copydoc ResourceManager::set_persistent
+ void set_persistent(const Asset & asset, bool persistent);
+ /**
+ * \name Logging functions
+ * \see Log
+ * \{
+ */
+ //! \copydoc Log::logf
+ template <class... Args>
+ void logf(const Log::Level & level, std::format_string<Args...> fmt, Args &&... args);
+ //! \copydoc Log::logf
+ template <class... Args>
+ void logf(std::format_string<Args...> fmt, Args &&... args);
+ //! \}
};
} // namespace crepe
+
+#include "Scene.hpp"