|
| CTextureBundle (bool useXBT) |
|
void | SetThemeBundle (bool themeBundle) |
|
bool | HasFile (const std::string &Filename) |
|
std::vector< std::string > | GetTexturesFromPath (const std::string &path) |
|
bool | LoadTexture (const std::string &filename, std::unique_ptr< CTexture > &texture, int &width, int &height) |
| Load texture from bundle. More...
|
|
bool | LoadAnim (const std::string &filename, std::vector< std::pair< std::unique_ptr< CTexture >, int >> &textures, int &width, int &height, int &nLoops) |
| Load animation from bundle. More...
|
|
void | Close () |
|
|
static std::string | Normalize (std::string name) |
|
◆ LoadAnim()
bool CTextureBundle::LoadAnim |
( |
const std::string & |
filename, |
|
|
std::vector< std::pair< std::unique_ptr< CTexture >, int >> & |
textures, |
|
|
int & |
width, |
|
|
int & |
height, |
|
|
int & |
nLoops |
|
) |
| |
Load animation from bundle.
- Parameters
-
[in] | filename | name of the animation to load |
[out] | texture | vector of frames. Each frame is pair of a texture and the duration the frame |
[out] | width | width of the loaded textures |
[out] | height | height of the loaded textures |
- Returns
- true if animation was loaded
- Todo:
- With c++17 this should be changed to return a std::optional that's wrapping a struct containing the output values. Same for CTextureBundleXBT::LoadAnim.
◆ LoadTexture()
bool CTextureBundle::LoadTexture |
( |
const std::string & |
filename, |
|
|
std::unique_ptr< CTexture > & |
texture, |
|
|
int & |
width, |
|
|
int & |
height |
|
) |
| |
Load texture from bundle.
- Parameters
-
[in] | filename | name of the texture to load |
[out] | texture | holds the pointer to the texture after successful loading |
[out] | width | width of the loaded texture |
[out] | height | height of the loaded texture |
- Returns
- true if texture was loaded
- Todo:
- With c++17 this should be changed to return a std::optional that's wrapping a struct containing the output values. Same for CTextureBundleXBT::LoadTexture.
The documentation for this class was generated from the following files: