summaryrefslogtreecommitdiff
path: root/tools/asset_packer.cc
AgeCommit message (Collapse)Author
3 daysrefactor(build): Centralize generated files and clean up project layoutskal
- Task A: Centralized all generated code (assets, timeline) into a single directory to create a single source of truth. - Task A: Isolated test asset generation into a temporary build directory, preventing pollution of the main source tree. - Task B: Vertically compacted all C/C++ source files by removing superfluous newlines. - Task C: Created a top-level README.md with project overview and file descriptions. - Task D: Moved non-essential documentation into a directory to reduce root-level clutter.
4 daysfeat(gpu/assets): Fix tests, integrate bumpy 3D renderer and procedural assetsskal
- Fixed test_sequence by restoring MainSequence::init_test for mocking. - Corrected CMakeLists.txt dependencies and source groupings to prevent duplicate symbols. - standardizing Effect constructor signature for seq_compiler compatibility. - Implemented Hybrid3DEffect using bumpy Renderer3D and procedural NOISE_TEX. - Updated MainSequence to support depth buffer for 3D elements. - Formatted all source files with clang-format.
4 daysfeat(gpu): Integrate bumpy 3D renderer into main demoskal
- Added depth buffer support to MainSequence. - Implemented Hybrid3DEffect for the main timeline. - Fixed effect initialization order in MainSequence. - Ensured depth-stencil compatibility for all scene effects. - Updated demo sequence with 3D elements and post-processing.
4 daysfeat(assets): Implement procedural asset generation pipelineskal
- Updated asset_packer to parse PROC(...) syntax. - Implemented runtime dispatch in AssetManager for procedural generation. - Added procedural generator functions (noise, grid, periodic). - Added comprehensive tests for procedural asset lifecycle.
4 daysfeat(asset_manager): Implement array-based cachingskal
- Refactored asset manager to use a static array for caching, improving performance and memory efficiency. - Updated asset_packer to correctly generate ASSET_LAST_ID for array sizing. - Modified asset_manager.h to use a forward declaration for AssetId. - Updated asset_manager.cc to use the conditional include for generated asset headers. - Added a test case in test_assets to verify the array-based cache and ASSET_LAST_ID logic.
5 daysclang-formatskal
5 daysstyle: add vertical compression rules to clang-formatskal
- Enabled AllowShortFunctionsOnASingleLine: All - Enabled AllowShortBlocksOnASingleLine: Always - Enabled AllowShortIfStatementsOnASingleLine: Always - Enabled AllowShortLoopsOnASingleLine: true - Set MaxEmptyLinesToKeep: 1 - Applied formatting to all source files.
5 daysrefactor: move generated asset files to src/generated/skal
- Updated CMakeLists.txt to generate assets.h and assets_data.cc in src/generated/. - Updated scripts/gen_assets.sh to reflect the new output location. - Modified asset_packer.cc to generate correct include paths in assets_data.cc. - Updated source files (main.cc, asset_manager.cc, test_assets.cc) to include headers from the 'generated/' subdirectory. - Ensured all targets have correct include paths to find generated headers. - Removed stale generated files from src/.
8 daysstyle updateskal
8 daysfeat(assets): Add auto-generation comment to packer outputskal
Updates to prepend a warning comment to the generated and files, indicating they are auto-generated and should not be manually edited.
8 daysrefactor(assets): Optimize asset retrieval using array lookupskal
This refactors the asset management system to be more efficient and cleaner. - Moved common GetAsset/DropAsset logic to src/util/asset_manager.cc. - Changed retrieval to use an array of records (AssetRecord) for O(1) lookups instead of a switch statement. - Updated asset_packer to generate only raw data and the record array.
9 daysdocs: Update project context and session notesskal
Summarizes recent implementations including Asset Management, audio/visual fixes, and style improvements.
9 daysstyle: Add 3-line descriptive headers to all source filesskal
This commit applies a new project-wide rule that every source file must begin with a concise 3-line comment header describing its purpose. - Updated CONTRIBUTING.md with the new rule. - Applied headers to all .cc and .h files in src/ and tools/. - Fixed various minor compilation errors and missing includes discovered during the header update process.
9 daystest(assets): Add functional tests for asset management systemskal
This commit makes the asset packer fully functional and adds an end-to-end test suite. - Updated asset_packer.cc to read file contents and embed them as hex arrays. - Added actual asset files (null.bin, test_asset.txt) for testing. - Implemented src/tests/test_assets.cc to verify data integrity at runtime. - Refactored CMakeLists.txt to handle generated file dependencies correctly.
9 daysfeat(assets): Implement basic asset packing systemskal
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).