-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstory.h
42 lines (36 loc) · 933 Bytes
/
story.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
#ifndef STORY_H
#define STORY_H
#include <stdio.h>
#include <stdlib.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_primitives.h>
#include <vector>
#include <functional>
class Story {
public:
Story();
~Story();
void Init();
void Update(ALLEGRO_EVENT_QUEUE* event_queue);
void Draw();
void Destroy();
void SetEndCallback(std::function<void()> callback);
private:
ALLEGRO_BITMAP *levi_bg = NULL;
ALLEGRO_BITMAP *erwin_bg = NULL;
ALLEGRO_BITMAP *home_bg = NULL;
ALLEGRO_BITMAP *trans_1 = NULL;
ALLEGRO_SAMPLE *sample = NULL;
ALLEGRO_SAMPLE_INSTANCE *story1 = NULL;
ALLEGRO_FONT *font;
ALLEGRO_FONT *font_large;
std::string currentText;
size_t textIndex;
bool leviTurn;
double lastCharTime;
int dialogueStage;
std::function<void()> endCallback;
};
#endif // STORY_H