-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathResourceManager.hpp
More file actions
35 lines (30 loc) · 906 Bytes
/
ResourceManager.hpp
File metadata and controls
35 lines (30 loc) · 906 Bytes
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
#ifndef RESOURCEMANAGER_HPP_
#define RESOURCEMANAGER_HPP_
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <map>
#include "Graphics/model.hpp"
#include "Graphics/Texture.hpp"
extern std::string dataDir;
extern std::string modelDir;
extern std::string fontDir;
extern std::string imgDir;
extern std::string soundDir;
extern std::string defaultFont;
class ResourceManager{
private:
std::map<std::string,Model> models;
std::map<std::string,sf::Font> fonts;
std::map<std::string,sf::Image> images;
std::map<std::string,Texture> texs;
std::map<std::string,sf::SoundBuffer> sounds;
std::map<std::string, Model> noGLModels;
public:
Model *loadModel(std::string name);
sf::Font *loadFont(std::string name);
sf::Image *loadImage(std::string name);
Texture loadTexture(std::string name);
sf::SoundBuffer *loadSound(std::string name);
Model *loadNoGLModel(std::string name);
};
#endif