diff options
| author | MegaMech <inkstudios1@hotmail.com> | 2024-12-13 15:18:39 -0700 |
|---|---|---|
| committer | MegaMech <inkstudios1@hotmail.com> | 2024-12-13 15:18:39 -0700 |
| commit | 517a59fbf49a4d2bb59aefb10f2acfcdd17ff75e (patch) | |
| tree | 991cf0baa99c4185fcb325757be972b8490451cd /src/engine/World.cpp | |
| parent | 95b8cca50025f7fa10e47ca24ac5f71f9813a2e3 (diff) | |
Impl trophy
Diffstat (limited to 'src/engine/World.cpp')
| -rw-r--r-- | src/engine/World.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/World.cpp b/src/engine/World.cpp index ead375a24..429b402a0 100644 --- a/src/engine/World.cpp +++ b/src/engine/World.cpp @@ -13,7 +13,7 @@ #include "objects/Penguin.h" #include "TrainCrossing.h" #include <memory> -#include "objects/GameObject.h" +#include "objects/Object.h" extern "C" { #include "camera.h" @@ -242,7 +242,7 @@ void RemoveExpiredActors() { // Actors.end()); } -GameObject* World::AddObject(GameObject* object) { +OObject* World::AddObject(OObject* object) { Objects.push_back(object); return Objects.back(); } @@ -253,17 +253,17 @@ void World::TickObjects() { } } -void World::DrawObjects(Camera *camera) { +void World::DrawObjects(s32 cameraId) { for (const auto& object : Objects) { - object->Draw(camera); + object->Draw(cameraId); } } void World::ExpiredObjects() { - //this->GameObjects.erase( - // std::remove_if(this->GameObjects.begin(), this->GameObjects.end(), - // [](const std::unique_ptr<GameObject>& object) { return object->uuid == 0; }), // Example condition - // this->GameObjects.end()); + //this->Objects.erase( + // std::remove_if(this->Objects.begin(), this->Objects.end(), + // [](const std::unique_ptr<OObject>& object) { return object->uuid == 0; }), // Example condition + // this->Objects.end()); } void World::DestroyObjects() { @@ -271,9 +271,9 @@ void World::DestroyObjects() { } Object* World::GetObjectByIndex(size_t index) { - //if (index < this->GameObjects.size()) { + //if (index < this->Objects.size()) { // Assuming GameActor::a is accessible, use reinterpret_cast if needed - // return reinterpret_cast<Object*>(&this->GameObjects[index]->o); + // return reinterpret_cast<Object*>(&this->Objects[index]->o); //} return nullptr; // Or handle the error as needed } |
