summaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index dbf1e41..31001f7 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -147,7 +147,8 @@ namespace game {
bool populate_pie_menu(std::vector<interface::pie_item_t> &items);
void command(v2f_t x, int number);
- size_t crystals = 150;
+ size_t crystals = 9999;
+ //size_t crystals = 150;
};
enum {
@@ -170,12 +171,13 @@ namespace game {
enum {
CF_SURFACE = 1,
- CF_BACKGROUND = 2,
- CF_SOLID = 4,
- CF_BODY = 8,
- CF_BODY_SMALL = 16,
- CF_WATER = 32,
- CF_DECOS = 64
+ CF_SURFACE2 = 2, // entities on the surface (FIXME: the name)
+ CF_BACKGROUND = 4,
+ CF_SOLID = 8,
+ CF_BODY = 16,
+ CF_BODY_SMALL = 32,
+ CF_WATER = 64,
+ CF_DECOS = 128
};
enum {
@@ -230,7 +232,7 @@ namespace game {
} nest_assets_t;
typedef struct {
- render::animated_texture_t idle, avatar;
+ render::animated_texture_t idle, unfinished, avatar;
audio::sound_t sound, damage;
} repl_assets_t;
@@ -352,6 +354,9 @@ namespace game {
void try_attack(unit_t *target);
void die(unit_t *killer);
+ // FIXME: move buildings to another class
+ bool constructed = true;
+
virtual void on_damage(unit_t *attacker) = 0;
virtual void on_death(void) = 0;
@@ -426,18 +431,18 @@ namespace game {
class unit_builder_t : public unit_t {
bool gibbed = false;
+
+ bool repairing = false, building;
+ v2f_t repairing_at;
+ void repair(void);
ntime_t next_repair = 0, last_repair = 0;
+ std::unique_ptr<fx_aim_marker_t> repair_marker;
public:
std::unique_ptr<fx_move_marker_t> move_marker;
- std::unique_ptr<fx_aim_marker_t> repair_marker;
sf::Color selection_color;
- bool repairing = false, repaired;
- v2f_t repairing_at;
- void repair(void);
-
unit_builder_t(game::state_t *game_);
~unit_builder_t(void) {};
void render_to(render::state_t *render);
@@ -448,6 +453,10 @@ namespace game {
void on_wake(void) {};
void on_damage(unit_t *attacker);
void on_death(void);
+
+ void command_repair(v2f_t where);
+ void command_build(v2f_t where, type_t what);
+ void command_stop(void);
};
class unit_spider_t : public unit_t {