DSC Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DSC::PaletteAllocationResult Struct Reference

Struct that contains information following an asset allocation attempt via PaletteManager::try_load().
More...

#include <palette_manager.hpp>

Public Member Functions

 PaletteAllocationResult (short *indices=nullptr, int length=0, char color_depth=0, bool succeeded=false)
 
 PaletteAllocationResult (const PaletteAllocationResult &)
 
 PaletteAllocationResult (PaletteAllocationResult &&)
 
PaletteAllocationResultoperator= (const PaletteAllocationResult &other)
 
PaletteAllocationResultoperator= (PaletteAllocationResult &&other)
 
bool operator== (const PaletteAllocationResult &other) const
 

Public Attributes

short * indices = nullptr
 The positions colors have been dynamically allocated to. More...
 
int length
 size of the provided indices More...
 
char color_depth
 color depth of the asset
 
bool succeeded
 flag that specifies whether the operation succeeded or failed. This struct contains relevant data only if succeeded == true.
 

Detailed Description

Struct that contains information following an asset allocation attempt via PaletteManager::try_load().

Member Data Documentation

◆ indices

short* DSC::PaletteAllocationResult::indices = nullptr

The positions colors have been dynamically allocated to.

  • if asset is 4-bit, then indices contains a single value, which is the 4-bit palette slot that has been assigned to the asset's palette. (0x0..0xF)
  • if asset is 8-bit, then for any index i, indices[i] is the position of the color that has the index i in the readonly asset data

◆ length

int DSC::PaletteAllocationResult::length

size of the provided indices

  • if asset is 4-bit, then the length is 1
  • if asset is 8-bit, then the length is equal to the asset's palette length

The documentation for this struct was generated from the following file: