From 0aef4f319caa2572d459b18e4e994122d53abcbe Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 27 Jan 2024 15:58:53 +0100 Subject: Remove resource, tech and old game resources --- src/resource/inc/resource.h | 58 ---------------------------------------- src/resource/inc/resource_type.h | 21 --------------- 2 files changed, 79 deletions(-) delete mode 100644 src/resource/inc/resource.h delete mode 100644 src/resource/inc/resource_type.h (limited to 'src/resource/inc') diff --git a/src/resource/inc/resource.h b/src/resource/inc/resource.h deleted file mode 100644 index aa7f1bd..0000000 --- a/src/resource/inc/resource.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef RESOURCE_H -#define RESOURCE_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -enum {RESOURCE_GOLD_CAPACITY = 2}; - -struct resource -{ - struct instance instance; - enum resource_type type; - - union - { - struct resource_gold - { - struct instance *miners[RESOURCE_GOLD_CAPACITY]; - size_t n_miners; - } gold; - } res; -}; - -UTIL_STATIC_ASSERT(!offsetof(struct resource, instance), "must be at offset zero"); - -struct resource_cfg -{ - enum resource_type type; - unsigned long x, y; -}; - -const struct container_list *resource_res(void); -void resource_set_alive_cb(void (*f)(const struct util_rect *dim, bool alive, void *p), void *p); -int resource_create(const struct resource_cfg *cfg, struct resource *list, size_t n); -int resource_render(const struct resource *res, const struct camera *cam, bool sel); -instance_sheltered_cb resource_shelter(const struct resource *res); -bool resource_harvested(struct instance *i, instance_hp ap); -instance_hp resource_maxhp(const struct resource *res); -const char *resource_str(const struct resource *res); - -extern struct sprite resource_sprites[MAX_RESOURCE_TYPES]; - -#ifdef __cplusplus -} -#endif - -#endif /* RESOURCE_H */ diff --git a/src/resource/inc/resource_type.h b/src/resource/inc/resource_type.h deleted file mode 100644 index 8a41148..0000000 --- a/src/resource/inc/resource_type.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef RESOURCE_TYPE_H -#define RESOURCE_TYPE_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -enum resource_type -{ - RESOURCE_TYPE_WOOD, - RESOURCE_TYPE_GOLD, - - MAX_RESOURCE_TYPES -}; - -#ifdef __cplusplus -} -#endif - -#endif /* RESOURCE_TYPE_H */ -- cgit v1.2.3