-
Notifications
You must be signed in to change notification settings - Fork 0
/
AssetManager.hpp
37 lines (31 loc) · 1.39 KB
/
AssetManager.hpp
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
#pragma once
#include <map>
#include <SFML/Graphics.hpp>
namespace engine{
/// @brief
/// @details
class AssetManager{
public:
/// @brief LoadTexture function.
/// @details LoadTexture function for loading the texture into the memory map
/// @param name The name for the place in the map
/// @param fileName The place of the texture filepath. This texture will be loaded into the map
void LoadTexture(std::string name, std::string fileName);
/// @brief GetTexture function.
/// @details GetTexture function for returning the texture from the memory map
/// @param name The name for the place in the map
sf::Texture& GetTexture(std::string name);
/// @brief LoadFont function.
/// @details LoadFont function for loading the font into the memory map
/// @param name The name for the place in the map
/// @param fileName The place of the font filepath. This font will be loaded into the map
void LoadFont(std::string name, std::string fileName);
/// @brief GetFont function.
/// @details GetFont function for returning the font from the memory map
/// @param name The name for the place in the map
sf::Font& GetFont(std::string name);
private:
std::map<std::string, sf::Texture> _textures;
std::map<std::string, sf::Font> _font;
};
}