Copy constructor for MxVideoPresenter::AlphaMask (#229)

This commit is contained in:
MS 2023-10-21 19:47:48 -04:00 committed by GitHub
parent af0e38176c
commit ae908a74cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -67,7 +67,7 @@ MxS32 MxVideoPresenter::GetHeight()
} }
// OFFSET: LEGO1 0x100b24f0 // OFFSET: LEGO1 0x100b24f0
MxVideoPresenter::AlphaMask::AlphaMask(MxBitmap &p_bitmap) MxVideoPresenter::AlphaMask::AlphaMask(const MxBitmap &p_bitmap)
{ {
m_width = p_bitmap.GetBmiWidth(); m_width = p_bitmap.GetBmiWidth();
// DECOMP: ECX becomes word-sized if these are not two separate actions. // DECOMP: ECX becomes word-sized if these are not two separate actions.
@ -147,6 +147,18 @@ MxVideoPresenter::AlphaMask::AlphaMask(MxBitmap &p_bitmap)
} }
} }
// OFFSET: LEGO1 0x100b2670
MxVideoPresenter::AlphaMask::AlphaMask(const MxVideoPresenter::AlphaMask &p_alpha)
{
m_width = p_alpha.m_width;
m_height = p_alpha.m_height;
MxS32 size = ((m_width * m_height) / 8) + 1;
m_bitmask = new MxU8[size];
memcpy(m_bitmask, p_alpha.m_bitmask, size);
}
// OFFSET: LEGO1 0x100b26d0 // OFFSET: LEGO1 0x100b26d0
MxVideoPresenter::AlphaMask::~AlphaMask() MxVideoPresenter::AlphaMask::~AlphaMask()
{ {

View file

@ -55,7 +55,8 @@ class MxVideoPresenter : public MxMediaPresenter
MxU16 m_width; MxU16 m_width;
MxU16 m_height; MxU16 m_height;
AlphaMask(MxBitmap &); AlphaMask(const MxBitmap &);
AlphaMask(const AlphaMask &);
virtual ~AlphaMask(); virtual ~AlphaMask();
}; };