card rotation
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
#pragma once
|
||||
#include "Serial.h"
|
||||
#include <cstdint>
|
||||
#include <imgui.h>
|
||||
|
||||
#include "../../gen/Generated.h"
|
||||
|
||||
namespace Puzzle
|
||||
{
|
||||
using namespace Generated;
|
||||
|
||||
constexpr const char* PuzzleFileDir = "game/data/puzzles/";
|
||||
|
||||
struct Config
|
||||
{
|
||||
static constexpr uint32_t CardSize = 2;
|
||||
@@ -19,23 +23,18 @@ namespace Puzzle
|
||||
static constexpr uint32_t MaxAvailableStacks = 16;
|
||||
static constexpr uint32_t MaxGoalPositions = 16;
|
||||
};
|
||||
} // namespace Puzzle
|
||||
|
||||
namespace Generated
|
||||
{
|
||||
PuzPos operator+=(PuzPos lhs, const PuzPos& rhs);
|
||||
PuzPos operator+(PuzPos lhs, const PuzPos& rhs);
|
||||
|
||||
void Setup();
|
||||
StaticPuzzleData& GetStaticPuzzleData();
|
||||
void LoadStaticPuzzleData();
|
||||
void SaveStaticPuzzleData();
|
||||
const StaticPuzzleCard& GetCard(const StaticPuzzleData& data, StaticPuzzleCardHandle H);
|
||||
const StaticPuzzleCard& GetCard(StaticPuzzleCardHandle H);
|
||||
bool IsValid(StaticPuzzleCardHandle h);
|
||||
uint8_t GetRemainingCount(const PuzzleCardStack& stack);
|
||||
PuzzleElementType::Enum GetNodeAt(const PuzzleData& puz, PuzPos pos);
|
||||
PuzzleElementType::Enum GetCardNodeAt(const StaticPuzzleCard& card, int8_t x, int8_t y);
|
||||
PuzzleElementType::Enum& EditCardNodeAt(StaticPuzzleCard& card, int8_t x, int8_t y);
|
||||
PuzzleElementType::Enum GetCardNodeAt(const StaticPuzzleCard& card, uint8_t rotation, int8_t x, int8_t y);
|
||||
PuzzleElementType::Enum& EditCardNodeAt(StaticPuzzleCard& card, uint8_t rotation, int8_t x, int8_t y);
|
||||
void DrawCard(const StaticPuzzleCard& card, uint8_t rotation, ImVec2 pos);
|
||||
|
||||
struct PuzzleSolver
|
||||
{
|
||||
@@ -50,4 +49,10 @@ namespace Generated
|
||||
bool IsValidSource(PuzzleElementType::Enum sourceType, PuzzleElementType::Enum goalType);
|
||||
};
|
||||
bool RenderDebugUI(PuzzleData& obj);
|
||||
} // namespace Puzzle
|
||||
|
||||
namespace Generated
|
||||
{
|
||||
PuzPos operator+=(PuzPos lhs, const PuzPos& rhs);
|
||||
PuzPos operator+(PuzPos lhs, const PuzPos& rhs);
|
||||
} // namespace Generated
|
||||
|
||||
Reference in New Issue
Block a user