Implement FUN_100b6e10 and MxRect32 adjustments (#390)

* Some WIP rect

* Adjustments to MxRect32

* Spacing

* Changes

* Spacing

* Spacing
This commit is contained in:
Christian Semmler
2023-12-29 23:55:36 -05:00
committed by GitHub
parent b4b73465d0
commit bb22b21260
7 changed files with 129 additions and 41 deletions

View File

@@ -71,7 +71,13 @@ void MxStillPresenter::LoadFrame(MxStreamChunk* p_chunk)
{
memcpy(m_bitmap->GetBitmapData(), p_chunk->GetData(), p_chunk->GetLength());
MxRect32 rect(m_location, MxSize32(GetWidth() - 1, GetHeight() - 1));
// MxRect32 rect(m_location, MxSize32(GetWidth(), GetHeight()));
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);
MVideoManager()->InvalidateRect(rect);
if (m_flags & Flag_Bit2) {
@@ -170,7 +176,13 @@ void MxStillPresenter::Enable(MxBool p_enable)
MxVideoPresenter::Enable(p_enable);
if (MVideoManager() && (m_alpha || m_bitmap)) {
MxRect32 rect(m_location, MxSize32(GetWidth(), GetHeight()));
// MxRect32 rect(m_location, MxSize32(GetWidth(), GetHeight()));
MxS32 height = GetHeight();
MxS32 width = GetWidth();
MxS32 x = m_location.GetX();
MxS32 y = m_location.GetY();
MxRect32 rect(x, y, width + x, height + y);
MVideoManager()->InvalidateRect(rect);
MVideoManager()->VTable0x34(rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight());
}