Compare commits
3 Commits
4e00355dbe
...
42c5b55f95
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42c5b55f95 | ||
|
|
d7fc6b781e | ||
|
|
e15cd79e04 |
Binary file not shown.
BIN
assets/textures/w straight.png
LFS
BIN
assets/textures/w straight.png
LFS
Binary file not shown.
@@ -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;
|
||||
}
|
||||
@@ -241,10 +242,26 @@ namespace Game
|
||||
float fracOffsetY = scaledOffset.z - offsetY;
|
||||
int32_t xPos = (int32_t)(fracOffsetX * heightmap.Width);
|
||||
int32_t yPos = (int32_t)(fracOffsetY * heightmap.Height);
|
||||
uint8_t height = heightmap.Values[yPos * heightmap.Width + xPos];
|
||||
|
||||
LOG("Height: %u", height);
|
||||
return height > 230;
|
||||
uint8_t height = 0;
|
||||
switch (card.Rotation)
|
||||
{
|
||||
case 0:
|
||||
height = heightmap.Values[yPos * heightmap.Width + xPos];
|
||||
break;
|
||||
case 1:
|
||||
height = heightmap.Values[(heightmap.Height - xPos - 1) * heightmap.Width + yPos];
|
||||
break;
|
||||
case 2:
|
||||
height =
|
||||
heightmap
|
||||
.Values[(heightmap.Height - yPos - 1) * heightmap.Width + (heightmap.Width - xPos - 1)];
|
||||
break;
|
||||
default:
|
||||
height = heightmap.Values[xPos * heightmap.Width + (heightmap.Height - yPos - 1)];
|
||||
break;
|
||||
}
|
||||
return height >= 110 && height <= 125;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -117,6 +117,8 @@ namespace Game
|
||||
}
|
||||
LOG("min/max: %lli", bx::getHPCounter() - startTime);
|
||||
|
||||
mesh.MinPos = {-5.0f, -5.0f, -5.0f};
|
||||
mesh.MaxPos = {5.0f, 5.0f, 5.0f};
|
||||
mesh.Size = mesh.MaxPos - mesh.MinPos;
|
||||
|
||||
startTime = bx::getHPCounter();
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Game
|
||||
{
|
||||
quad.UIPos = Vec3{cardIdx * 0.05f + stackIdx * 1.2f,
|
||||
4.2f + (cardIdx % 2 == 0 ? 0.02f : 0.0f),
|
||||
cardIdx * 0.001f} *
|
||||
cardIdx * 0.001f - 0.3f} *
|
||||
UICardOffset * UICardScale;
|
||||
UpdateQuad(level.UIQuads, h);
|
||||
quad.EData.Visible = true;
|
||||
@@ -219,7 +219,7 @@ namespace Game
|
||||
bool isLocked = GetFlag(card.Flags, PlacedPuzzleCardFlags::Locked);
|
||||
|
||||
auto& quad = level.UIQuads.Get(UIPlacedCards[cardIdx]);
|
||||
quad.UIPos = Vec3{(float)card.Position.X, (float)card.Position.Y, 0.0f} * UICardOffset * UICardScale;
|
||||
quad.UIPos = Vec3{(float)card.Position.X, (float)card.Position.Y, -0.3f} * UICardOffset * UICardScale;
|
||||
quad.UIPos -= boardOffset;
|
||||
quad.UIRot = card.Rotation * bx::kPi * 0.5f;
|
||||
UpdateQuad(level.UIQuads, UIPlacedCards[cardIdx]);
|
||||
@@ -339,11 +339,6 @@ namespace Game
|
||||
// NOLINTEND
|
||||
uiOffset *= -UICardOffset * 0.5f;
|
||||
|
||||
Transform tileOriginTransform = StaticData.UITransform;
|
||||
tileOriginTransform.Position += AxisForward(StaticData.UITransform.M) * -1.0f;
|
||||
TranslateLocal(tileOriginTransform, Vec3{uiOffset.x, 0.0f, uiOffset.y} * 1.0f);
|
||||
UpdateMatrix(tileOriginTransform);
|
||||
|
||||
auto& solvedQuad = level.UIQuads.Get(SolvedQuad);
|
||||
solvedQuad.EData.Visible = true;
|
||||
solvedQuad.EData.TextureHandle = IsPuzzleSolved ? GetInstance().Player.Config.TabletStatusSolvedTexture
|
||||
|
||||
BIN
src/game/data/puzzles/0.pzl
LFS
BIN
src/game/data/puzzles/0.pzl
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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);
|
||||
|
||||
BIN
src/models/w straight.glb
LFS
BIN
src/models/w straight.glb
LFS
Binary file not shown.
BIN
src/textures/w corner long.ktx
LFS
BIN
src/textures/w corner long.ktx
LFS
Binary file not shown.
BIN
src/textures/w straight.ktx
LFS
BIN
src/textures/w straight.ktx
LFS
Binary file not shown.
Reference in New Issue
Block a user