-
Notifications
You must be signed in to change notification settings - Fork 0
/
engine.h
71 lines (53 loc) · 1.27 KB
/
engine.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <vector>
#include <SDL.h>
#include "ioMod.h"
#include "renderContext.h"
#include "clock.h"
#include "world.h"
#include "viewport.h"
#include "player.h"
#include "collisionStrategy.h"
#include "HUD.h"
#include "sound.h"
class Engine {
public:
Engine ();
~Engine ();
bool play();
void switchSprite();
private:
const RenderContext& rc;
const IoMod& io;
Clock& clock;
SDL_Renderer * const renderer;
World sky;
World sea;
World cloud;
World land;
Viewport& viewport;
Player* player;
std::vector<SmartSprite*> mySmartSprites;
int currentSprite;
//std::vector<CollisionStrategy*> strategies;
CollisionStrategy* strategy;
//int currentStrategy;
bool collision;
HUD& hud;
std::vector<Drawable*> regularSprites;
std::vector<Drawable*> paintersAlgoBack;
std::vector<Drawable*> paintersAlgoMiddle;
std::vector<Drawable*> paintersAlgoFront;
bool godMode;
int pointCounter;
SDLSound sound;
bool makeVideo;
void draw() const;
void update(Uint32);
//added delete to explicitly disallow compiler generated funcs
Engine(const Engine&) = delete;
Engine& operator=(const Engine&) = delete;
//void printScales() const; not sure hwat ithis is for
void checkForCollisions();
void toggleGodMode();
void drawEngineHUD();
};