mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-04 18:59:55 -04:00
Trophy, Object impl, and cleanup
This commit is contained in:
@@ -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() { }
|
||||
@@ -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();
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user