Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
889 B

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#ifndef _GAMEPALETTE_H
#define _GAMEPALETTE_H
#include <d3drmdef.h>
class CGamePalette
{
public:
CGamePalette();
~CGamePalette();
BOOL Create(LPCTSTR pszFile);
void SetBrightness(float fValue);
float GetBrightness();
operator LOGPALETTE*()
{ return pPalette; }
operator D3DRMPALETTEENTRY*()
{ return (D3DRMPALETTEENTRY*) pPalette->palPalEntry; }
operator CPalette*()
{ return &GDIPalette; }
private:
float fBrightness;
// CPalette:
CPalette GDIPalette;
// palette working with:
LOGPALETTE *pPalette;
// to convert & store in pPalette:
LOGPALETTE *pOriginalPalette;
// file stored in:
CString strFile;
// sizeof each palette:
size_t uPaletteBytes;
};
#endif