-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAssetManager.hpp
44 lines (32 loc) · 1.11 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
38
39
40
41
42
43
44
#ifndef AssetManager_hpp
#define AssetManager_hpp
#include <map>
#include <string>
#include "TextureManager.hpp"
#include "Vector2D.hpp"
#include "ECS/ECS.hpp"
#include <SDL2/SDL_ttf.h>
class AssetManager
{
public:
AssetManager(Manager* man);
~AssetManager();
//GameObjects
void CreateProjectile(Vector2D pos, Vector2D vel, int range, int speed, std::string id);
//texture stuffs
void AddTexture(std::string id, const char* path);
SDL_Texture* GetTexture(std::string id);
void AddFont(std::string id, std::string path, int fontSize);
TTF_Font* GetFont(std::string id);
void AddSfx(std::string id, const char* path);
Mix_Chunk* GetSfx(std::string id);
void AddOST(std::string id, const char* path);
Mix_Music* GetOST(std::string id);
private:
Manager* manager;
std::map<std::string, SDL_Texture*> textures;
std::map<std::string, TTF_Font*> fonts;
std::map<std::string, Mix_Chunk*> sfxs;
std::map<std::string, Mix_Music*> OST;
};
#endif /* AssetManager_hpp */