1
0
Fork 0
blockofighter/src/texture.h
2021-06-09 01:10:09 +02:00

37 lines
656 B
C++

#ifndef __TEXTURE_H_INCLUDED__
#define __TEXTURE_H_INCLUDED__
#include <SDL_image.h>
#include "main.h"
class Texture {
public:
Texture(void);
Texture(int id);
~Texture(void);
bool loadImage(char *path);
bool loadImage(char *path, float *trans);
void enable(void);
void disable(void);
bool isEnabled(void);
int getId(void);
void setId(int id);
bool isValidId(void);
void reload(void);
// int* getOGLTexture(void);
// int* getModifiableOGLTexture(void);
private:
int textureId;
// int* modTexture;
bool enabled;
SDL_Surface *texture;
int format;
};
SDL_Surface *SDL_DisplayFormatAlpha(SDL_Surface *surf);
#endif