summaryrefslogtreecommitdiff
path: root/src/engine/objects
diff options
context:
space:
mode:
authorMegaMech <inkstudios1@hotmail.com>2024-12-13 15:19:39 -0700
committerMegaMech <inkstudios1@hotmail.com>2024-12-13 15:19:39 -0700
commit7f22f75db7fa7a1b2149bc953d2a159c52bc5e8b (patch)
tree71cacfc66228dcd9f509fc2d7894689b426778b7 /src/engine/objects
parent517a59fbf49a4d2bb59aefb10f2acfcdd17ff75e (diff)
Trophy, Object impl, and cleanup
Diffstat (limited to 'src/engine/objects')
-rw-r--r--src/engine/objects/GameObject.cpp20
-rw-r--r--src/engine/objects/Object.cpp20
-rw-r--r--src/engine/objects/Object.h (renamed from src/engine/objects/GameObject.h)8
-rw-r--r--src/engine/objects/Thwomp.h2
-rw-r--r--src/engine/objects/Trophy.h11
5 files changed, 36 insertions, 25 deletions
diff --git a/src/engine/objects/GameObject.cpp b/src/engine/objects/GameObject.cpp
deleted file mode 100644
index c7be32769..000000000
--- a/src/engine/objects/GameObject.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <libultraship.h>
-#include "GameObject.h"
-
-#include "World.h"
-
-extern "C" {
- #include "camera.h"
-}
-
-
- //GameActor()
-
-GameObject::GameObject() {}
-
- // Virtual functions to be overridden by derived classes
-void GameObject::Tick() { }
-void GameObject::Draw(Camera* camera) { }
-void GameObject::Collision() {}
-void GameObject::Expire() { }
-void GameObject::Destroy() { }
diff --git a/src/engine/objects/Object.cpp b/src/engine/objects/Object.cpp
new file mode 100644
index 000000000..74143a923
--- /dev/null
+++ b/src/engine/objects/Object.cpp
@@ -0,0 +1,20 @@
+#include <libultraship.h>
+#include "Object.h"
+
+#include "World.h"
+
+extern "C" {
+ #include "camera.h"
+}
+
+
+ //GameActor()
+
+OObject::OObject() {}
+
+ // Virtual functions to be overridden by derived classes
+void OObject::Tick() { }
+void OObject::Draw(s32 cameraId) { }
+void OObject::Collision() {}
+void OObject::Expire() { }
+void OObject::Destroy() { }
diff --git a/src/engine/objects/GameObject.h b/src/engine/objects/Object.h
index 19d5301cd..c41cfae6d 100644
--- a/src/engine/objects/GameObject.h
+++ b/src/engine/objects/Object.h
@@ -7,17 +7,17 @@ extern "C" {
#include "objects.h"
}
-class GameObject {
+class OObject {
public:
uint8_t uuid[16];
Object o;
- virtual ~GameObject() = default;
+ virtual ~OObject() = default;
- explicit GameObject();
+ explicit OObject();
virtual void Tick();
- virtual void Draw(Camera* camera);
+ virtual void Draw(s32 cameraId);
virtual void Collision();
virtual void Expire();
virtual void Destroy();
diff --git a/src/engine/objects/Thwomp.h b/src/engine/objects/Thwomp.h
index 517d2972d..f64318e4d 100644
--- a/src/engine/objects/Thwomp.h
+++ b/src/engine/objects/Thwomp.h
@@ -18,7 +18,7 @@ extern "C" {
//! @todo make adjustable properties for squishSize and boundingBoxSize
/**
- * Thwomp GameObject
+ * Thwomp OObject
*
* The game automatically places the actor on the ground so you do not need to provide a Y coordinate value.
*
diff --git a/src/engine/objects/Trophy.h b/src/engine/objects/Trophy.h
index 76834d77e..d73e04929 100644
--- a/src/engine/objects/Trophy.h
+++ b/src/engine/objects/Trophy.h
@@ -15,6 +15,17 @@ extern "C" {
#include "some_data.h"
}
+//! @todo move this like World.h or something
+struct FVector {
+ float x, y, z;
+
+ FVector& operator=(const FVector& other) {
+ x = other.x;
+ y = other.y;
+ z = other.z;
+ return *this;
+ }
+};
class OTrophy : public OObject {
public: