Remove formations for now

This commit is contained in:
2023-12-07 18:32:49 +01:00
parent 85511812b5
commit eac2d676d6
3 changed files with 3 additions and 6 deletions

View File

@@ -46,7 +46,7 @@ typedef struct InputState {
bool buildingCanPlace; bool buildingCanPlace;
TilePosition buildingPos; TilePosition buildingPos;
TileSize buildingSize; TileSize buildingSize;
// Units // SELECTED_UNITS
Rectangle pickArea; Rectangle pickArea;
struct { struct {
@@ -58,7 +58,6 @@ typedef struct InputState {
ecs_query_t *selected; ecs_query_t *selected;
//ecs_query_t *selectedBuilding; //ecs_query_t *selectedBuilding;
} queries; } queries;
Position *unitPositions;
// SELECTED_OBJECT // SELECTED_OBJECT
// SELECTED_BUILDING // SELECTED_BUILDING
} InputState; } InputState;

View File

@@ -75,9 +75,6 @@ bool init(void *userData) {
} }
}); });
input->unitPositions = bzArrayCreate(Position, 16);
game->stackAlloc = bzStackAllocCreate(10 * 1000 * 1000); // 10 MB game->stackAlloc = bzStackAllocCreate(10 * 1000 * 1000); // 10 MB
// init pools // init pools
game->pools.pathData = bzObjectPoolCreate(&(BzObjectPoolDesc) { game->pools.pathData = bzObjectPoolCreate(&(BzObjectPoolDesc) {
@@ -193,7 +190,6 @@ void deinit(void *userData) {
ecs_fini(ECS); ecs_fini(ECS);
ECS = NULL; ECS = NULL;
bzArrayDestroy(inputCopy.unitPositions);
bzStackAllocDestroy(&gameCopy.stackAlloc); bzStackAllocDestroy(&gameCopy.stackAlloc);
bzObjectPoolDestroy(gameCopy.pools.pathData); bzObjectPoolDestroy(gameCopy.pools.pathData);
bzSpatialGridDestroy(gameCopy.entityGrid); bzSpatialGridDestroy(gameCopy.entityGrid);

View File

@@ -272,6 +272,7 @@ void drawPlayerInputUI() {
} }
case INPUT_SELECTED_UNITS: { case INPUT_SELECTED_UNITS: {
BZ_ASSERT(selectedUnitCount); BZ_ASSERT(selectedUnitCount);
/*
if (selectedUnitCount > 1 && isInputBtnDragged(input, primaryBtn)) { if (selectedUnitCount > 1 && isInputBtnDragged(input, primaryBtn)) {
i32 numUnits = selectedUnitCount; i32 numUnits = selectedUnitCount;
f32 unitSpacing = 3.5f; f32 unitSpacing = 3.5f;
@@ -285,6 +286,7 @@ void drawPlayerInputUI() {
DrawCircle(pos.x, pos.y, 2.0f, ORANGE); DrawCircle(pos.x, pos.y, 2.0f, ORANGE);
} }
} }
*/
Rectangle area = {input->mouseWorld.x, input->mouseWorld.y, 1, 1}; Rectangle area = {input->mouseWorld.x, input->mouseWorld.y, 1, 1};
DrawCircle(area.x, area.y, 4.0f, BLUE); DrawCircle(area.x, area.y, 4.0f, BLUE);