2017-11-30 21:00:47 +01:00
|
|
|
#ifndef TEXTURE_H_
|
|
|
|
#define TEXTURE_H_
|
|
|
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include "dimension.h"
|
2017-12-11 08:23:30 +01:00
|
|
|
#include "position.h"
|
|
|
|
#include "camera.h"
|
2017-11-30 21:00:47 +01:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
SDL_Texture *texture;
|
|
|
|
Dimension dim;
|
|
|
|
SDL_Rect clip;
|
|
|
|
} Texture;
|
|
|
|
|
2017-12-02 23:32:40 +01:00
|
|
|
Texture* texture_create(const char *path, SDL_Renderer *renderer);
|
2017-11-30 21:00:47 +01:00
|
|
|
|
2017-12-11 08:23:30 +01:00
|
|
|
void texture_render(Texture*, Position*, Camera*);
|
|
|
|
|
2017-11-30 21:00:47 +01:00
|
|
|
void texture_destroy(Texture *texture);
|
|
|
|
|
|
|
|
#endif // TEXTURE_H_
|