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/building/inc/building_type.h | 2 -- src/building/src/building.c | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/building') diff --git a/src/building/inc/building_type.h b/src/building/inc/building_type.h index eca76b4..8b461f7 100644 --- a/src/building/inc/building_type.h +++ b/src/building/inc/building_type.h @@ -3,8 +3,6 @@ enum building_type { - BUILDING_TYPE_BARRACKS, - MAX_BUILDING_TYPES }; diff --git a/src/building/src/building.c b/src/building/src/building.c index 457d9e6..826ebe1 100644 --- a/src/building/src/building.c +++ b/src/building/src/building.c @@ -35,10 +35,7 @@ static void get_dimensions(const enum building_type type, short *const w, static const struct dim { short w, h; - } dim[] = - { - [BUILDING_TYPE_BARRACKS] = {.w = 68, .h = 66} - }; + } dim[1]; const struct dim *const d = &dim[type]; *w = d->w; @@ -72,10 +69,7 @@ void building_set_alive_cb(void (*const f)(const struct util_rect *, bool, void const char *building_str(const struct building *const b) { - static const char *const str[] = - { - [BUILDING_TYPE_BARRACKS] = "Barracks" - }; + static const char *const str[1]; return str[b->type]; } -- cgit v1.2.3