-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.h
66 lines (60 loc) · 1.29 KB
/
scene.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
#ifndef HEADERS
#define HEADERS
#include "SDL2/SDL.h"
#include "SDL2/SDL_image.h"
#include "SDL2/SDL_mixer.h"
#include <stdio.h>
#include <string>
#include <ctime>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include "SDL2/SDL_ttf.h"
#endif
#ifndef LTEXTURE_H_INCLUDED
#include "LTexture.h"
#endif // LTEXTURE_H_INCLUDED
#ifndef SCENE_H_INCLUDED
#define SCENE_H_INCLUDED
class Sound_effect
{
public:
void play_music(int index) const;
void pause_and_resume() const;
void stopmusic() const;
};
class scene
{
public:
//counter
int count;
protected:
SDL_Rect subtitle[8];
SDL_Rect Background;
//Main loop flag
bool operating_quit;
public:
scene();
//Event handler
SDL_Event e;
virtual void operating(LTexture &preface_background,LTexture &preface,int index);
//composition
const Sound_effect soundtrack;
};
class preface_scene: public scene
{
private:
//story or challenge
int sc;
SDL_Rect frame_f;
SDL_Rect frame_t;
public:
void setsc(int i) {sc = i;}
int getsc() {return sc;}
preface_scene();
void interface_operating();
void rules_operating();
void operating(LTexture &preface_background,LTexture &preface,int index);
};
#endif // SCENE_H_INCLUDED