26std::string
get_path(
const std::string& filename);
asw::Sample get_sample(const std::string &key)
Get a cached sample.
asw::Texture create_texture(int w, int h)
Create a Texture given the specified dimensions.
void unload_music(const std::string &key)
Remove a cached music.
std::string get_path(const std::string &filename)
Get the full path to an asset given its filename. This assumes that all assets are located in an "ass...
asw::Texture get_texture(const std::string &key)
Get a cached texture.
void unload_sample(const std::string &key)
Remove a cached sample.
void unload_font(const std::string &key)
Remove a cached font.
asw::Music load_music(const std::string &filename)
Loads a music file from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC....
void clear_all()
Clear all cached assets. This will remove all cached textures, fonts, samples, and music.
void unload_texture(const std::string &key)
Remove a cached texture.
asw::Music get_music(const std::string &key)
Get a cached music.
asw::Font load_font(const std::string &filename, float size)
Loads a TTF font from a file. This will abort if the file is not found.
asw::Sample load_sample(const std::string &filename)
Loads a sample from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC. This will abort if th...
asw::Font get_font(const std::string &key)
Get a cached font.
asw::Texture load_texture(const std::string &filename)
Loads a texture from a file. Formats supported are PNG, ICO, CUR, BMP, GIF, JPG, LBM,...
std::shared_ptr< Mix_Chunk > Sample
Alias for a shared pointer to an Mix_Chunk.
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
std::shared_ptr< Mix_Music > Music
Alias for a shared pointer to an Mix_Music.
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Types used throughout the ASW library.
General utility functions.