ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
asw::assets Namespace Reference

Functions

asw::Texture loadTexture (const std::string &filename)
 Loads a texture from a file. Formats supported are PNG, ICO, CUR, BMP, GIF, JPG, LBM, PCX, PNM, TIF, XCF, XPM, XV, and WEBP. This will abort if the file is not found.
 
asw::Font loadFont (const std::string &filename, float size)
 Loads a TTF font from a file. This will abort if the file is not found.
 
asw::Sample loadSample (const std::string &filename)
 Loads a sample from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC. This will abort if the file is not found.
 
asw::Music loadMusic (const std::string &filename)
 Loads a music file from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC. This will abort if the file is not found.
 
asw::Texture createTexture (int w, int h)
 Create a Texture given the specified dimensions.
 

Function Documentation

◆ createTexture()

asw::Texture asw::assets::createTexture ( int w,
int h )

Create a Texture given the specified dimensions.

Parameters
wThe width of the texture.
hThe height of the texture.
Returns
The created texture.

Definition at line 56 of file assets.cpp.

◆ loadFont()

asw::Font asw::assets::loadFont ( const std::string & filename,
float size )

Loads a TTF font from a file. This will abort if the file is not found.

Parameters
filenameThe path to the file.
sizeThe size of the font.
Returns
The loaded font.

Definition at line 26 of file assets.cpp.

◆ loadMusic()

asw::Music asw::assets::loadMusic ( const std::string & filename)

Loads a music file from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC. This will abort if the file is not found.

Parameters
filename
Returns
The loaded music.

Definition at line 46 of file assets.cpp.

◆ loadSample()

asw::Sample asw::assets::loadSample ( const std::string & filename)

Loads a sample from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC. This will abort if the file is not found.

Parameters
filename
Returns
The loaded sample.

Definition at line 36 of file assets.cpp.

◆ loadTexture()

asw::Texture asw::assets::loadTexture ( const std::string & filename)

Loads a texture from a file. Formats supported are PNG, ICO, CUR, BMP, GIF, JPG, LBM, PCX, PNM, TIF, XCF, XPM, XV, and WEBP. This will abort if the file is not found.

Parameters
filenameThe path to the file.
Returns
The loaded texture.

Definition at line 13 of file assets.cpp.