blob: db2f1f992d6635762409dad8a3ef0ac7f6f2e2c0 (
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
31
|
#pragma once
#include "SDL_rect.h"
#include "api/baseResource.h"
#include "api/Resource.h"
#include <SDL2/SDL_render.h>
#include <memory>
namespace crepe {
class Texture : public api::BaseResource{
public:
Texture(const char * src);
Texture(std::unique_ptr<api::Resource> res);
~Texture();
SDL_Texture* get_texture() const;
SDL_Rect& get_rect() ;
private:
void load(std::unique_ptr<api::Resource> res);
private:
SDL_Texture* m_texture;
SDL_Rect srcrect;
};
} // namespace crepe
|