· 5 years ago · Nov 03, 2020, 09:52 PM
1#include <string>
2
3// Easy to use API for various IO from GFX, to sound, kayboard, and mouse.
4// All resources are internally managed to only have one copy per filePath.
5namespace IO {
6 enum class MOUSE_BUTTON {
7 LEFT,
8 RIGHT,
9 MIDDLE
10 };
11
12 void* getTexture(std::string& filePath);
13 void drawTexture(void* texture);
14 void returnTexture(void* texture);
15
16 void* getSound(std::string& filePath);
17 void playSound(void* sound);
18 void returnSound(void* sound);
19
20 bool isKeyPressed(char key);
21 bool isMousePressed(MOUSE_BUTTON button);
22
23 void appStart();
24 void appUpdate();
25 void appEnd();
26}