demo fixes
This commit is contained in:
@@ -28,12 +28,10 @@ EnemyManager::EnemyManager(Engine* engine, const Heightmap& heightmap) {
|
||||
objOptions.flipUVs = true;
|
||||
objOptions.scale = 250.0F;
|
||||
|
||||
auto* data = loader.load(FileUtils::fromCwd("game/models/zombie/zombie.obj"),
|
||||
auto data = loader.load(FileUtils::fromCwd("game/models/zombie/zombie.obj"),
|
||||
objOptions);
|
||||
data->normalsEnabled = false;
|
||||
motherMesh = new DynamicMesh(*data);
|
||||
|
||||
delete data;
|
||||
motherMesh = new DynamicMesh(data.get());
|
||||
|
||||
bodyTexture = textureRepo->add(
|
||||
FileUtils::fromCwd("game/models/zombie/BodyMaterial.png"));
|
||||
|
||||
@@ -26,11 +26,10 @@ Weapon::Weapon(Engine* engine) {
|
||||
pad = &engine->pad;
|
||||
audio = &engine->audio;
|
||||
auto* repo = &engine->renderer.core.texture.repository;
|
||||
auto* data =
|
||||
auto data =
|
||||
loader.load(FileUtils::fromCwd("game/models/ak47/ak47.obj"), objOptions);
|
||||
data->normalsEnabled = false;
|
||||
mesh = new StaticMesh(*data);
|
||||
delete data;
|
||||
mesh = new StaticMesh(data.get());
|
||||
|
||||
mesh->translation.translateX(2.85F);
|
||||
mesh->translation.translateY(-3.40F);
|
||||
|
||||
@@ -23,10 +23,9 @@ Ship::Ship(TextureRepository* repo) {
|
||||
objOptions.flipUVs = true;
|
||||
objOptions.scale = 200.0F;
|
||||
|
||||
auto* data =
|
||||
auto data =
|
||||
loader.load(FileUtils::fromCwd("game/models/ship/ship.obj"), objOptions);
|
||||
mesh = new StaticMesh(*data);
|
||||
delete data;
|
||||
mesh = new StaticMesh(data.get());
|
||||
|
||||
for (std::size_t i = 0; i < mesh->materials.size(); i++) {
|
||||
mesh->materials[i]->ambient /= 2.0F;
|
||||
|
||||
@@ -23,11 +23,10 @@ Skybox::Skybox(TextureRepository* repo) {
|
||||
objOptions.flipUVs = true;
|
||||
objOptions.scale = 100.0F;
|
||||
|
||||
auto* data = loader.load(FileUtils::fromCwd("game/models/skybox/skybox.obj"),
|
||||
auto data = loader.load(FileUtils::fromCwd("game/models/skybox/skybox.obj"),
|
||||
objOptions);
|
||||
data->normalsEnabled = false;
|
||||
mesh = new StaticMesh(*data);
|
||||
delete data;
|
||||
mesh = new StaticMesh(data.get());
|
||||
|
||||
repo->addByMesh(mesh, FileUtils::fromCwd("game/models/skybox/"), "png");
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ Terrain::Terrain(TextureRepository* repo)
|
||||
objOptions.flipUVs = true;
|
||||
objOptions.scale = 100.0F;
|
||||
|
||||
auto* data = loader.load(
|
||||
FileUtils::fromCwd("game/models/terrain/terrain.obj"), objOptions);
|
||||
auto data = loader.load(FileUtils::fromCwd("game/models/terrain/terrain.obj"),
|
||||
objOptions);
|
||||
data->normalsEnabled = false;
|
||||
mesh = new StaticMesh(*data);
|
||||
delete data;
|
||||
mesh = new StaticMesh(data.get());
|
||||
|
||||
repo->addByMesh(mesh, FileUtils::fromCwd("game/models/terrain/"), "png");
|
||||
|
||||
allocateOptions();
|
||||
|
||||
Reference in New Issue
Block a user