diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 09:05:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 09:05:56 +0200 |
commit | b28ab01dceffa15bddedd6a59add89c87af7f289 (patch) | |
tree | 7d1a864739ef3fc119342fae94af565f1cf60306 /main | |
parent | ffe92653a7ec4138aa39d38fe8c68d0f0682f062 (diff) |
a
Diffstat (limited to 'main')
-rw-r--r-- | main/loader-impl.cpp | 12 | ||||
-rw-r--r-- | main/main.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/main/loader-impl.cpp b/main/loader-impl.cpp index 24d43fdb..1f15ea68 100644 --- a/main/loader-impl.cpp +++ b/main/loader-impl.cpp @@ -28,15 +28,15 @@ struct loader_impl final : loader_ std::unordered_map<std::string, std::shared_ptr<struct tile_atlas>> atlas_map; - std::string shader(const Containers::StringView& filename) override; - Trade::ImageData2D tile_texture(const Containers::StringView& filename) override; - std::shared_ptr<struct tile_atlas> tile_atlas(const Containers::StringView& filename, Vector2i size) override; + std::string shader(Containers::StringView filename) override; + Trade::ImageData2D tile_texture(Containers::StringView filename) override; + std::shared_ptr<struct tile_atlas> tile_atlas(Containers::StringView filename, Vector2i size) override; explicit loader_impl(); ~loader_impl() override; }; -std::string loader_impl::shader(const Containers::StringView& filename) +std::string loader_impl::shader(Containers::StringView filename) { if (!shader_res) shader_res = std::make_optional<Utility::Resource>("game/shaders"); @@ -46,7 +46,7 @@ std::string loader_impl::shader(const Containers::StringView& filename) return ret; } -std::shared_ptr<tile_atlas> loader_impl::tile_atlas(const Containers::StringView& name, Vector2i size) +std::shared_ptr<tile_atlas> loader_impl::tile_atlas(Containers::StringView name, Vector2i size) { auto it = atlas_map.find(name); if (it != atlas_map.end()) @@ -57,7 +57,7 @@ std::shared_ptr<tile_atlas> loader_impl::tile_atlas(const Containers::StringView return atlas; } -Trade::ImageData2D loader_impl::tile_texture(const Containers::StringView& filename) +Trade::ImageData2D loader_impl::tile_texture(Containers::StringView filename) { if(!tga_importer || !tga_importer->openFile(filename)) ABORT("can't open tile image '%s'", filename.cbegin()); diff --git a/main/main.cpp b/main/main.cpp index f58228c6..4acdd471 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -56,7 +56,7 @@ struct app final : Platform::Application tile_shader _shader; tile_atlas_ floor1 = loader.tile_atlas("../share/game/images/metal1.tga", {2, 2}); tile_atlas_ floor2 = loader.tile_atlas("../share/game/images/floor1.tga", {4, 4}); - tile_atlas_ wall1 = loader.tile_atlas("../share/game/images/metal2.tga", {2, 2}); + tile_atlas_ wall1 = loader.tile_atlas("../share/game/images/wood2.tga", {2, 2}); tile_atlas_ wall2 = loader.tile_atlas("../share/game/images/wood1.tga", {2, 2}); chunk _chunk = make_test_chunk(); floor_mesh _floor_mesh; @@ -104,7 +104,7 @@ app::app(const Arguments& arguments): .setTitle("Test") .setSize({1024, 768}, dpi_policy::Physical), GLConfiguration{} - //.setSampleCount(16) + .setSampleCount(4) } { reset_camera_offset(); |