6#include "DSCEngine/types/hash_map.hpp"
7#include "DSCEngine/resources/asset_data.hpp"
11 struct PaletteAllocationResult;
18 static int hashColor(
const short& color);
23 short records4bpp[16];
27 int get_chksum(
short* colors);
28 int get_pal16(
short* colors,
int chksum);
Definition: asset_data.hpp:8
Generic hash map.
Definition: hash_map.hpp:18
Automatic palette manager.
Definition: palette_manager.hpp:16
void unload16(const void *palette4)
removes a 4-bit palette
void unload(const AssetData *asset)
Unloads colors from a previously loaded asset data palette.
PaletteAllocationResult try_load(const AssetData *asset)
Attempts to load colors from asset data palette.
PaletteManager(void *palettes_offset)
creates a new PaletteManager instance
int reserve16(const void *palette4)
loads a 4-bit palette
void unload1(int color)
removes a certain color from the palette
int reserve1(int color)
choose an index for the specified color
Struct that contains information following an asset allocation attempt via PaletteManager::try_load()...
Definition: palette_manager.hpp:93
bool succeeded
flag that specifies whether the operation succeeded or failed. This struct contains relevant data onl...
Definition: palette_manager.hpp:117
char color_depth
color depth of the asset
Definition: palette_manager.hpp:112
short * indices
The positions colors have been dynamically allocated to.
Definition: palette_manager.hpp:101
int length
size of the provided indices
Definition: palette_manager.hpp:108