Implement MxVideoPresenter::PutFrame (#389)

* Implementation of MxVideoPresenter::PutFrame

* Add TODOs
This commit is contained in:
Christian Semmler
2023-12-29 16:30:17 -05:00
committed by GitHub
parent ceb5339369
commit 51adb31541
8 changed files with 186 additions and 50 deletions

View File

@@ -71,12 +71,7 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
{
memcpy(m_bitmap->GetBitmapData(), p_chunk->GetData(), p_chunk->GetLength());
MxS32 height = GetHeight() - 1;
MxS32 width = GetWidth() - 1;
MxS32 x = m_location.GetX();
MxS32 y = m_location.GetY();
MxRect32 rect(x, y, width + x, height + y);
MxRect32 rect(m_location, MxSize32(GetWidth() - 1, GetHeight() - 1));
MVideoManager()->InvalidateRect(rect);
if (m_flags & Flag_Bit2) {
@@ -154,6 +149,7 @@ void MxStillPresenter::VTable0x88(MxS32 p_x, MxS32 p_y)
m_location.SetY(p_y);
if (IsEnabled()) {
// Most likely needs to work with MxSize32 and MxPoint32
MxS32 height = GetHeight() - 1;
MxS32 width = GetWidth() - 1;
@@ -174,12 +170,7 @@ void MxStillPresenter::Enable(MxBool p_enable)
MxVideoPresenter::Enable(p_enable);
if (MVideoManager() && (m_alpha || m_bitmap)) {
MxS32 height = GetHeight();
MxS32 width = GetWidth();
MxS32 x = m_location.GetX();
MxS32 y = m_location.GetY();
MxRect32 rect(x, y, width + x, height + y);
MxRect32 rect(m_location, MxSize32(GetWidth(), GetHeight()));
MVideoManager()->InvalidateRect(rect);
MVideoManager()->VTable0x34(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight());
}