mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
More work. Audio driver works enough to play music now.
This commit is contained in:
29
PortabilityLayer/QDStandardPalette.h
Normal file
29
PortabilityLayer/QDStandardPalette.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "RGBAColor.h"
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class StandardPalette
|
||||
{
|
||||
public:
|
||||
static const unsigned int kSize = 256;
|
||||
|
||||
StandardPalette();
|
||||
|
||||
const RGBAColor *GetColors() const;
|
||||
static uint8_t MapColorAnalyticTruncated(unsigned int r, unsigned int g, unsigned int b);
|
||||
static uint8_t MapColorAnalytic(uint8_t r, uint8_t g, uint8_t b);
|
||||
static uint8_t MapColorAnalytic(const RGBAColor &color);
|
||||
uint8_t MapColorLUT(uint8_t r, uint8_t g, uint8_t b) const;
|
||||
uint8_t MapColorLUT(const RGBAColor &color) const;
|
||||
|
||||
static const StandardPalette *GetInstance();
|
||||
|
||||
private:
|
||||
static StandardPalette ms_instance;
|
||||
|
||||
RGBAColor m_colors[kSize];
|
||||
uint8_t m_lut[16 * 16 * 16];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user