This commit is contained in:
2018-07-31 10:50:06 -04:00
parent c040135305
commit 58fa6f0503
45 changed files with 504 additions and 295 deletions
@@ -17,8 +17,7 @@ namespace VideoEngine {
class EXPORT_FROM_MYDLL cImage
{
public:
cImage( const cString& filename = "", const cString& dir = "", const bool transparent = false,
const unsigned char red = 0, const unsigned char blue = 0, const unsigned char green = 255,
cImage( const bool transparent = false, const unsigned char red = 0, const unsigned char blue = 0, const unsigned char green = 255,
const unsigned char translevel = 255, const bool isSurface = false );
cImage( SDL_Surface* surface );
cImage( SDL_Texture* texture );
@@ -32,13 +31,6 @@ namespace VideoEngine {
const cImage* NewImage( SDL_Rect& area ) const;
///Sets
/* Sets the Directory of the image */
void setDir( const cString& dir );
/* Sets the File Name of the image */
void setFileName( const cString& filename );
/* Sets the File Name and the Directory of the image */
void setFileNameandDir( const cString& filename, const cString& dir = "" );
/* Sets Transparent on if set to true */
void setTransparent( const bool transparent = true );
/* Sets the colour to be made transparent */
@@ -50,6 +42,8 @@ namespace VideoEngine {
/* Gets a pointer to the SDL_Surface */
SDL_Surface* getSurface() const;
/* Gets a pointer to the SDL_Texture */
SDL_Texture* getTexture() const;
/* Gets a pointer to the SDL_Texture */
SDL_Texture* getImage() const;
/* Gets the width of the image */
const unsigned long int getWidth() const;
@@ -59,12 +53,7 @@ namespace VideoEngine {
const SDL_Rect getWH() const;
/* Gets the Width and Height of the image */
void getWH( unsigned long int& w, unsigned long int& h ) const;
/* Gets the Directory of the image */
const cString getDir() const;
/* Gets the File Name of the image */
const cString getFileName() const;
/* Gets return true if transparent on false if off */
const bool getTransparent() const;
/* Gets return the colour to be made transparent */
@@ -89,20 +78,13 @@ namespace VideoEngine {
private:
///Functions
void TransparentSetup();
virtual void LoadImage(); //cFont over rides this
void UnloadImage();
private:
///Variables
SDL_Texture* mp_texture;// = nullptr
SDL_Surface* mp_surface;// = nullptr
cString m_dir;// = ""
cString m_fileName;// = ""
//char m_dir[255];
//char m_fileName[255];
bool m_transparent;// = false
unsigned char m_transRed;// = 0