Senpai::Assets

Code
C++
Game
Author

Daniel Schwarzenbach

Published

April 24, 2025


Texture

Texture(const String &filename, String const &name = "",
           bool pixelPerfect = false);

Animation

Animation(Ptr<Texture> texture = nullptr, Vec2<f32> size = {64, 64},
             uint frames = 1, String const& name = "");

TileSet

TileSet(String const& filename, u16 cols, u16 rows, f32 sizeX, 
        f32 sizeY, String const& name = "");

Font

Font(const String& filename, int size, String const& name = "");

Audio

Audio(const String& filename, String const& name = "");
// plays the audio
void play(float volume = 1.0f, bool looping = false);
// plays an audio from a specific direction
void play_direction(Vec2<f32> direction, f32 scale = 1.0f);