Trophy, Object impl, and cleanup

This commit is contained in:
MegaMech
2024-12-13 15:19:39 -07:00
parent 517a59fbf4
commit 7f22f75db7
9 changed files with 47 additions and 35 deletions
-20
View File
@@ -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() { }
+20
View File
@@ -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() { }
@@ -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();
+1 -1
View File
@@ -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.
*
+11
View File
@@ -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: