From 1b96c6e3c57b9d1dc5fb02cbd24b625d7f7f5b05 Mon Sep 17 00:00:00 2001 From: jaroWMR Date: Wed, 23 Oct 2024 18:44:24 +0200 Subject: moved transform --- src/crepe/CMakeLists.txt | 2 -- src/crepe/PhysicsSystem.cpp | 2 +- src/crepe/Transform.cpp | 6 ------ src/crepe/Transform.h | 22 ---------------------- src/crepe/api/CMakeLists.txt | 2 ++ src/crepe/api/Transform.cpp | 6 ++++++ src/crepe/api/Transform.h | 22 ++++++++++++++++++++++ 7 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 src/crepe/Transform.cpp delete mode 100644 src/crepe/Transform.h create mode 100644 src/crepe/api/Transform.cpp create mode 100644 src/crepe/api/Transform.h (limited to 'src/crepe') diff --git a/src/crepe/CMakeLists.txt b/src/crepe/CMakeLists.txt index 2ad20a7..df3adf0 100644 --- a/src/crepe/CMakeLists.txt +++ b/src/crepe/CMakeLists.txt @@ -10,7 +10,6 @@ target_sources(crepe PUBLIC Component.cpp ScriptSystem.cpp PhysicsSystem.cpp - Transform.cpp CollisionSystem.cpp Collider.cpp ) @@ -28,7 +27,6 @@ target_sources(crepe PUBLIC FILE_SET HEADERS FILES System.h ScriptSystem.h PhysicsSystem.h - Transform.h CollisionSystem.h Collider.h ) diff --git a/src/crepe/PhysicsSystem.cpp b/src/crepe/PhysicsSystem.cpp index e0bbc5b..d9930a8 100644 --- a/src/crepe/PhysicsSystem.cpp +++ b/src/crepe/PhysicsSystem.cpp @@ -1,7 +1,7 @@ #include "PhysicsSystem.h" #include "ComponentManager.h" #include "api/Rigidbody.h" -#include "Transform.h" +#include "api/Transform.h" #include "api/Force.h" #include diff --git a/src/crepe/Transform.cpp b/src/crepe/Transform.cpp deleted file mode 100644 index 2c39523..0000000 --- a/src/crepe/Transform.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "Transform.h" - -using namespace crepe; - -Transform::Transform(uint32_t gameObjectId,Position position, int rotation, int scale) - : Component(gameObjectId), postion(postion), rotation(rotation), scale(scale) {} diff --git a/src/crepe/Transform.h b/src/crepe/Transform.h deleted file mode 100644 index 3e8d142..0000000 --- a/src/crepe/Transform.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "Component.h" - -namespace crepe { - -struct Position -{ - int x; - int y; -}; - - -class Transform : public Component { -public: - Transform(uint32_t gameObjectId,Position position, int rotation, int scale); - Position postion; - int rotation; - int scale; -}; - -} // namespace crepe diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index 465ba46..ef01594 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -7,6 +7,7 @@ target_sources(crepe PUBLIC Sprite.cpp Force.cpp ParticleEmitter.cpp + Transform.cpp ) target_sources(crepe PUBLIC FILE_SET HEADERS FILES @@ -19,5 +20,6 @@ target_sources(crepe PUBLIC FILE_SET HEADERS FILES Sprite.h Force.h ParticleEmitter.h + Transform.h ) diff --git a/src/crepe/api/Transform.cpp b/src/crepe/api/Transform.cpp new file mode 100644 index 0000000..2c39523 --- /dev/null +++ b/src/crepe/api/Transform.cpp @@ -0,0 +1,6 @@ +#include "Transform.h" + +using namespace crepe; + +Transform::Transform(uint32_t gameObjectId,Position position, int rotation, int scale) + : Component(gameObjectId), postion(postion), rotation(rotation), scale(scale) {} diff --git a/src/crepe/api/Transform.h b/src/crepe/api/Transform.h new file mode 100644 index 0000000..3e8d142 --- /dev/null +++ b/src/crepe/api/Transform.h @@ -0,0 +1,22 @@ +#pragma once + +#include "Component.h" + +namespace crepe { + +struct Position +{ + int x; + int y; +}; + + +class Transform : public Component { +public: + Transform(uint32_t gameObjectId,Position position, int rotation, int scale); + Position postion; + int rotation; + int scale; +}; + +} // namespace crepe -- cgit v1.2.3