mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-23 16:21:15 +00:00
Use mxtypes. TWOCC for BM string. SetSize arg to FALSE
This commit is contained in:
parent
09ea6ea384
commit
6f31dd0e5f
@ -7,7 +7,7 @@ DECOMP_SIZE_ASSERT(MxBITMAPINFO, 0x428);
|
||||
// Bitmap header magic string "BM" (42 4d)
|
||||
// Sources: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader, DirectX Complete (1998)
|
||||
// GLOBAL: LEGO1 0x10102184
|
||||
MxU16 g_bitmapSignature = 0x4d42;
|
||||
MxU16 g_bitmapSignature = TWOCC('B', 'M');
|
||||
|
||||
// OFFSET: LEGO1 0x100bc980
|
||||
MxBitmap::MxBitmap()
|
||||
@ -132,7 +132,7 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
for (MxS32 i = 0; i < 256; i++) {
|
||||
p_rgbquad[i].rgbRed = entries[i].peRed;
|
||||
p_rgbquad[i].rgbGreen = entries[i].peGreen;
|
||||
p_rgbquad[i].rgbBlue = entries[i].peBlue;
|
||||
@ -144,7 +144,7 @@ MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palett
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcaa0
|
||||
MxResult MxBitmap::SetSize(int p_width, int p_height, MxPalette *p_palette, int p_isHighColor)
|
||||
MxResult MxBitmap::SetSize(MxS32 p_width, MxS32 p_height, MxPalette *p_palette, MxBool p_isHighColor)
|
||||
{
|
||||
MxResult ret = FAILURE;
|
||||
MxLong size = AlignToFourByte(p_width) * p_height;
|
||||
@ -366,7 +366,7 @@ MxResult MxBitmap::SetBitDepth(MxBool p_isHighColor)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd3e0
|
||||
MxResult MxBitmap::StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight)
|
||||
MxResult MxBitmap::StretchBits(HDC p_hdc, MxS32 p_xSrc, MxS32 p_ySrc, MxS32 p_xDest, MxS32 p_yDest, MxS32 p_destWidth, MxS32 p_destHeight)
|
||||
{
|
||||
// Compression fix?
|
||||
if ((this->m_bmiHeader->biCompression != 16) && (0 < this->m_bmiHeader->biHeight)) {
|
||||
|
||||
@ -31,7 +31,7 @@ class MxBitmap : public MxCore
|
||||
|
||||
virtual MxResult ImportBitmap(MxBitmap *p_bitmap); // vtable+14
|
||||
virtual MxResult ImportBitmapInfo(MxBITMAPINFO *p_info); // vtable+18
|
||||
virtual MxResult SetSize(int p_width, int p_height, MxPalette *p_palette, int); // vtable+1c
|
||||
virtual MxResult SetSize(MxS32 p_width, MxS32 p_height, MxPalette *p_palette, MxBool); // vtable+1c
|
||||
virtual MxResult LoadFile(HANDLE p_handle); // vtable+20
|
||||
__declspec(dllexport) virtual MxLong Read(const char *p_filename); // vtable+24
|
||||
virtual int vtable28(int);
|
||||
@ -40,7 +40,7 @@ class MxBitmap : public MxCore
|
||||
__declspec(dllexport) virtual MxPalette *CreatePalette(); // vtable+34
|
||||
virtual void ImportPalette(MxPalette* p_palette); // vtable+38
|
||||
virtual MxResult SetBitDepth(MxBool); // vtable+3c
|
||||
virtual MxResult StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight); // vtable+40
|
||||
virtual MxResult StretchBits(HDC p_hdc, MxS32 p_xSrc, MxS32 p_ySrc, MxS32 p_xDest, MxS32 p_yDest, MxS32 p_destWidth, MxS32 p_destHeight); // vtable+40
|
||||
|
||||
inline BITMAPINFOHEADER *GetBmiHeader() const { return m_bmiHeader; }
|
||||
|
||||
|
||||
@ -24,5 +24,5 @@ void MxSmkPresenter::VTable0x60()
|
||||
}
|
||||
|
||||
m_bitmap = new MxBitmap();
|
||||
m_bitmap->SetSize(m_smkWidth, m_smkHeight, NULL, NULL);
|
||||
m_bitmap->SetSize(m_smkWidth, m_smkHeight, NULL, FALSE);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user