GameKit  0.0.1a
C++ gamedev tools
Public Member Functions | Private Attributes | List of all members
gk::Tileset Class Reference

#include <Tileset.hpp>

Inheritance diagram for gk::Tileset:
gk::Texture gk::NonCopyable

Public Member Functions

 Tileset ()=default
 
 Tileset (const Tileset &)=delete
 
 Tileset (Tileset &&tileset)=default
 
 Tileset (const std::string &filename, const std::string &configFile)
 
void load (const std::string &filename, const std::string &configFile)
 
const std::vector< u16 > & info () const
 
const TilegetTile (u16 id) const
 
void setTile (u16 id, Tile &tile)
 
u16 tileWidth () const
 
u16 tileHeight () const
 
u16 tileCount () const
 
- Public Member Functions inherited from gk::Texture
 Texture ()=default
 Default constructor. More...
 
 Texture (const std::string &filename)
 Load the texture from a file on the disk. More...
 
 Texture (SDL_Surface *surface)
 Load the texture from a SDL_Surface. More...
 
 Texture (Texture &&texture)
 Move constructor. More...
 
 ~Texture () noexcept
 Destructor. More...
 
Textureoperator= (Texture &&texture)
 Move assignement operator. More...
 
void loadFromFile (const std::string &filename)
 Load the texture from a file on the disk. More...
 
void loadFromSurface (SDL_Surface *surface)
 Load the texture from a SDL_Surface. More...
 
const std::string & filename () const
 Return the filename of the texture. More...
 
u16 width () const
 Return the width of the texture. More...
 
u16 height () const
 Return the height of the texture. More...
 

Private Attributes

std::vector< u16m_info
 
u16 m_tileWidth
 
u16 m_tileHeight
 
std::vector< Tilem_tiles
 

Additional Inherited Members

- Static Public Member Functions inherited from gk::Texture
static void bind (const Texture *texture)
 Bind a texture for rendering. More...
 
- Protected Member Functions inherited from gk::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
const NonCopyableoperator= (const NonCopyable &)=delete
 

Detailed Description

Definition at line 44 of file Tileset.hpp.

Constructor & Destructor Documentation

§ Tileset() [1/4]

gk::Tileset::Tileset ( )
default

§ Tileset() [2/4]

gk::Tileset::Tileset ( const Tileset )
delete

§ Tileset() [3/4]

gk::Tileset::Tileset ( Tileset &&  tileset)
default

§ Tileset() [4/4]

gk::Tileset::Tileset ( const std::string &  filename,
const std::string &  configFile 
)

Definition at line 22 of file Tileset.cpp.

Member Function Documentation

§ getTile()

const Tile& gk::Tileset::getTile ( u16  id) const
inline

Definition at line 55 of file Tileset.hpp.

§ info()

const std::vector<u16>& gk::Tileset::info ( ) const
inline

Definition at line 53 of file Tileset.hpp.

§ load()

void gk::Tileset::load ( const std::string &  filename,
const std::string &  configFile 
)

Definition at line 26 of file Tileset.cpp.

§ setTile()

void gk::Tileset::setTile ( u16  id,
Tile tile 
)
inline

Definition at line 56 of file Tileset.hpp.

§ tileCount()

u16 gk::Tileset::tileCount ( ) const
inline

Definition at line 60 of file Tileset.hpp.

§ tileHeight()

u16 gk::Tileset::tileHeight ( ) const
inline

Definition at line 59 of file Tileset.hpp.

§ tileWidth()

u16 gk::Tileset::tileWidth ( ) const
inline

Definition at line 58 of file Tileset.hpp.

Member Data Documentation

§ m_info

std::vector<u16> gk::Tileset::m_info
private

Definition at line 63 of file Tileset.hpp.

§ m_tileHeight

u16 gk::Tileset::m_tileHeight
private

Definition at line 66 of file Tileset.hpp.

§ m_tiles

std::vector<Tile> gk::Tileset::m_tiles
private

Definition at line 68 of file Tileset.hpp.

§ m_tileWidth

u16 gk::Tileset::m_tileWidth
private

Definition at line 65 of file Tileset.hpp.


The documentation for this class was generated from the following files: