summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 81d79e3..259c458 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -88,6 +88,12 @@ namespace world {
rectf_t bounds;
} cmodel_t;
+ typedef struct {
+ bool hit;
+ v2f_t end;
+ float frac;
+ } trace_t;
+
class world_t {
procgen::prng_t prng;
procgen::perlin_noise_t perlin;
@@ -113,6 +119,7 @@ namespace world {
std::list<entity_t*> get_render_entities(rectf_t rect);
bool test_rect(const cmodel_t *cmodel, const entity_t *ignore);
+ trace_t trace(v2f_t start, v2f_t end, cflags_t cflags);
void debug_point(sf::Vector2f point);
};
@@ -276,11 +283,14 @@ namespace render {
void render_text(v2f_t x, float height, const wchar_t *wstr, text_align_t align, sf::Color color);
void render_hlrect(rectf_t rect, sf::Color color);
+ void render_arrow(v2f_t x0, v2f_t x1, sf::Color color);
void debug_path(std::list<v2f_t> *path);
};
}
+extern render::state_t *debug_render;
+
namespace assets {
typedef struct {
render::oriented_sprite_4M_t head_idle, body_idle;