diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-01-27 13:54:57 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-01-27 17:38:11 +0100 |
| commit | b4f904ecdcf6b0857d28ab4a877ad0f3468153f7 (patch) | |
| tree | 656b7c75ff57963e18dac972e38baf9ba3d46ddb /src/building | |
| parent | 69f753d26f44c28668d23e0ba40bb3994141df82 (diff) | |
| download | jancity-b4f904ecdcf6b0857d28ab4a877ad0f3468153f7.tar.gz | |
Remove hp
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); |
