mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Name variable m_unk18 (m_bmiColorsProvided)
Since this variable is passed to StretchDIBits, we can see what its supposed to mean. We dont have DX5 docs, but we have docs of the current day, and this as its 'iUsage': "Specifies whether the bmiColors member of the BITMAPINFO structure was provided and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or indexes." The second part (about what the bmiColors contains) seems redundant, since we know this is a boolean. Source: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-stretchdibits
This commit is contained in:
parent
5a061ed4f3
commit
b0747c28ff
@ -7,7 +7,7 @@ MxBitmap::MxBitmap()
|
||||
this->m_bmiHeader = NULL;
|
||||
this->m_paletteData = NULL;
|
||||
this->m_data = NULL;
|
||||
this->m_unk18 = FALSE;
|
||||
this->m_bmiColorsProvided = FALSE;
|
||||
this->m_palette = NULL;
|
||||
}
|
||||
|
||||
@ -93,10 +93,10 @@ MxPalette *MxBitmap::CreatePalette()
|
||||
MxPalette *ppal;
|
||||
MxBool success = FALSE;
|
||||
|
||||
if(this->m_unk18 == FALSE) {
|
||||
if(this->m_bmiColorsProvided == FALSE) {
|
||||
// ppal = MxPalette::FromBitmapPalette(this->m_paletteData);
|
||||
} else {
|
||||
if(this->m_unk18 != TRUE) {
|
||||
if(this->m_bmiColorsProvided != TRUE) {
|
||||
if(!success && pal != NULL) {
|
||||
delete pal;
|
||||
pal = NULL;
|
||||
@ -130,5 +130,5 @@ MxResult MxBitmap::CopyColorData(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest,
|
||||
p_ySrc = (this->m_bmiHeader->biHeight - p_destHeight) - p_ySrc;
|
||||
}
|
||||
|
||||
return StretchDIBits(p_hdc, p_xDest, p_yDest, p_destWidth, p_destHeight, p_xSrc, p_ySrc, p_destWidth, p_destHeight, this->m_data, this->m_info, this->m_unk18, SRCCOPY);
|
||||
return StretchDIBits(p_hdc, p_xDest, p_yDest, p_destWidth, p_destHeight, p_xSrc, p_ySrc, p_destWidth, p_destHeight, this->m_data, this->m_info, this->m_bmiColorsProvided, SRCCOPY);
|
||||
}
|
||||
@ -31,7 +31,7 @@ class MxBitmap : public MxCore
|
||||
BITMAPINFOHEADER *m_bmiHeader;
|
||||
RGBQUAD *m_paletteData;
|
||||
LPVOID *m_data;
|
||||
MxBool m_unk18;
|
||||
MxBool m_bmiColorsProvided; // 0x18
|
||||
MxPalette *m_palette;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user