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.hpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index a173b7e..20b2b41 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -21,7 +21,8 @@ namespace game {
enum {
ET_UNIT,
ET_EFFECT,
- ET_DECO
+ ET_DECO,
+ ET_ROCKET
};
enum {
@@ -61,6 +62,7 @@ namespace game {
render::oriented_sprite_4M_t body_aiming, body_firing;
render::oriented_sprite_4M2_t legs_idle, legs_walking;
render::animated_texture_t dead, gibbing;
+ render::animated_texture_t rocket;
audio::sound_t fire, step_stone, step_dirt, pain, death, gib_sound;
} soldier_assets_t;
@@ -125,11 +127,13 @@ namespace game {
SAY_MOVING,
SAY_STOPPING,
SAY_FIRING,
+ SAY_NO_ROCKETS,
UNIT_NAME_SPIDER,
UNIT_NAME_SOLDIER,
UNIT_NAME_NEST,
UNIT_NAME_REPL,
- UNIT_DEATH
+ UNIT_DEATH,
+ UNIT_DESTRUCTION
} index_t;
std::string get(index_t index);
@@ -244,11 +248,12 @@ namespace game {
bool manual_firing = false;
v2f_t manual_firing_target;
+ bool rocket_fired = false;
+
void check_area(void);
void shoot(v2f_t aim);
void target_and_attack(void);
-
unit_soldier_t(game::state_t *game_);
~unit_soldier_t(void) {};
void render_to(render::state_t *render);
@@ -414,4 +419,19 @@ namespace game {
void on_wake(void) {};
void damage(int points, unit_t *attacker);
};
+
+ class rocket_t : public game::entity_t {
+ unit_t *shooter;
+ v2f_t v;
+
+ public:
+ rocket_t(game::state_t *game, v2f_t x_, v2f_t v_, unit_t *shooter_);
+ void render_to(render::state_t *render);
+ void render_late_to(render::state_t *render) {};
+
+ void on_think(void);
+ void on_spawn(void) {};
+ void on_wake(void) {};
+ void damage(int points, unit_t *attacker) {};
+ };
};