mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
MxBitmap code clarity (#195)
* MxBitmap code clarity * Use mxtypes. TWOCC for BM string. SetSize arg to FALSE
This commit is contained in:
@@ -21,10 +21,6 @@ struct MxBITMAPINFO {
|
||||
RGBQUAD bmiColors[256];
|
||||
};
|
||||
|
||||
// These values are the bit depth, set in the registry
|
||||
#define LOWCOLOR 0 // 256 color
|
||||
#define HIGHCOLOR 1 // High Color (16-bit)
|
||||
|
||||
// SIZE 0x20
|
||||
// VTABLE 0x100dc7b0
|
||||
class MxBitmap : public MxCore
|
||||
@@ -35,7 +31,7 @@ public:
|
||||
|
||||
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);
|
||||
@@ -44,7 +40,7 @@ public:
|
||||
__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; }
|
||||
|
||||
@@ -54,8 +50,8 @@ private:
|
||||
MxBITMAPINFO *m_info; // 0x8
|
||||
BITMAPINFOHEADER *m_bmiHeader; // 0xc
|
||||
RGBQUAD *m_paletteData; // 0x10
|
||||
LPVOID *m_data; // 0x14
|
||||
MxBool m_bitDepth; // 0x18
|
||||
MxU8 *m_data; // 0x14
|
||||
MxBool m_isHighColor; // 0x18
|
||||
MxPalette *m_palette; // 0x1c
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user