45 explicit AssetLoader(std::filesystem::path assetsPath);
53 [[nodiscard]]
const std::filesystem::path&
GetPath()
const {
62 void SetPath(
const std::filesystem::path& assetsPath) {
90 void RenderImage(
const char* name, ImDrawList* drawList,
91 const ImVec2& pos,
const ImVec2& size,
92 const ImVec4& tint = ImVec4(1, 1, 1, 1));
Audio loading and playback system for FuncDoodle.
ImGui/OpenGL/GLFW integration utilities and file dialog wrapper.
Convenience type aliases for standard smart pointers.
std::unique_ptr< T > UniquePtr
Alias for an exclusively owned smart pointer.
Definition Ptr.h:28
void LoadAssets()
Loads shared textures and sounds from disk.
Definition LoadedAssets.cc:24
void InitAssets()
Initializes fonts and other asset-backed runtime state.
Definition AssetLoader.cc:28
std::filesystem::path m_AssetsPath
Definition AssetLoader.h:132
uint32_t LoadImage(const char *name)
Loads an image asset and returns its texture handle.
Definition AssetLoader.cc:88
AssetLoader(std::filesystem::path assetsPath)
Creates an asset loader rooted at the given assets directory.
Definition AssetLoader.cc:19
ImFont * GetFontBold() const
Returns the bold UI font.
Definition AssetLoader.h:129
AudioData LoadSound(std::filesystem::path soundPath)
Loads a sound asset into memory.
Definition AssetLoader.cc:114
ImFont * GetFontRegular() const
Returns the regular UI font.
Definition AssetLoader.h:122
~AssetLoader()
Definition AssetLoader.cc:24
ImFont * m_FontRegular
Definition AssetLoader.h:134
void RenderImage(const char *name, ImDrawList *drawList, const ImVec2 &pos, const ImVec2 &size, const ImVec4 &tint=ImVec4(1, 1, 1, 1))
Draws a loaded image into an ImGui draw list.
Definition AssetLoader.cc:59
void PlaySound(AudioData data)
Plays decoded audio data through the audio manager.
Definition AssetLoader.cc:120
const std::filesystem::path & GetPath() const
Returns the current assets directory.
Definition AssetLoader.h:53
void UnloadAssets()
Releases loaded asset resources.
Definition AssetLoader.cc:53
void SetPath(const std::filesystem::path &assetsPath)
Changes the assets directory used for future loads.
Definition AssetLoader.h:62
UniquePtr< AudioManager > m_AudioManager
Definition AssetLoader.h:133
ImFont * m_FontBold
Definition AssetLoader.h:135
The FuncDoodle C++ namespace.
Definition Common.h:12
Represents raw PCM audio data.
Definition Audio.h:18