From 42c5b55f9554768c262c4cc8bc556c893e300919 Mon Sep 17 00:00:00 2001 From: Asuro Date: Fri, 20 Jun 2025 23:34:32 +0200 Subject: [PATCH] fix texture rotation, add tutorial popup --- assets/textures/w corner long.png | 4 ++-- assets/textures/w straight.png | 4 ++-- src/game/Level.cpp | 5 ++-- src/game/Tools.cpp | 37 ++++++++++++++++++++++++++++++ src/game/data/puzzles/0.pzl | 2 +- src/game/data/static/puzzle.dat | Bin 19109 -> 19109 bytes src/game/rendering/Rendering.h | 2 +- src/models/w straight.glb | 4 ++-- src/textures/w corner long.ktx | 2 +- src/textures/w straight.ktx | 2 +- 10 files changed, 50 insertions(+), 12 deletions(-) diff --git a/assets/textures/w corner long.png b/assets/textures/w corner long.png index 05fecac..5f83df6 100644 --- a/assets/textures/w corner long.png +++ b/assets/textures/w corner long.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:102bfe15c0831db61376b851b5f1b6af1665a9ff4d6c468476d8e5552ba14a1f -size 175919 +oid sha256:474f85a0a5491292c2ee8741d287b812bd7700456f6d6810ee768b79d19b94a4 +size 89801 diff --git a/assets/textures/w straight.png b/assets/textures/w straight.png index 8403e52..db102cd 100644 --- a/assets/textures/w straight.png +++ b/assets/textures/w straight.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75c1669953ed096d471f0152c4f3e89e97bf487517478b8654e91ad76f4db846 -size 269005 +oid sha256:f78f3dba154d5696a5c7a672fc5975164dca72078f2623b3c633a7fc66a6c475 +size 77219 diff --git a/src/game/Level.cpp b/src/game/Level.cpp index 2fd5cab..5f055e7 100644 --- a/src/game/Level.cpp +++ b/src/game/Level.cpp @@ -107,8 +107,9 @@ namespace Game if (rendering.SetupData.UseImgui) { auto& IO = ImGui::GetIO(); - IO.ConfigFlags = - FlagBool(IO.ConfigFlags, ImGuiConfigFlags_NoMouse | ImGuiConfigFlags_NoKeyboard, IsGaming); + IO.ConfigFlags = FlagBool(IO.ConfigFlags, + ImGuiConfigFlags_NoMouse | ImGuiConfigFlags_NoKeyboard, + GetInstance().Player.InteractionM == InteractionMode::Walk); } rendering.UIVisible = IsGaming ? UIVisibilityState::Game : UIVisibilityState::Debug; } diff --git a/src/game/Tools.cpp b/src/game/Tools.cpp index 81e3470..b39ef5a 100644 --- a/src/game/Tools.cpp +++ b/src/game/Tools.cpp @@ -666,6 +666,43 @@ namespace Tools auto& level = Game::GetInstance().GameLevel; auto& player = Game::GetInstance().Player; + if (ImGui::Begin("Hilfe")) + { + if (ImGui::Button("Spiel Neustarten")) + { + } + ImGui::SameLine(); + if (ImGui::Button("Zurück zum Anfang")) + { + player.PlayerCamTransform.Position = {0.0f, 3.0f, 0.0f}; + } + ImGui::Separator(); + ImGui::Text("Anleitung:"); + ImGui::Text("Bewege dich mit"); + ImGui::SameLine(); + ImGui::TextColored({1.0f, 0.8f, 0.8f, 1.0f}, "W, A, S, D"); + ImGui::SameLine(); + ImGui::Text("und schau dich um mit der"); + ImGui::SameLine(); + ImGui::TextColored({1.0f, 0.8f, 0.8f, 1.0f}, "Maus."); + ImGui::Text("Drücke"); + ImGui::SameLine(); + ImGui::TextColored({1.0f, 0.8f, 0.8f, 1.0f}, "Leertaste"); + ImGui::SameLine(); + ImGui::Text("um den Spielplan zu öffnen."); + ImGui::Text(""); + auto& inflowTexture = rendering.Textures[10]; + auto& outflowTexture = rendering.Textures[9]; + auto& connectionTexture = rendering.Textures[8]; + ImGui::Text("Pumpe (Wasserquelle):"); + ImGui::Image(inflowTexture.RenderHandle.idx, {64.0f, 64.0f}); + ImGui::Text("Abfluss (Ziel):"); + ImGui::Image(outflowTexture.RenderHandle.idx, {64.0f, 64.0f}); + ImGui::Text("Verbindung:"); + ImGui::Image(connectionTexture.RenderHandle.idx, {64.0f, 64.0f}); + } + ImGui::End(); + if (rendering.UIVisible == Game::UIVisibilityState::Debug) { if (ImGui::IsMouseClicked(ImGuiMouseButton_Right)) diff --git a/src/game/data/puzzles/0.pzl b/src/game/data/puzzles/0.pzl index c5bb8a7..e5f040d 100644 --- a/src/game/data/puzzles/0.pzl +++ b/src/game/data/puzzles/0.pzl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32793e740401f8e9f561da0ab87ab3870c4e92d8ed554ae790a0de7ea035eca5 +oid sha256:ec5fe55b7e5d26428ba3781eb8c5ec4612602b86edd08391892c0c57de4842fd size 11441 diff --git a/src/game/data/static/puzzle.dat b/src/game/data/static/puzzle.dat index 4e080a710b6dd0eef41a41ea341aeb54bfe275e0..d621fa85dede163cf4bf7323bbf3a3f48bb349fb 100644 GIT binary patch delta 133 zcmZ2Fm2v4*#tkVz>% diff --git a/src/game/rendering/Rendering.h b/src/game/rendering/Rendering.h index 3d947e3..7a58c3d 100644 --- a/src/game/rendering/Rendering.h +++ b/src/game/rendering/Rendering.h @@ -116,7 +116,7 @@ namespace Game uint32_t ResetFlags = BGFX_RESET_VSYNC; uint16_t MainViewID = 10; float LastShaderLoadTime = 0.0f; - int32_t DitherRecursion = 3; + int32_t DitherRecursion = 1; public: void Setup(const RenderingSetup& setup); diff --git a/src/models/w straight.glb b/src/models/w straight.glb index 11c12bb..48e0d0c 100644 --- a/src/models/w straight.glb +++ b/src/models/w straight.glb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92b791bcf83682b3ededa9807aa19274ea9baf391c5693cf3f361f5438597d1b -size 7776 +oid sha256:60e5580f5a5c732a2eefa6f9893714da3a6bc20bb7b50faba181836d00ff581f +size 9408 diff --git a/src/textures/w corner long.ktx b/src/textures/w corner long.ktx index c0ba125..a6a73a3 100644 --- a/src/textures/w corner long.ktx +++ b/src/textures/w corner long.ktx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5634d0a3109f42421c5bbc5cfa377b7472102fc6120226dfa550c8ed6c17bc3 +oid sha256:2d9cefdf5f6cbddf46b6a670c08e7a6f779a046f36f3fbdf67c19b9509a9cb4e size 1048644 diff --git a/src/textures/w straight.ktx b/src/textures/w straight.ktx index 9731165..667a1c0 100644 --- a/src/textures/w straight.ktx +++ b/src/textures/w straight.ktx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7fad9faf7f8cf3873ba4f92abba9a6e23102b78368db87956f27b2ffdc7cd016 +oid sha256:c5f40932831303a66a901702649efc6fe1be61ac7bd60d5da68727543bb947fc size 1048644