audio rework

This commit is contained in:
h4570
2022-08-11 23:18:50 +02:00
parent 74c642bd83
commit 472ab5c2ad
20 changed files with 706 additions and 386 deletions
+16 -16
View File
@@ -18,29 +18,29 @@ using Tyra::ObjLoaderOptions;
namespace Demo {
Terrain::Terrain(TextureRepository* repo)
: heightmap(-5.0F, // Min height
100.0F, // Max height
Vec4(-196.6F, 0.0F, -412.0F, 1.0F), // Left up
Vec4(286.0F, 0.0F, 443.3F, 1.0F) // Right down
: heightmap(-5.0F, // Min height
450.0F, // Max height
Vec4(-784.6F, 0.0F, -1648.0F, 1.0F), // Left up
Vec4(1144.0F, 0.0F, 1772.3F, 1.0F) // Right down
) {
ObjLoader loader;
// ObjLoader loader;
ObjLoaderOptions objOptions;
objOptions.flipUVs = true;
objOptions.scale = 25.0F;
// ObjLoaderOptions objOptions;
// objOptions.flipUVs = true;
// objOptions.scale = 100.0F;
auto* data = loader.load(
FileUtils::fromCwd("game/models/terrain/terrain.obj"), objOptions);
data->normalsEnabled = false;
mesh = new StaticMesh(*data);
// auto* data = loader.load(
// FileUtils::fromCwd("game/models/terrain/terrain.obj"), objOptions);
// data->normalsEnabled = false;
// mesh = new StaticMesh(*data);
delete data;
// delete data;
repo->addByMesh(mesh, FileUtils::fromCwd("game/models/terrain/"), "png");
// repo->addByMesh(mesh, FileUtils::fromCwd("game/models/terrain/"), "png");
allocateOptions();
// allocateOptions();
pair = new RendererStaticPair{mesh, options};
// pair = new RendererStaticPair{mesh, options};
}
float Terrain::getHeightOffset(const Vec4& playerPosition) {