fix upgrades one more time

This commit is contained in:
Asuro
2025-05-10 18:12:15 +02:00
parent 5d1db591b7
commit 1616704c50
19 changed files with 210 additions and 104 deletions

View File

@@ -48,7 +48,7 @@ namespace Game
float FreeflyYRot = 0.0f;
float WalkXRot = 0.0f;
float WalkYRot = 0.0f;
CameraMode CameraM = CameraMode::Freefly;
CameraMode CameraM = CameraMode::Walk;
InputMode InputM = InputMode::Game;
InteractionMode InteractionM = InteractionMode::Walk;
float MouseSensitivity = 1.0f;

View File

@@ -521,7 +521,8 @@ namespace Game
// World Tile
tile.EData.Visible = IsActive;
tile.EData.ModelH = isValid ? staticCards[card.RefCard.Idx].ModelHandle : staticCards[0].ModelHandle;
tile.EData.ModelH =
isValid ? staticCards[card.RefCard.Idx].BaseModelHandle : staticCards[0].BaseModelHandle;
tile.EData.DotColor = visuals.TileDotColor;
tile.EData.BaseColor = visuals.TileBaseColor;

View File

@@ -50,12 +50,12 @@ namespace Tools
return changed;
}
bool ModelDropdown(Gen::ModelHandle& modelHandle)
bool ModelDropdown(Gen::ModelHandle& modelHandle, const char* name)
{
bool changed = false;
auto& R = Game::GameRendering::Get();
const char* name = GetAssetPath(modelHandle.Asset);
if (ImGui::BeginCombo("Model", name))
const char* assetName = GetAssetPath(modelHandle.Asset);
if (ImGui::BeginCombo(name, assetName))
{
for (int32_t i = 0; i < R.ModelCount; ++i)
{
@@ -360,34 +360,15 @@ namespace Tools
ImGui::End();
if (ImGui::Begin("Puzzles"))
{
if (ImGui::Button("Add"))
{
bool found = false;
for (int32_t i = 0; i < BX_COUNTOF(level.Puzzles); ++i)
{
auto& puz = level.Puzzles[i].Data;
if (puz.ID == UINT16_MAX)
{
bx::strCopy(puz.PuzzleName, sizeof(puz.PuzzleName), "Unnamed Puzzle");
puz.ID = i;
found = true;
break;
}
}
if (!found)
{
LOG_ERROR("Too many puzzles!");
}
}
ImGui::Separator();
char nameBuf[64]{0};
for (int32_t i = 0; i < BX_COUNTOF(level.Puzzles); ++i)
{
auto& puzzleData = level.Puzzles[i].Data;
if (puzzleData.ID == UINT16_MAX) continue;
bool isSelected = debug.SelectedDebugLevel == i;
ImGui::PushID("selectable");
if (ImGui::Selectable(puzzleData.PuzzleName, isSelected))
bx::snprintf(nameBuf, sizeof(nameBuf), "%u: %s", i, puzzleData.PuzzleName);
if (ImGui::Selectable(nameBuf, isSelected))
{
debug.SelectedDebugLevel = isSelected ? UINT16_MAX : i;
}
@@ -438,8 +419,19 @@ namespace Tools
ImGui::EndDragDropSource();
}
Tools::ModelDropdown(card.ModelHandle);
Tools::ModelDropdown(card.BaseModelHandle);
Tools::TextureDropdown(card.BoardTextureHandle);
if (ImGui::TreeNodeEx("Covers"))
{
Tools::ModelDropdown(card.NorthCoverHandle, "North Cover");
Tools::ModelDropdown(card.EastCoverHandle, "East Cover");
Tools::ModelDropdown(card.SouthCoverHandle, "South Cover");
Tools::ModelDropdown(card.WestCoverHandle, "West Cover");
ImGui::TreePop();
}
ImGui::Text("Card");
for (int8_t y = 0; y < Puzzle::Config::CardSize; ++y)
{
ImGui::PushID(y);

View File

@@ -5,7 +5,7 @@
namespace Tools
{
bool EntityDataSettings(Gen::SavedEntityRenderData& data);
bool ModelDropdown(Gen::ModelHandle& modelHandle);
bool ModelDropdown(Gen::ModelHandle& modelHandle, const char* name = "Model");
bool TextureDropdown(Gen::TextureHandle& texHandle);
bool MaterialDropdown(Gen::EMaterial::Enum& material);
bool TransformUI(Gen::Transform& transform);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -85,7 +85,11 @@ enum PuzzleElementType(u8)
type StaticPuzzleCard
{
PuzzleElementType Elements Arr(4)
ModelHandle ModelHandle
ModelHandle BaseModelHandle
ModelHandle NorthCoverHandle
ModelHandle EastCoverHandle
ModelHandle SouthCoverHandle
ModelHandle WestCoverHandle
TextureHandle ModelTextureHandle
TextureHandle BoardTextureHandle
}