summary refs log tree commit diff stats
path: root/src/systems/pondering.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-18 12:35:45 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-18 12:35:45 -0500
commite16fb5be90c889c371cbb0ca2444735c2e12073c (patch)
treecbaa20e14a34c460b6c9886f266c4b4b6f62ae87 /src/systems/pondering.h
parented08b673c50b076042d8f0c49501372168142764 (diff)
downloadtherapy-e16fb5be90c889c371cbb0ca2444735c2e12073c.tar.gz
therapy-e16fb5be90c889c371cbb0ca2444735c2e12073c.tar.bz2
therapy-e16fb5be90c889c371cbb0ca2444735c2e12073c.zip
Implemented map adjacency
This brings along with it the ability to move to different maps, for which the PlayingSystem and PlayableComponent were introduced. The PlayingSystem is a general overseer system that handles big picture stuff like initializing the player and changing maps. The PlayableComponent represents the player. While the ControllableComponent is also likely to always only be on the player entity, the two are distinct by separation of concerns.

This also required a refactoring of how collisions are processed, because of a bug where the player can move to a new map when horizontal collisions are checked, and vertical collisions are skipped, causing the player to clip through the ground because the normal force was never handled.
Diffstat (limited to 'src/systems/pondering.h')
-rw-r--r--src/systems/pondering.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/systems/pondering.h b/src/systems/pondering.h index a16622b..d70525b 100644 --- a/src/systems/pondering.h +++ b/src/systems/pondering.h
@@ -2,7 +2,6 @@
2#define PONDERING_H_F2530E0E 2#define PONDERING_H_F2530E0E
3 3
4#include "system.h" 4#include "system.h"
5#include "components/mappable.h"
6#include "components/ponderable.h" 5#include "components/ponderable.h"
7#include "direction.h" 6#include "direction.h"
8 7
@@ -17,16 +16,6 @@ public:
17 16
18 void initializeBody(id_type entity, PonderableComponent::Type type); 17 void initializeBody(id_type entity, PonderableComponent::Type type);
19 18
20private:
21
22 void processCollision(
23 id_type entity,
24 Direction dir,
25 double& newX,
26 double& newY,
27 int axis,
28 MappableComponent::Boundary::Type type);
29
30}; 19};
31 20
32#endif /* end of include guard: PONDERING_H_F2530E0E */ 21#endif /* end of include guard: PONDERING_H_F2530E0E */