aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Sprite.h
blob: 3d9e911ad7b34d33d6ab587a56afbab8f89d7f8a (plain)
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
#pragma once

#include "Component.h"
#include "api/Color.h"
#include "api/Texture.h"
#include <SDL2/SDL_rect.h>
#include <cstdint>
#include <memory>


namespace crepe::api {

struct flip_settings{
	bool flip_x: 1;
	bool flip_y : 1;
};
class Sprite : public Component {
	
public:
	Sprite(uint32_t game_id, std::shared_ptr<Texture> image, const Color& color, const flip_settings& flip );
	~Sprite();
	std::shared_ptr<Texture> sprite_image;
	Color color;
	flip_settings flip;
	uint8_t sorting_in_layer;
	uint8_t order_in_layer;

};

}