From 3108fb0065a51dfc3548836ea16b287e92cd8881 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Feb 2026 19:06:41 +0100 Subject: feat: side-quest - Perlin noise sky and ProcGenFunc error handling - Updated ProcGenFunc signature to return bool for error reporting. - Implemented gen_perlin (Fractional Brownian Motion) in procedural/generator.cc. - Added support for sky texture in Renderer3D and its shader. - Integrated Perlin noise sky texture in test_3d_render.cc. - Caught and handled memory/generation errors in AssetManager and TextureManager. - Assigned reference numbers to all remaining tasks in documentation. handoff(Gemini): Side-quest complete. ProcGenFunc now returns bool. Perlin noise added and used for sky in 3D test. Windows build remains stable. All tasks numbered. --- src/util/asset_manager.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util/asset_manager.h') diff --git a/src/util/asset_manager.h b/src/util/asset_manager.h index 062cd0f..964b7af 100644 --- a/src/util/asset_manager.h +++ b/src/util/asset_manager.h @@ -10,7 +10,8 @@ enum class AssetId : uint16_t; // Forward declaration // Type for procedural generation functions: (buffer, width, height, params, // num_params) -typedef void (*ProcGenFunc)(uint8_t*, int, int, const float*, int); +// Returns true on success, false on failure. +typedef bool (*ProcGenFunc)(uint8_t*, int, int, const float*, int); struct AssetRecord { const uint8_t* data; // Pointer to asset data (static or dynamic) -- cgit v1.2.3