blob: 6b09430dda9d1033c8d1741fdd9759dcb0219cec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// 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.
#pragma once
#include <cstddef>
#include <cstdint>
enum class AssetId : uint16_t; // Forward declaration
struct AssetRecord {
const uint8_t* data;
size_t size;
bool is_procedural; // Flag to indicate if memory was allocated dynamically
};
// Generic interface
const uint8_t* GetAsset(AssetId asset_id, size_t* out_size = nullptr);
void DropAsset(AssetId asset_id, const uint8_t* asset);
|