summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-03 18:48:18 +0100
committerskal <pascal.massimino@gmail.com>2026-02-03 18:48:18 +0100
commitbeb6fb14543b69b096f91142e82016ccacd1d9eb (patch)
tree76f31bf1433457ef344e8a196b98754c4ca95ea7
parentbf46e44e1cb6027a072819a2a3aa3be32651f6e1 (diff)
docs: defer full STL removal to Phase 2
Lowered the priority of the 'replace STL' task. It will be addressed in the final optimization phase (Phase 2) to simplify current development. Hot paths in AssetManager and Procedural remain optimized. handoff(Gemini): STL usage is now permitted for non-critical paths until the final optimization phase. PROJECT_CONTEXT.md and TODO.md updated accordingly.
-rw-r--r--PROJECT_CONTEXT.md12
-rw-r--r--TODO.md14
-rw-r--r--doc/ASSET_SYSTEM.md25
3 files changed, 20 insertions, 31 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md
index bd19aa4..430854e 100644
--- a/PROJECT_CONTEXT.md
+++ b/PROJECT_CONTEXT.md
@@ -28,7 +28,7 @@ Style:
## Project Roadmap
### Recently Completed
-- **Task #20: Platform & Code Hygiene**: Consolidated platform-specific shims and WebGPU headers into `platform.h`. Refactored `platform_init` and `platform_poll` for better abstraction. Removed STL containers (`std::map`, `std::vector`, `std::string`) from `AssetManager` and procedural generators.
+- **Task #20: Platform & Code Hygiene**: Consolidated platform-specific shims and WebGPU headers into `platform.h`. Refactored `platform_init` and `platform_poll` for better abstraction. Removed STL containers from initial hot paths (`AssetManager`, `procedural`). Full STL removal for CRT replacement is deferred to the final optimization phase.
- **Task #26: Shader Asset Testing & Validation**: Developed comprehensive tests for `ShaderComposer` and WGSL asset loading/composition. Added a shader validation test to ensure production assets are valid.
- **Asset Pipeline Improvement**: Created a robust `gen_spectrograms.sh` script to automate the conversion of `.wav` and `.aif` files to `.spec` format, replacing the old, fragile script. Added 13 new drum and bass samples to the project.
- **Build System Consolidation (Task #25)**: Modularized the build by creating subsystem libraries (audio, gpu, 3d, util, procedural) and implemented helper macros to reduce boilerplate in `CMakeLists.txt`. This improves build maintenance and prepares for future CRT replacement.
@@ -44,11 +44,11 @@ Style:
---
## Next Up
-- **Task #20: Platform & Code Hygiene**
- - [ ] Gather all cross-compile and platform-specific conditional code into `platform.h`.
- - [ ] Refactor `platform_init()` and `platform_poll()` for cleaner abstraction.
- - [ ] Consolidate WebGPU header inclusions.
- - [ ] Remove `std::map`/`std::vector` from hot paths to prepare for CRT replacement.
+- **Task #20: Platform & Code Hygiene** (Completed)
+ - [x] Gather all cross-compile and platform-specific conditional code into `platform.h`.
+ - [x] Refactor `platform_init()` and `platform_poll()` for cleaner abstraction.
+ - [x] Consolidate WebGPU header inclusions.
+ - [ ] Remove `std::map`/`std::vector` from remaining paths (Deferred to Phase 2).
- **Task #18: 3D System Enhancements**
- [ ] **Blender Exporter**: Create script to export scenes to internal binary format.
diff --git a/TODO.md b/TODO.md
index 391e8a7..640c5f2 100644
--- a/TODO.md
+++ b/TODO.md
@@ -39,8 +39,14 @@ This file tracks prioritized tasks with detailed attack plans.
- [ ] **Attack Plan - Asset Ingestion:** Update `asset_packer` to handle the new 3D binary format.
- [ ] **Attack Plan - Runtime Loader:** Implement a minimal C++ parser to load the scene data into the ECS/Renderer.
-## Future Goals
-- [ ] **Task #21: Shader Optimization**: Normal factorization and Tri-planar mapping.
-- [ ] **Task #5: Spectrogram Editor**: Web-based visual tool for extreme audio compression.
+## Phase 2: Size Optimization (Final Goal)
+
+- [ ] **Full STL Removal**: Replace all remaining `std::vector`, `std::map`, and `std::string` usage with custom minimal containers or C-style arrays to allow for CRT replacement. (Minimal Priority - deferred to end).
+
- [ ] **Task #22: Windows Native Platform**: Replace GLFW with direct Win32 API calls for the final 64k push.
-- [ ] **Task #23: Shader Performance Analysis**: Analyze shader performance using Xcode Metal debugger on macOS. \ No newline at end of file
+
+- [ ] **Spectrogram Quantization (Task #28)**: research optimal frequency bin distribution.
+
+
+
+## Future Goals
diff --git a/doc/ASSET_SYSTEM.md b/doc/ASSET_SYSTEM.md
index 9cf15ba..5f89380 100644
--- a/doc/ASSET_SYSTEM.md
+++ b/doc/ASSET_SYSTEM.md
@@ -168,26 +168,9 @@ Shader code (WGSL) can also be managed as assets.
## Medium Priority (Code Hygiene & Maintainability)
-### Task #20.1: Remove STL from Asset Manager (Part of Task #20)
+### Task #20.1: Remove STL from Asset Manager (Part of Task #20) - COMPLETED
**Goal**: Eliminate `std::map` and `std::string` to prepare for CRT replacement.
-
-**Attack Plan**:
-- [ ] **20.1.1**: Replace `kAssetManagerProcGenFuncMap` (line 21 in `asset_manager.cc`)
- - Switch to static array lookup or compile-time switch-case
- - Example:
- ```cpp
- static const struct { const char* name; ProcGenFunc func; } kProcGenFuncs[] = {
- {"gen_noise", procedural::gen_noise},
- {"gen_grid", procedural::gen_grid},
- {"make_periodic", procedural::make_periodic},
- };
- ```
-- [ ] **20.1.2**: Replace `std::map` in `asset_packer.cc` (build-time tool, lower priority)
-- [ ] **20.1.3**: Verify no STL usage remains in `src/util/asset_manager.cc`
-
-**Size Impact**: Minor (few KB), but critical for future CRT replacement.
-
-**Dependency**: None.
+**Status**: Initial removal for `AssetManager` hot paths completed. Full removal across the codebase deferred to Phase 2.
---
@@ -284,5 +267,5 @@ For the **64k goal**, prioritize in this order:
1. **Task #27** (Compression) - Biggest size win
2. **Task #29** (Shader Minification) - Easy win, low risk
3. **Task #28** (Spectrogram Quantization) - Medium effort, high impact
-4. **Task #20.1** (Remove STL) - Required for future CRT replacement
-5. **Task #18.1** (3D Assets) - Once size budget allows
+4. **Task #18.1** (3D Assets) - Once size budget allows
+5. **Full STL Removal** - Deferred to final optimization phase.