From eac2d676d65d74c2b89ca36587e702c0b8f55d8d Mon Sep 17 00:00:00 2001 From: Klemen Plestenjak Date: Thu, 7 Dec 2023 18:32:49 +0100 Subject: [PATCH] Remove formations for now --- game/input.h | 3 +-- game/main.c | 4 ---- game/systems_input.c | 2 ++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/game/input.h b/game/input.h index 3fdef74..4f2314a 100644 --- a/game/input.h +++ b/game/input.h @@ -46,7 +46,7 @@ typedef struct InputState { bool buildingCanPlace; TilePosition buildingPos; TileSize buildingSize; - // Units + // SELECTED_UNITS Rectangle pickArea; struct { @@ -58,7 +58,6 @@ typedef struct InputState { ecs_query_t *selected; //ecs_query_t *selectedBuilding; } queries; - Position *unitPositions; // SELECTED_OBJECT // SELECTED_BUILDING } InputState; diff --git a/game/main.c b/game/main.c index e4b7a85..52dbb19 100644 --- a/game/main.c +++ b/game/main.c @@ -75,9 +75,6 @@ bool init(void *userData) { } }); - input->unitPositions = bzArrayCreate(Position, 16); - - game->stackAlloc = bzStackAllocCreate(10 * 1000 * 1000); // 10 MB // init pools game->pools.pathData = bzObjectPoolCreate(&(BzObjectPoolDesc) { @@ -193,7 +190,6 @@ void deinit(void *userData) { ecs_fini(ECS); ECS = NULL; - bzArrayDestroy(inputCopy.unitPositions); bzStackAllocDestroy(&gameCopy.stackAlloc); bzObjectPoolDestroy(gameCopy.pools.pathData); bzSpatialGridDestroy(gameCopy.entityGrid); diff --git a/game/systems_input.c b/game/systems_input.c index b6d11d7..614056c 100644 --- a/game/systems_input.c +++ b/game/systems_input.c @@ -272,6 +272,7 @@ void drawPlayerInputUI() { } case INPUT_SELECTED_UNITS: { BZ_ASSERT(selectedUnitCount); + /* if (selectedUnitCount > 1 && isInputBtnDragged(input, primaryBtn)) { i32 numUnits = selectedUnitCount; f32 unitSpacing = 3.5f; @@ -285,6 +286,7 @@ void drawPlayerInputUI() { DrawCircle(pos.x, pos.y, 2.0f, ORANGE); } } + */ Rectangle area = {input->mouseWorld.x, input->mouseWorld.y, 1, 1}; DrawCircle(area.x, area.y, 4.0f, BLUE);