diff options
Diffstat (limited to 'src/util/asset_manager.h')
| -rw-r--r-- | src/util/asset_manager.h | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/src/util/asset_manager.h b/src/util/asset_manager.h index 0c2cc63..ed7f1aa 100644 --- a/src/util/asset_manager.h +++ b/src/util/asset_manager.h @@ -1,17 +1,9 @@ // This file is part of the 64k demo project. -// It defines the core structures and interface for asset management. -// Used for efficient retrieval of embedded binary resources. +// Core asset management interface for basic asset retrieval. +// For typed helpers (TextureAsset, MeshAsset), include asset_manager_utils.h #pragma once -#include <cstddef> -#include <cstdint> - -enum class AssetId : uint16_t; // Forward declaration - -// Type for procedural generation functions: (buffer, width, height, params, -// num_params) -// Returns true on success, false on failure. -typedef bool (*ProcGenFunc)(uint8_t*, int, int, const float*, int); +#include "asset_manager_dcl.h" struct AssetRecord { const uint8_t* data; // Pointer to asset data (static or dynamic) @@ -32,29 +24,3 @@ struct AssetRecord { // - 'out_size' returns the original asset size (excluding the null terminator). const uint8_t* GetAsset(AssetId asset_id, size_t* out_size = nullptr); void DropAsset(AssetId asset_id, const uint8_t* asset); - -struct TextureAsset { - int width; - int height; - const uint8_t* pixels; -}; - -struct MeshVertex { - float p[3]; - float n[3]; - float u[2]; -}; - -struct MeshAsset { - uint32_t num_vertices; - const MeshVertex* vertices; - uint32_t num_indices; - const uint32_t* indices; -}; - -// Helper to retrieve and parse a simple texture asset (from packer's -// [w][h][pixels] format) -TextureAsset GetTextureAsset(AssetId asset_id); - -// Helper to retrieve and parse a mesh asset (from packer's binary format) -MeshAsset GetMeshAsset(AssetId asset_id); |
