generate type data
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
namespace Tools
|
||||
{
|
||||
void ModelDropdown(uint16_t& modelHandle);
|
||||
void ModelDropdown(uint32_t& modelHandle);
|
||||
} // namespace Tools
|
||||
|
||||
@@ -59,7 +59,7 @@ enum PuzzleElementType(u8)
|
||||
type StaticPuzzleCard
|
||||
{
|
||||
PuzzleElementType Elements Arr(4)
|
||||
u16 ModelHandle
|
||||
u32 ModelHandle
|
||||
}
|
||||
|
||||
type StaticPuzzleCardHandle
|
||||
|
||||
Reference in New Issue
Block a user