-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresources.h
65 lines (56 loc) · 1.57 KB
/
resources.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
#pragma once
#include <GL/glew.h>
#include "glHelper.h"
#include "shader.h"
#include <SFML/Audio.hpp>
// follows meyers singleton pattern
class Resources {
public:
static Resources& get() {
static Resources instance;
return instance;
}
GLuint gridTex;
GLuint terrainTex;
GLuint solidTex;
GLuint triangleTex;
GLuint skyboxTex;
GLuint noiseTex;
Shader instanceShader;
Shader instanceTexShader;
Shader terrainShader;
Shader blurShader;
Shader screenShader;
Shader blendShader;
Shader skyboxShader;
sf::Font font;
sf::Music mainTrack;
sf::Music bossTrack;
sf::SoundBuffer jumpSound;
sf::SoundBuffer shootSound;
sf::SoundBuffer damageSound;
sf::SoundBuffer itemGetSound;
sf::SoundBuffer menuSelectSound;
sf::SoundBuffer menuMoveSound;
sf::SoundBuffer explosionSound;
sf::SoundBuffer burningSound;
sf::SoundBuffer healingSound;
sf::SoundBuffer boostSound;
sf::SoundBuffer waypointSound;
sf::SoundBuffer waypointHitSound;
sf::SoundBuffer timetodieSound;
sf::SoundBuffer bossShoot;
sf::SoundBuffer bossSwitch;
sf::SoundBuffer bossVulnerable;
void buildShaders();
void loadTextures(bool mipmapped);
void loadAudio(std::vector<std::pair<sf::SoundBuffer*, std::string>>& soundPaths);
// singleton: delete copy constructor and assignment operator
Resources(Resources const&) = delete;
Resources& operator=(Resources const&) = delete;
private:
Resources();
~Resources();
void deleteShaders();
void deleteTextures();
};