mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-18 22:41:58 +00:00
1
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
//========= 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
|
||||
Reference in New Issue
Block a user