-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquarkresourceloader.h
52 lines (42 loc) · 1.26 KB
/
quarkresourceloader.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
#ifndef QUARKRESOURCELOADER_H
#define QUARKRESOURCELOADER_H
#include <string>
#include "quarkresource.h"
/**
* @brief Loads resources from files
*/
class QuarkResourceLoader
{
public:
/**
* @brief Returns QuarkResource loaded from the given file
* @param filePath File to load resource from
* @return The resource loaded from the given file
*/
virtual QuarkResource* loadResource(const char* filePath) = 0;
};
// Here are various loaders. You can check quark implementation if you want to see how these work...
class QuarkIMGLoader : public QuarkResourceLoader {
public:
QuarkResource* loadResource(const char *filePath);
};
class QuarkSoundLoader : public QuarkResourceLoader {
public:
QuarkResource* loadResource(const char *filePath);
};
class QuarkMusicLoader : public QuarkResourceLoader {
public:
QuarkResource* loadResource(const char *filePath);
};
class QuarkShaderProgramLoader : public QuarkResourceLoader {
private:
bool fileExists(std::string filePath);
std::string readFile(std::string filePath);
public:
QuarkResource* loadResource(const char *filePath);
};
class QuarkJoyMappingsLoader : public QuarkResourceLoader {
public:
QuarkResource* loadResource(const char *filePath);
};
#endif // QUARKRESOURCELOADER_H