fixed floors sample
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
|
||||
#include <utils/math.hpp>
|
||||
#include <utils/debug.hpp>
|
||||
#include <loaders/obj_loader.hpp>
|
||||
|
||||
// ----
|
||||
// Constructors/Destructors
|
||||
@@ -34,8 +33,6 @@ FloorManager::FloorManager(int t_floorAmount)
|
||||
FloorManager::~FloorManager()
|
||||
{
|
||||
delete[] spirals;
|
||||
delete[] spec;
|
||||
delete[] obj;
|
||||
delete[] meshes;
|
||||
}
|
||||
|
||||
@@ -83,15 +80,13 @@ void FloorManager::initFloors()
|
||||
PRINT_LOG("Initializing floors");
|
||||
meshes = new Mesh *[floorAmount];
|
||||
|
||||
Vector3 initPos = Vector3(0.0F, 0.0F, 0.0F);
|
||||
meshes[0] = new Mesh();
|
||||
meshes[0]->loadObj("floor/", "floor.obj", initPos, 2.0F);
|
||||
meshes[0]->loadObj("floor/", "floor", 2.0F, false);
|
||||
meshes[0]->shouldBeFrustumCulled = true;
|
||||
obj = meshes[0]->obj;
|
||||
spec = meshes[0]->spec;
|
||||
meshes[0]->shouldBeLighted = true;
|
||||
for (u8 i = 0; i < floorAmount; i++)
|
||||
{
|
||||
floors[i].init(obj, spec, spirals[i], i);
|
||||
floors[i].init(meshes[0], spirals[i], i);
|
||||
meshes[i] = &floors[i].mesh;
|
||||
}
|
||||
PRINT_LOG("Floors initialized!");
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
class Player; // Forward definition
|
||||
|
||||
#include <models/math/point.hpp>
|
||||
#include <models/obj_model.hpp>
|
||||
#include <models/mesh_spec.hpp>
|
||||
#include <modules/camera_base.hpp>
|
||||
#include <models/audio_listener.hpp>
|
||||
|
||||
@@ -33,12 +31,10 @@ public:
|
||||
void update(Player &t_player);
|
||||
Mesh **meshes;
|
||||
void onAudioTick();
|
||||
MeshSpec *spec;
|
||||
|
||||
private:
|
||||
u8 audioOffset, audioMode;
|
||||
u32 audioTick;
|
||||
ObjModel *obj;
|
||||
Point *spirals;
|
||||
void calcSpiral(int X, int Y);
|
||||
void initFloors();
|
||||
|
||||
Reference in New Issue
Block a user