-
Notifications
You must be signed in to change notification settings - Fork 0
/
StoryMode.hpp
48 lines (40 loc) · 1.01 KB
/
StoryMode.hpp
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
/*
* StoryMode implements a story about The Planet of Choices.
*
*/
#include "Mode.hpp"
#include "Sound.hpp"
struct StoryMode : Mode {
StoryMode();
virtual ~StoryMode();
virtual bool handle_event(SDL_Event const &, glm::uvec2 const &window_size) override;
virtual void update(float elapsed) override;
virtual void draw(glm::uvec2 const &drawable_size) override;
//called to create menu for current scene:
void enter_scene();
//------ story state -------
enum {
Dunes,
Oasis,
Hill
} location = Dunes;
bool have_stone = false;
bool added_stone = false;
struct {
bool first_visit = true;
bool wont_leave = false;
} dunes;
struct {
bool first_visit = true;
bool took_stone = false;
} oasis;
struct {
bool first_visit = true;
bool added_stone = false;
} hill;
glm::vec2 view_min = glm::vec2(0,0);
glm::vec2 view_max = glm::vec2(400, 500);
//------ background music -------
std::shared_ptr< Sound::PlayingSample > background_music;
std::shared_ptr< Sound::PlayingSample > mine_sound;
};