diff options
Diffstat (limited to 'src/building')
| -rw-r--r-- | src/building/inc/building.h | 1 | ||||
| -rw-r--r-- | src/building/src/building.c | 14 |
2 files changed, 1 insertions, 14 deletions
diff --git a/src/building/inc/building.h b/src/building/inc/building.h index a0ab539..7c7d45f 100644 --- a/src/building/inc/building.h +++ b/src/building/inc/building.h @@ -31,7 +31,6 @@ struct building_cfg void building_create(const struct building_cfg *cfg, struct building *b); void building_set_alive_cb(void (*f)(const struct util_rect *dim, bool alive, void *p), void *p); int building_render(const struct building *b, const struct camera *cam, bool sel); -instance_hp building_maxhp(const struct building *b); const char *building_str(const struct building *b); extern struct sprite building_sprites[MAX_BUILDING_TYPES]; diff --git a/src/building/src/building.c b/src/building/src/building.c index 5ff9183..457d9e6 100644 --- a/src/building/src/building.c +++ b/src/building/src/building.c @@ -6,16 +6,6 @@ struct sprite building_sprites[MAX_BUILDING_TYPES]; -instance_hp building_maxhp(const struct building *const b) -{ - static const instance_hp hp[] = - { - [BUILDING_TYPE_BARRACKS] = 100 - }; - - return hp[b->type]; -} - int building_render(const struct building *const b, const struct camera *const cam, const bool sel) { @@ -33,8 +23,7 @@ int building_render(const struct building *const b, .prim_type = INSTANCE_RENDER_CFG_SPRITE, .prim = {.s = s}, .cam = cam, - .sel = sel, - .max_hp = building_maxhp(b) + .sel = sel }; return instance_render(&cfg); @@ -69,7 +58,6 @@ void building_create(const struct building_cfg *const cfg, i->r.x = cfg->x; i->r.y = cfg->y; i->alive = true; - i->hp = building_maxhp(b); if (cb) cb(&i->r, i->alive, op); |
