summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-13 11:30:01 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-13 11:30:01 +0200
commit84a648723674934ef46e1799404d778474a74aeb (patch)
tree2a468b9d991942f7ecf23068177a986163522314 /src/common.hpp
parentdd83ee59e481d58f5c30751d9dead295750857ca (diff)
Explosions, better AI and misc refactoring.
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp
index e6879ca..f4ce9ff 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -44,6 +44,7 @@ extern bool debug_AI;
typedef uint64_t ntime_t;
ntime_t nclock(void);
+#define SEC(x) ((ntime_t)x * 1000000000)
#define MSEC(x) ((ntime_t)x * 1000000)
class freq_counter_t {
@@ -306,6 +307,8 @@ namespace game {
procgen::prng_t prng;
std::unordered_set<entity_t*> awake_entities;
std::unordered_set<unit_t*> selected_units;
+ // Some deletes have to be deferred to the next frame.
+ std::unordered_set<entity_t*> deletion_list;
ntime_t time = 0; // game time
double now, dt; // FIXME: refactor the code, use ntime_t everywhere
@@ -322,6 +325,8 @@ namespace game {
void pause(void);
void resume(void);
+ void explosion(v2f_t x);
+
// These are called by the interface.
void select(rectf_t rect, int type);
bool populate_pie_menu(std::vector<interface::pie_item_t> &items);