Code refactored into different files.
This commit is contained in:
parent
26c50fe1d0
commit
2429229a95
8 changed files with 217 additions and 46 deletions
27
src/texture.hpp
Normal file
27
src/texture.hpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef id0F37904CB7274575B7E9419E615DA250
|
||||
#define id0F37904CB7274575B7E9419E615DA250
|
||||
|
||||
#include <string>
|
||||
|
||||
struct SDL_Texture;
|
||||
|
||||
namespace cloonel {
|
||||
class SDLMain;
|
||||
|
||||
class Texture {
|
||||
public:
|
||||
Texture ( const std::string& parPath, SDLMain* parMain, bool parLoadNow );
|
||||
~Texture ( void ) noexcept;
|
||||
|
||||
void Reload ( void );
|
||||
void Destroy ( void ) noexcept;
|
||||
bool IsLoaded ( void ) const { return nullptr != m_texture; }
|
||||
|
||||
private:
|
||||
const std::string m_path;
|
||||
SDL_Texture* m_texture;
|
||||
SDLMain* const m_sdlmain;
|
||||
};
|
||||
} //namespace cloonel
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue