generate type data

This commit is contained in:
Asuro
2025-03-20 20:18:40 +01:00
parent e16c9e0a2f
commit 551796e7ad
19 changed files with 332 additions and 23 deletions

View File

@@ -1,9 +1,12 @@
#include "../gen/Def.h"
#include "Global.h"
#include "Input.h"
#include "Instance.h"
#include "Level.h"
#include "Log.h"
#include "Puzzle.h"
#include "rendering/Rendering.h"
#include "SDL3/SDL_mouse.h"
#include "bgfx/bgfx.h"
#include "bx/error.h"
@@ -11,7 +14,6 @@
#include "bx/filepath.h"
#include "bx/string.h"
#include "imgui.h"
#include "rendering/Rendering.h"
#include <SDL3/SDL.h>
#include <bx/math.h>
#include <cstdint>

View File

@@ -1,3 +1,4 @@
#include "../gen/Def.h"
#include "Global.h"
#include "Instance.h"
#include "Log.h"
@@ -192,10 +193,6 @@ namespace Puzzle
continue;
if (IsValidGoalConnection(puzzle, nextPos, currentPos, goalType))
{
if (nextPos.X == 0 && nextPos.Y == 4)
{
LOG("test");
}
if (IsValidSource(GetNodeAt(puzzle, nextPos), goalType))
{
return true;

View File

@@ -1,6 +1,7 @@
#include "Global.h"
#include "Instance.h"
#include "Tools.h"
#include "bx/string.h"
#include "rendering/Rendering.h"
#include <imgui.h>
@@ -20,15 +21,24 @@ namespace Tools
return "---";
}
void ModelDropdown(uint16_t& modelHandle)
void ModelDropdown(uint32_t& modelHandle)
{
auto& R = Game::GameRendering::Get();
const char* name = GetAssetPath(R.Models[modelHandle].AssetHandle);
const char* name = GetAssetPath(modelHandle);
int32_t idx = -1;
for (int32_t i = 0; i < R.ModelCount; ++i)
{
if (R.Models[i].AssetHandle == modelHandle)
{
idx = i;
break;
}
}
if (ImGui::BeginCombo("Models", name))
{
for (int32_t i = 0; i < R.ModelCount; ++i)
{
if (ImGui::Selectable(GetAssetPath(R.Models[i].AssetHandle), i == modelHandle))
if (ImGui::Selectable(GetAssetPath(R.Models[i].AssetHandle), i == idx))
{
modelHandle = i;
}

View File

@@ -3,5 +3,5 @@
namespace Tools
{
void ModelDropdown(uint16_t& modelHandle);
void ModelDropdown(uint32_t& modelHandle);
} // namespace Tools

View File

@@ -59,7 +59,7 @@ enum PuzzleElementType(u8)
type StaticPuzzleCard
{
PuzzleElementType Elements Arr(4)
u16 ModelHandle
u32 ModelHandle
}
type StaticPuzzleCardHandle