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
assets.h
Go to the documentation of this file.
1
8
9#ifndef ASW_ASSETS_H
10#define ASW_ASSETS_H
11
12#include <string>
13
14#include "./types.h"
15#include "./util.h"
16
17namespace asw::assets {
18
26 asw::Texture loadTexture(const std::string& filename);
27
35 asw::Font loadFont(const std::string& filename, float size);
36
43 asw::Sample loadSample(const std::string& filename);
44
51 asw::Music loadMusic(const std::string& filename);
52
59 asw::Texture createTexture(int w, int h);
60} // namespace asw::assets
61
62#endif // ASW_ASSETS_H
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 th...
Definition assets.cpp:36
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.
Definition assets.cpp:26
asw::Music loadMusic(const std::string &filename)
Loads a music file from a file. Formats supported are WAV, AIFF, RIFF, OGG and VOC....
Definition assets.cpp:46
asw::Texture loadTexture(const std::string &filename)
Loads a texture from a file. Formats supported are PNG, ICO, CUR, BMP, GIF, JPG, LBM,...
Definition assets.cpp:13
asw::Texture createTexture(int w, int h)
Create a Texture given the specified dimensions.
Definition assets.cpp:56
std::shared_ptr< Mix_Chunk > Sample
Alias for a shared pointer to an Mix_Chunk.
Definition types.h:26
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
Definition types.h:23
std::shared_ptr< Mix_Music > Music
Alias for a shared pointer to an Mix_Music.
Definition types.h:29
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Definition types.h:20
Types used throughout the ASW library.
General utility functions.