1
0
Fork 0
blockofighter/src/material.h

28 lines
513 B
C
Raw Normal View History

2014-02-16 14:32:28 +00:00
#ifndef __MATERIAL_H_INCLUDED__
#define __MATERIAL_H_INCLUDED__
#include <SDL_image.h>
#include "texture.h"
2015-06-03 12:29:34 +00:00
class Material {
2014-02-16 14:32:28 +00:00
private:
2015-06-03 12:29:34 +00:00
Texture *texture;
float color[4];
2014-02-16 14:32:28 +00:00
bool enabled;
public:
2015-06-03 12:29:34 +00:00
Material(void);
bool loadTexture(char *path);
2014-02-16 14:32:28 +00:00
void freeTexture(void);
2015-06-03 12:29:34 +00:00
void setColor(float red, float green, float blue, float alpha);
const float *getColor(void);
void enable(void);
2014-02-16 14:32:28 +00:00
void disable(void);
bool isEnabled(void);
2015-06-03 12:29:34 +00:00
Texture *getTexture(void);
void setTexture(Texture *tex);
2014-02-16 14:32:28 +00:00
};
#endif