diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-03 18:44:41 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-03 18:44:41 +0100 |
| commit | bf46e44e1cb6027a072819a2a3aa3be32651f6e1 (patch) | |
| tree | 21267e7ef52fd91e7b99271ed87e275e91b3de3c /TODO.md | |
| parent | 815c428dea14a6a1ea5c421c400985d0c14d473d (diff) | |
refactor: Task #20 - Platform & Code Hygiene
- Consolidated all WebGPU shims and platform-specific logic into src/platform.h.
- Refactored platform_init to return PlatformState by value and platform_poll to automatically refresh time and aspect_ratio.
- Removed STL dependencies (std::map, std::vector, std::string) from AssetManager and Procedural subsystems.
- Fixed Windows cross-compilation by adjusting include paths and linker flags in CMakeLists.txt and updating build_win.sh.
- Removed redundant direct inclusions of GLFW/glfw3.h and WebGPU headers across the project.
- Applied clang-format and updated documentation.
handoff(Gemini): Completed Task #20 and 20.1. Platform abstraction is now unified, and core paths are STL-free. Windows build is stable.
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -3,6 +3,12 @@ This file tracks prioritized tasks with detailed attack plans. ## Recently Completed (February 3, 2026) +- [x] **Task #20: Platform & Code Hygiene**: + - [x] **Header Consolidation:** Moved all `#ifdef` logic for WebGPU headers and platform-specific shims into `src/platform.h`. + - [x] **Refactor platform_init:** Changed `void platform_init(PlatformState* state, ...)` to `PlatformState platform_init(...)` for cleaner value-based initialization. + - [x] **Unified Poll:** Incorporated `time` and `aspect_ratio` updates into `platform_poll()`, abstracting away direct GLFW calls from main loop. + - [x] **Standard Container Removal (AssetManager):** Replaced `std::map`, `std::string`, and `std::vector` in `AssetManager` and `procedural` generators with C-style alternatives (static arrays, raw pointers, malloc/free). + - [x] **Music System Bug Fixes & Rock Track Implementation**: - [x] **Fixed Critical Pool Exhaustion Bug**: Tracker pool slots were never freed, causing music to stop after 8 patterns. Implemented round-robin slot allocation with proper cleanup. - [x] **Fixed Note Name Parsing**: Added automatic note-name-to-frequency conversion (E2→82.4Hz, A4→440Hz, etc.) in `tracker_compiler.cc`. Bass and melody now play correctly. @@ -27,14 +33,7 @@ This file tracks prioritized tasks with detailed attack plans. - [x] **Shader Asset Integration (Task #24)**: Extracted hardcoded shaders to `.wgsl` assets, updated `asset_packer` for string safety, and refactored C++ code to use `GetAsset`. - [x] **WebGPU Stability & macOS Fixes**: Resolved surface creation failures by adding `GLFW_EXPOSE_NATIVE_COCOA` and fixed validation errors in surface configuration and render pass attachments. -## Priority 1: Platform & Code Hygiene (Task #20) -**Goal:** Clean up the codebase for easier cross-platform maintenance and CRT replacement. -- [ ] **Attack Plan - Header Consolidation:** Move all `#ifdef` logic for WebGPU headers and platform-specific shims into `src/platform.h`. -- [ ] **Attack Plan - Refactor platform_init:** Change `void platform_init(PlatformState* state, ...)` to `PlatformState platform_init(...)`. -- [ ] **Attack Plan - Unified Poll:** Incorporate `platform_get_time()` and `platform_get_aspect_ratio()` updates into `platform_poll()`. -- [ ] **Attack Plan - Standard Container Removal:** Replace `std::map`, `std::string`, and `std::vector` in performance-critical or size-sensitive paths with simpler C-style alternatives. - -## Priority 2: 3D System Enhancements (Task #18) +## Priority 1: 3D System Enhancements (Task #18) **Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry. - [ ] **Attack Plan - Blender Exporter:** Create a Python script (`tools/blender_export.py`) to export meshes/cameras/lights to a binary asset format. - [ ] **Attack Plan - Asset Ingestion:** Update `asset_packer` to handle the new 3D binary format. |
