implement state editing

This commit is contained in:
2026-02-20 00:58:01 +01:00
parent ca83d5724f
commit f8ac60f6a6
6 changed files with 166 additions and 29 deletions

View File

@ -20,7 +20,7 @@ constexpr int MENU_COLS = 3;
// Camera Controls
constexpr float SIM_SPEED = 4.0;
constexpr float CAMERA_FOV = 120.0;
constexpr float CAMERA_DISTANCE = 100.0;
constexpr float CAMERA_DISTANCE = 20.0;
constexpr float MIN_CAMERA_DISTANCE = 2.0;
constexpr float MAX_CAMERA_DISTANCE = 2000.0;
constexpr float ZOOM_SPEED = 2.5;

View File

@ -252,7 +252,15 @@ public:
public:
auto Hash() const -> int;
auto AddBlock(Block block) -> bool;
auto AddColumn() const -> State;
auto RemoveColumn() const -> State;
auto AddRow() const -> State;
auto RemoveRow() const -> State;
auto AddBlock(const Block &block) -> bool;
auto GetBlock(int x, int y) const -> Block;

View File

@ -92,10 +92,10 @@ public:
const State &current) -> void;
auto DrawKlotski(const State &state, int hov_x, int hov_y, int sel_x,
int sel_y) -> void;
int sel_y, int block_add_x, int block_add_y) -> void;
auto DrawMenu(const MassSpringSystem &masssprings, int current_preset)
-> void;
auto DrawMenu(const MassSpringSystem &masssprings, int current_preset,
const State &current_state) -> void;
auto DrawTextures() -> void;
};