-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResources.h
More file actions
90 lines (72 loc) · 1.17 KB
/
Resources.h
File metadata and controls
90 lines (72 loc) · 1.17 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#pragma once
#include "sdl_includes.h"
#include <string>
#include <vector>
using namespace std;
class Resources {
public:
enum TextureId {
// images
Blank,
TennisBall,
KeyBoardIcon,
MouseIcon,
AIIcon,
SpaceShips,
Airplanes,
Star,
Asteroid,
Badges,
WhiteRect,
DarkHole,
// text
HelloWorld,
PressAnyKey,
PressEnterToContinue,
GameOver
};
enum AudioId {
// music
Beat,
Cheer,
Boooo,
ImperialMarch,
// sound effects
Wall_Hit,
Paddle_Hit,
GunShot,
Explosion
};
enum FontId {
ARIAL16,
ARIAL24,
};
struct FontInfo {
FontId id;
string fileName;
int size;
};
struct ImageInfo {
TextureId id;
string fileName;
};
struct TextMsgInfo {
TextureId id;
string msg;
SDL_Color color;
FontId fontId;
};
struct MusicInfo {
AudioId id;
string fileName;
};
struct SoundInfo {
AudioId id;
string fileName;
};
static vector<FontInfo> fonts_; // initialized in .cpp
static vector<ImageInfo> images_; // initialized in .cpp
static vector<TextMsgInfo> messages_; // initialized in .cpp
static vector<MusicInfo> musics_; // initialized in .cpp
static vector<SoundInfo> sounds_; // initialized in .cpp
};