From 27553f8ed1d062c4d8175e7376f5b16cf2c8f9ef Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 27 Jan 2024 14:14:37 +0100 Subject: Remove stale unit and building types --- src/player/src/player.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'src/player') diff --git a/src/player/src/player.c b/src/player/src/player.c index e1932a5..5a69763 100644 --- a/src/player/src/player.c +++ b/src/player/src/player.c @@ -61,43 +61,6 @@ int player_create_building(const struct building_cfg *const cfg, struct player * int player_init(const struct player_cfg *const cfg, struct player *const pl) { - const unsigned long x = cfg->x, y = cfg->y; - - const struct building_cfg bcfg = - { - .type = BUILDING_TYPE_BARRACKS, - .x = x, - .y = y - }; - - const struct unit_cfg cfgs[] = - { - { - .type = UNIT_TYPE_PEASANT, - .x = x + 80, - .y = y - }, - - { - .type = UNIT_TYPE_PEASANT, - .x = x + 80, - .y = y + 40 - }, - - { - .type = UNIT_TYPE_PEASANT, - .x = x + 100, - .y = y + 20 - } - }; - - if (player_create_building(&bcfg, pl)) - return -1; - - for (size_t i = 0; i < sizeof cfgs / sizeof *cfgs; i++) - if (player_create_unit(&cfgs[i], pl)) - return -1; - pl->alive = true; pl->color = cfg->color; pl->team = cfg->team; -- cgit v1.2.3