This commit is contained in:
Till Wübbers
2025-03-09 20:42:37 +01:00
parent 96a122f932
commit aaf397fef6
5 changed files with 58 additions and 12 deletions

View File

@@ -72,7 +72,6 @@ void DefinitionFile::GenerateCpp(const bx::FilePath& outDir)
bx::Error error; bx::Error error;
bx::FileWriter writer; bx::FileWriter writer;
bx::FilePath writePath = outDir; bx::FilePath writePath = outDir;
std::filesystem::create_directory(outDir.getCPtr()); std::filesystem::create_directory(outDir.getCPtr());
writePath.join("Generated.h"); writePath.join("Generated.h");
writer.open(writePath, false, &error); writer.open(writePath, false, &error);

View File

@@ -1,9 +1,6 @@
#include <cstdlib> #include <cstdlib>
#include <cwchar> #include <cwchar>
#include <fileapi.h>
#include <fstream> #include <fstream>
#include <processthreadsapi.h>
#include <synchapi.h>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h> #include <Windows.h>
#undef min #undef min

View File

@@ -5,7 +5,6 @@
#include "bx/math.h" #include "bx/math.h"
#include <cassert> #include <cassert>
#include <cstdint> #include <cstdint>
#include <minwindef.h>
namespace namespace
{ {

View File

@@ -2,8 +2,8 @@
#include "bx/handlealloc.h" #include "bx/handlealloc.h"
#include "bx/hash.h" #include "bx/hash.h"
#include <bx/string.h> #include <bx/string.h>
#define WIN32_LEAN_AND_MEAN
#include <debugapi.h> #include "Windows.h"
#define ESC "\x1B[" #define ESC "\x1B["
#define YELLOW ESC "33m" #define YELLOW ESC "33m"

View File

@@ -1,8 +1,59 @@
type PuzPos
{
i8 X
i8 Y
}
type ElemPos
{
PuzPos Position
u8 ElemIdx
}
enum PuzzleElementType Type(u8)
{
None,
WaterIn,
WaterGoal,
WaterChannel,
ElectricIn,
ElectricGoal,
Blocked,
Bridge,
}
type PuzzleNode
{
PuzzleElementType PlacedTypes
}
type StaticPuzzleCard
{
PuzzleNode Nodes Arr(8)
u16 ModelHandle
}
type StaticPuzzleCardHandle
{
u16 Idx
}
type PuzzleCardStack
{
StaticPuzzleCardHandle RefCard
u8 MaxAvailableCount
u8 UsedCount
}
type PuzzleData type PuzzleData
{ {
u8 WidthTiles u8 WidthTiles
u8 HeightTiles u8 HeightTiles
u32 AvailableCardCount u32 AvailableCardCount
u32 PlacedCardCount PuzzleCardStack AvailableCards Arr(8)
u32 GoalPositionCount u32 PlacedCardCount
PlacedPuzzleCard PlacedCards Arr(8)
PuzzleNode PlacedNodes Arr(8)
u32 GoalPositionCount
ElemPos GoalPositions
} }