Add MathEngineTest and Commects and clean ups

This commit is contained in:
2018-08-18 20:50:06 -04:00
parent bd3c111fa1
commit a815367c9d
52 changed files with 386 additions and 144 deletions
@@ -40,11 +40,16 @@ namespace VideoEngine {
void RenderDrawColor( const SDL_Colour& colour );
void RenderDrawRect( const SDL_Rect& rect, SDL_Texture* dst = nullptr );
/* Takes a screen shot by copying the pixels from the Renderer to a new SDL_Surface and Calls SaveSurface(). */
void ScreenShot(const cString& filename, const cString& dir = "");
/* Saves the SDL_Surface to the given file name and directory */
void SaveSurface( SDL_Surface* surface, const cString& fileName, const cString& dir = "" );
/* Saves the SDL_Texture to the given file name and directory */
void SaveTexture( SDL_Texture* texture, const cString& fileName, const cString& dir = "" );
/* Give it a SDL_Surface and it returns a SDL_Texture */
SDL_Texture* SurfaceToTexture( SDL_Surface* surface );
/* Give it a SDL_Texture and it returns and SDL_Surface */
SDL_Surface* TextureToSurface( SDL_Texture* texture );
void CopyTexture( SDL_Texture* src, SDL_Texture* dst, bool software = false );
@@ -54,6 +59,7 @@ namespace VideoEngine {
SDL_Surface* NewSurface( long int width = -1, long int height = -1 ) const;
SDL_Texture* NewTexture( long int width = -1, long int height = -1, const bool copyRenderer = false, const unsigned long int access = SDL_TEXTUREACCESS_TARGET ) const;
/* Give it two SDL_Surface you wish to compare returns true if the pixels are the same. */
const bool AreEqual( SDL_Surface& one, SDL_Surface& two );
void SetRenderTarget( SDL_Renderer* renderer, SDL_Texture* target = nullptr );
@@ -67,6 +73,7 @@ namespace VideoEngine {
SDL_Renderer* getRendererCopy();
private:
/// Variables
SDL_Renderer* mp_renderer;
SDL_Renderer* mp_rendererSoftware;