diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-28 08:51:49 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-28 08:51:49 +0100 |
| commit | 3e9e69a6cd9212b5cfd956c0a36b9dc07ab88cf7 (patch) | |
| tree | 5e57c9478f90982417b5dfb208df8e395c027953 /src/main.cc | |
| parent | a606788f3699b98b26e0af27622f67f00d92d1e3 (diff) | |
feat(assets): Implement basic asset packing system
Introduces a new asset management system to embed binary assets directly into the demo executable.
- Creates the directory for asset definition and an descriptor file.
- Implements to generate (with enum and declaration) and (with placeholder data).
- Integrates into CMake build, making depend on the generated asset files.
- Adds minimal integration in and documentation in .
This addresses Task 9 (compact in-line and off-line asset system).
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 31e1c58..bcf6015 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,6 @@ #include "audio/audio.h" #include "audio/synth.h" +#include "assets.h" // Include generated asset header #include "gpu/gpu.h" #include "platform.h" #include "util/math.h" @@ -54,6 +55,12 @@ int main(int argc, char **argv) { const Spectrogram spec = {g_spec_buffer_a, g_spec_buffer_b, SPEC_FRAMES}; int tone_id = synth_register_spectrogram(&spec); + // Dummy call to ensure asset system is linked + size_t dummy_size; + const uint8_t* dummy_asset = GetAsset(AssetId::ASSET_NULL_ASSET, &dummy_size); + (void)dummy_asset; + (void)dummy_size; + double last_beat_time = 0.0; int beat_count = 0; |
