1
0
Fork 0
blockofighter/src/texture.h

38 lines
656 B
C
Raw Normal View History

2014-02-16 14:32:28 +00:00
#ifndef __TEXTURE_H_INCLUDED__
#define __TEXTURE_H_INCLUDED__
#include <SDL_image.h>
#include "main.h"
2015-06-03 12:29:34 +00:00
class Texture {
2014-02-16 14:32:28 +00:00
public:
Texture(void);
Texture(int id);
~Texture(void);
2015-06-03 12:29:34 +00:00
bool loadImage(char *path);
bool loadImage(char *path, float *trans);
2014-02-16 14:32:28 +00:00
void enable(void);
void disable(void);
bool isEnabled(void);
int getId(void);
void setId(int id);
bool isValidId(void);
2015-06-03 12:29:34 +00:00
void reload(void);
2014-02-16 14:32:28 +00:00
2015-06-03 12:29:34 +00:00
// int* getOGLTexture(void);
// int* getModifiableOGLTexture(void);
2014-02-16 14:32:28 +00:00
private:
int textureId;
2015-06-03 12:29:34 +00:00
// int* modTexture;
2014-02-16 14:32:28 +00:00
bool enabled;
2015-06-03 12:29:34 +00:00
SDL_Surface *texture;
int format;
2014-02-16 14:32:28 +00:00
};
2021-06-08 23:10:09 +00:00
SDL_Surface *SDL_DisplayFormatAlpha(SDL_Surface *surf);
2014-02-16 14:32:28 +00:00
#endif