summary refs log tree commit diff stats
path: root/src/transform_system.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-06 13:03:01 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-06 13:03:01 -0500
commit1abc8894c2378596542e5772cd7594492eeecb27 (patch)
treec905dc3c96ff7b1d64aaf3212214f0731305bf82 /src/transform_system.h
parent4526d347961f7a5df110ef94bd38b80008e3110d (diff)
downloadtanetane-1abc8894c2378596542e5772cd7594492eeecb27.tar.gz
tanetane-1abc8894c2378596542e5772cd7594492eeecb27.tar.bz2
tanetane-1abc8894c2378596542e5772cd7594492eeecb27.zip
Added collision with other sprites
Diffstat (limited to 'src/transform_system.h')
-rw-r--r--src/transform_system.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/transform_system.h b/src/transform_system.h index 1ad661c..a7294ce 100644 --- a/src/transform_system.h +++ b/src/transform_system.h
@@ -14,6 +14,7 @@ class Game;
14struct AxisResult { 14struct AxisResult {
15 Direction dir; 15 Direction dir;
16 bool blocked = false; 16 bool blocked = false;
17 int colliderSprite = -1;
17}; 18};
18 19
19struct CollisionResult { 20struct CollisionResult {
@@ -54,6 +55,8 @@ private:
54 Collidable(int lower, int upper) : lower(lower), upper(upper) {} 55 Collidable(int lower, int upper) : lower(lower), upper(upper) {}
55 }; 56 };
56 57
58 // The way these work is that the key is (axis position, entity ID). The
59 // entity ID being there makes the mapping unique and makes removal easy.
57 using asc_collidables_type = 60 using asc_collidables_type =
58 std::map< 61 std::map<
59 std::tuple<int, int>, 62 std::tuple<int, int>,