Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
assets.hpp File Reference

Image file in host memory. More...

Go to the source code of this file.

Classes

class  wze::assets
 

Namespaces

namespace  wze
 Wizard Engine.
 

Typedefs

using wze::image = SDL_Surface
 
using wze::texture = SDL_Texture
 
using wze::sound = Mix_Chunk
 
using wze::font = TTF_Font
 
using wze::cursor = SDL_Cursor
 

Detailed Description

Image file in host memory.

Creates a cursor from an image.

Creates a cursor from a system cursor.

Loads a font from a path.

Returns the hash of a sound.

Loads a sound from a path.

Creates a texture from an image.

Returns the hash of an image.

Creates an image from a text.

Loads an image from a path.

Combines a value into a seed.

Private default constructor to prevent instantiation.

System specific assets directory.

Subsystem to handle external resources.

Cursor image.

Font file.

Audio file.

Image file in device memory.

Author
Zana Domán
Note
Supported image formats: jpg, png.
Author
Zana Domán
Zana Domán
Note
Supported sound formats: wav, ogg.
Author
Zana Domán
Note
Supported font format: ttf.
Author
Zana Domán
Parameters
seedTarget seed.
valueCombined value.
Author
Zana Domán
Parameters
pathPath to the image.
Returns
Loaded image.
Note
Supported image formats: jpg, png.
Warning
If the image cannot be loaded, throws wze::exception.
Author
Zana Domán
Parameters
textText of the image.
fontFont of the text.
wrap_lengthWrap length of the text.
Returns
Created image.
Note
0 wrap length only wraps on newline characters.
Warning
If the image cannot be created, throws wze::exception.
Author
Zana Domán
Parameters
imageHashed image.
Returns
Hash of the image.
Author
Zana Domán
Parameters
imageImage of the texture.
Returns
Created texture.
Warning
If the texture cannot be created, throws wze::exception.
Author
Zana Domán
Parameters
pathPath to the sound.
Returns
Loaded sound.
Note
Supported sound formats: wav, ogg.
Warning
If the sound cannot be loaded, throws wze::exception.
Author
Zana Domán
Parameters
soundHashed sound.
Returns
Hash of the sound.
Author
Zana Domán
Parameters
pathPath to the font.
sizeSize of the font.
styleStyle of the font.
alignmentAlignment of the font.
Returns
Loaded font.
Note
Supported font format: ttf.
Warning
If the font cannot be loaded, throws wze::exception.
Author
Zana Domán
Parameters
system_cursorType of the cursor.
Returns
Created cursor.
Warning
If the cursor cannot be created, throws wze::exception.
Author
Zana Domán
Parameters
imageImage of the cursor.
hot_xHot spot x of the cursor.
hot_yHot spot y of the cursor.
Returns
Created cursor.
Warning
If the cursor cannot be created, throws wze::exception.

Definition in file assets.hpp.