summaryrefslogtreecommitdiffhomepage
path: root/src/resources.h
blob: edc1fecfab85f72f0d137d6490542c4a2deba86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unordered_map>
#include <string>
#include "raylib.h"

namespace Resources {
	Texture useTexture(std::string id);
	class Sprite {
		public:
			std::string texture_name;
			Rectangle source_rectangle;
			Vector2 origin;

			Sprite(std::string texture_name,
					Rectangle source_rectangle,
					Vector2 origin = (Vector2){0,0}
				  );
			void drawPro(Rectangle dest_rectangle, float rotation = 0, Color color = WHITE);
			void draw(float x, float y, float scale = 1.0, float rotation = 0, Color color = WHITE);
	};
}