feat: Add AssetLoader for Cross-Platform Asset Management

- Introduced the AssetLoader class to facilitate loading assets across different platforms, including macOS and standard relative paths for Windows and Linux.
- Implemented methods for searching asset paths, finding asset files, and loading text files, enhancing the flexibility and usability of asset management.
- Updated CMake configuration to include the new asset_loader source files, ensuring proper integration into the build system.
This commit is contained in:
scawful
2025-10-05 05:50:58 -04:00
parent 94c7add494
commit fbcfadbd11
3 changed files with 138 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ set(
if (WIN32 OR MINGW OR (UNIX AND NOT APPLE))
list(APPEND YAZE_APP_CORE_SRC
app/core/platform/font_loader.cc
app/core/platform/asset_loader.cc
)
endif()
@@ -19,6 +20,7 @@ if(APPLE)
app/core/platform/app_delegate.mm
app/core/platform/font_loader.cc
app/core/platform/font_loader.mm
app/core/platform/asset_loader.cc
)
find_library(COCOA_LIBRARY Cocoa)