blob: b1958147e613eae91461ae6a8d4fecd6a92e4b9c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef PONDERING_H_F2530E0E
#define PONDERING_H_F2530E0E
#include "system.h"
#include "components/ponderable.h"
#include "direction.h"
class PonderingSystem : public System {
public:
PonderingSystem(Game& game) : System(game)
{
}
void tick(double dt);
void initializeBody(id_type entity, PonderableComponent::Type type);
void initPrototype(id_type prototype);
private:
struct CollisionResult
{
double newX;
double newY;
bool stopProcessing = false;
bool touchedWall = false;
bool adjacentlyWarping = false;
Direction adjWarpDir;
size_t adjWarpMapId;
id_type groundEntity;
};
void processCollision(
id_type entity,
id_type collider,
Direction dir,
PonderableComponent::Collision type,
double axis,
double lower,
double upper,
CollisionResult& result);
};
#endif /* end of include guard: PONDERING_H_F2530E0E */
|