World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
PaletteManager.h
См. документацию.
1 #pragma once
2 
3 #include <cstdint>
4 
5 /* 148 */
6 #pragma pack(push, 1)
7 struct PaletteManager {
9 
10  void SetMistColor(unsigned char r, unsigned char g, unsigned char b);
11  int ResetNonTestLocked();
12  void CalcPalettes_LUT(int a2);
13  int ResetNonLocked();
14  int LoadPalette(unsigned int uPaletteID);
15  int MakeBasePaletteLut(int a2, char *entries);
16  void RecalculateAll();
17  int LockAll();
18  int LockTestAll();
19  void SetColorChannelInfo(int uNumRBits, int uNumGBits, int uNumBBits);
20 
21  static uint16_t *Get(int a1);
22  static uint16_t *Get_Mist_or_Red_LUT(int paletteIdx, int a2, char a3);
23  static uint16_t *Get_Dark_or_Red_LUT(int paletteIdx, int a2, char a3);
24  static uint16_t *_47C30E_get_palette(int a1, char a2);
25  static uint16_t *_47C33F_get_palette(int a1, char a2);
26 
27  uint8_t pBaseColors[50][256][3];
28  uint16_t pPalette1[50][32][256];
29  uint16_t field_D1600[50][32][256];
32  int pPaletteIDs[50];
36  unsigned char pPalette_tintColor[3];
39  unsigned int uNumTargetRBits;
40  unsigned int uNumTargetGBits;
41  unsigned int uNumTargetBBits;
42  unsigned int uTargetRMask;
43  unsigned int uTargetGMask;
44  unsigned int uTargetBMask;
45 };
46 #pragma pack(pop)
47 
48 bool HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6);
49 void RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6);
50 signed int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4);
uint16_t
unsigned __int16 uint16_t
Definition: SDL_config.h:37
PaletteManager::_47C33F_get_palette
static uint16_t * _47C33F_get_palette(int a1, char a2)
Definition: PaletteManager.cpp:832
PaletteManager
Definition: PaletteManager.h:7
PaletteManager::SetColorChannelInfo
void SetColorChannelInfo(int uNumRBits, int uNumGBits, int uNumBBits)
Definition: PaletteManager.cpp:167
PaletteManager::CalcPalettes_LUT
void CalcPalettes_LUT(int a2)
Definition: PaletteManager.cpp:187
PaletteManager::pBaseColors
uint8_t pBaseColors[50][256][3]
Definition: PaletteManager.h:27
PaletteManager::uNumTargetGBits
unsigned int uNumTargetGBits
Definition: PaletteManager.h:40
PaletteManager::field_199600_palettes
uint16_t field_199600_palettes[50][32][256]
Definition: PaletteManager.h:30
PaletteManager::Get_Dark_or_Red_LUT
static uint16_t * Get_Dark_or_Red_LUT(int paletteIdx, int a2, char a3)
Definition: PaletteManager.cpp:809
HSV2RGB
bool HSV2RGB(float *a1, float *a2, float *a3, float a4, float a5, float a6)
Definition: PaletteManager.cpp:23
PaletteManager::LoadPalette
int LoadPalette(unsigned int uPaletteID)
Definition: PaletteManager.cpp:648
PaletteManager::LockAll
int LockAll()
Definition: PaletteManager.cpp:137
PaletteManager::MakeBasePaletteLut
int MakeBasePaletteLut(int a2, char *entries)
Definition: PaletteManager.cpp:732
ReplaceHSV
signed int ReplaceHSV(unsigned int uColor, float a2, float gamma, float a4)
Definition: PaletteManager.cpp:843
PaletteManager::_num_locked
int _num_locked
Definition: PaletteManager.h:33
PaletteManager::field_D1600
uint16_t field_D1600[50][32][256]
Definition: PaletteManager.h:29
PaletteManager::pPalette_mistColor
uint8_t pPalette_mistColor[3]
Definition: PaletteManager.h:35
PaletteManager::Get
static uint16_t * Get(int a1)
Definition: PaletteManager.cpp:792
PaletteManager::LockTestAll
int LockTestAll()
Definition: PaletteManager.cpp:152
PaletteManager::field_267AD7
char field_267AD7
Definition: PaletteManager.h:38
PaletteManager::uTargetRMask
unsigned int uTargetRMask
Definition: PaletteManager.h:42
PaletteManager::Get_Mist_or_Red_LUT
static uint16_t * Get_Mist_or_Red_LUT(int paletteIdx, int a2, char a3)
Definition: PaletteManager.cpp:797
PaletteManager::field_267AD6
char field_267AD6
Definition: PaletteManager.h:37
PaletteManager::_pal_lock_test
int _pal_lock_test
Definition: PaletteManager.h:34
pPaletteManager
PaletteManager * pPaletteManager
Definition: PaletteManager.cpp:7
PaletteManager::_47C30E_get_palette
static uint16_t * _47C30E_get_palette(int a1, char a2)
Definition: PaletteManager.cpp:821
PaletteManager::ResetNonLocked
int ResetNonLocked()
Definition: PaletteManager.cpp:588
PaletteManager::pPaletteIDs
int pPaletteIDs[50]
Definition: PaletteManager.h:32
PaletteManager::RecalculateAll
void RecalculateAll()
Definition: PaletteManager.cpp:784
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
PaletteManager::ResetNonTestLocked
int ResetNonTestLocked()
Definition: PaletteManager.cpp:619
PaletteManager::uTargetGMask
unsigned int uTargetGMask
Definition: PaletteManager.h:43
b
GLboolean GLboolean GLboolean b
Definition: SDL_opengl_glext.h:1112
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
PaletteManager::SetMistColor
void SetMistColor(unsigned char r, unsigned char g, unsigned char b)
Definition: PaletteManager.cpp:776
PaletteManager::uNumTargetRBits
unsigned int uNumTargetRBits
Definition: PaletteManager.h:39
PaletteManager::pPalette1
uint16_t pPalette1[50][32][256]
Definition: PaletteManager.h:28
PaletteManager::uNumTargetBBits
unsigned int uNumTargetBBits
Definition: PaletteManager.h:41
PaletteManager::PaletteManager
PaletteManager()
Definition: PaletteManager.cpp:569
PaletteManager::field_261600
uint16_t field_261600[50][256]
Definition: PaletteManager.h:31
PaletteManager::pPalette_tintColor
unsigned char pPalette_tintColor[3]
Definition: PaletteManager.h:36
RGB2HSV
void RGB2HSV(float *a1, float *a2, float a3, float a4, float a5, float *a6)
Definition: PaletteManager.cpp:85
g
GLboolean GLboolean g
Definition: SDL_opengl_glext.h:1112
PaletteManager::uTargetBMask
unsigned int uTargetBMask
Definition: PaletteManager.h:44