diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index c250c47a..aef8ad49 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -417,6 +417,7 @@ MxResult RegistrationBook::Tickle() DDBLTFX op; op.dwSize = sizeof(op); op.dwROP = 0xcc0020; + if (g_nextCheckbox) { m_checkboxSurface->Blt(NULL, m_checkboxHilite, NULL, DDBLT_ROP, &op); } @@ -427,6 +428,7 @@ MxResult RegistrationBook::Tickle() else { CreateSurface(); } + g_nextCheckbox = !g_nextCheckbox; } } @@ -459,15 +461,24 @@ MxLong RegistrationBook::HandleNotification19(MxParam& p_param) // FUNCTION: LEGO1 0x10078350 MxBool RegistrationBook::CreateSurface() { - if (m_checkmark[0]) { - MxStillPresenter* back = (MxStillPresenter*) m_checkmark[0]->GetList().front(); - if (back) { - m_checkboxSurface = back->VTable0x78(); + MxCompositePresenterList* list = m_checkmark[0]->GetList(); + MxStillPresenter *presenter, *uninitialized; + + if (list) { + if (list->begin() != list->end()) { + presenter = (MxStillPresenter*) list->front(); + } + else { + presenter = uninitialized; // intentionally uninitialized variable } - MxStillPresenter* checkHilite = (MxStillPresenter*) Find("MxStillPresenter", "CheckHiLite_Bitmap"); - if (checkHilite) { - m_checkboxHilite = checkHilite->VTable0x78(); + if (presenter) { + m_checkboxSurface = presenter->VTable0x78(); + } + + presenter = (MxStillPresenter*) Find("MxStillPresenter", "CheckHiLite_Bitmap"); + if (presenter) { + m_checkboxHilite = presenter->VTable0x78(); } if (m_checkboxSurface && m_checkboxHilite) { diff --git a/LEGO1/omni/include/mxcompositepresenter.h b/LEGO1/omni/include/mxcompositepresenter.h index a39507c0..2e5a6d95 100644 --- a/LEGO1/omni/include/mxcompositepresenter.h +++ b/LEGO1/omni/include/mxcompositepresenter.h @@ -47,7 +47,7 @@ class MxCompositePresenter : public MxPresenter { return TRUE; } // vtable+0x64 - inline MxCompositePresenterList& GetList() { return m_list; } + inline MxCompositePresenterList* GetList() { return &m_list; } protected: MxCompositePresenterList m_list; // 0x40 diff --git a/LEGO1/omni/src/common/mxutilities.cpp b/LEGO1/omni/src/common/mxutilities.cpp index 7030848c..26dd733b 100644 --- a/LEGO1/omni/src/common/mxutilities.cpp +++ b/LEGO1/omni/src/common/mxutilities.cpp @@ -119,7 +119,7 @@ MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* { for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) { if (p_presenter == *it || ((*it)->IsA("MxCompositePresenter") && - ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter))) { + ContainsPresenter(*((MxCompositePresenter*) *it)->GetList(), p_presenter))) { return TRUE; } }