mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-30 19:51:15 +00:00
Match RegistrationBook::CreateSurface
This commit is contained in:
parent
0e004aa162
commit
945b24e16d
@ -417,6 +417,7 @@ MxResult RegistrationBook::Tickle()
|
|||||||
DDBLTFX op;
|
DDBLTFX op;
|
||||||
op.dwSize = sizeof(op);
|
op.dwSize = sizeof(op);
|
||||||
op.dwROP = 0xcc0020;
|
op.dwROP = 0xcc0020;
|
||||||
|
|
||||||
if (g_nextCheckbox) {
|
if (g_nextCheckbox) {
|
||||||
m_checkboxSurface->Blt(NULL, m_checkboxHilite, NULL, DDBLT_ROP, &op);
|
m_checkboxSurface->Blt(NULL, m_checkboxHilite, NULL, DDBLT_ROP, &op);
|
||||||
}
|
}
|
||||||
@ -427,6 +428,7 @@ MxResult RegistrationBook::Tickle()
|
|||||||
else {
|
else {
|
||||||
CreateSurface();
|
CreateSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
g_nextCheckbox = !g_nextCheckbox;
|
g_nextCheckbox = !g_nextCheckbox;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,15 +461,24 @@ MxLong RegistrationBook::HandleNotification19(MxParam& p_param)
|
|||||||
// FUNCTION: LEGO1 0x10078350
|
// FUNCTION: LEGO1 0x10078350
|
||||||
MxBool RegistrationBook::CreateSurface()
|
MxBool RegistrationBook::CreateSurface()
|
||||||
{
|
{
|
||||||
if (m_checkmark[0]) {
|
MxCompositePresenterList* list = m_checkmark[0]->GetList();
|
||||||
MxStillPresenter* back = (MxStillPresenter*) m_checkmark[0]->GetList().front();
|
MxStillPresenter *presenter, *uninitialized;
|
||||||
if (back) {
|
|
||||||
m_checkboxSurface = back->VTable0x78();
|
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 (presenter) {
|
||||||
if (checkHilite) {
|
m_checkboxSurface = presenter->VTable0x78();
|
||||||
m_checkboxHilite = checkHilite->VTable0x78();
|
}
|
||||||
|
|
||||||
|
presenter = (MxStillPresenter*) Find("MxStillPresenter", "CheckHiLite_Bitmap");
|
||||||
|
if (presenter) {
|
||||||
|
m_checkboxHilite = presenter->VTable0x78();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_checkboxSurface && m_checkboxHilite) {
|
if (m_checkboxSurface && m_checkboxHilite) {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class MxCompositePresenter : public MxPresenter {
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
} // vtable+0x64
|
} // vtable+0x64
|
||||||
|
|
||||||
inline MxCompositePresenterList& GetList() { return m_list; }
|
inline MxCompositePresenterList* GetList() { return &m_list; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MxCompositePresenterList m_list; // 0x40
|
MxCompositePresenterList m_list; // 0x40
|
||||||
|
|||||||
@ -119,7 +119,7 @@ MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter*
|
|||||||
{
|
{
|
||||||
for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) {
|
for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) {
|
||||||
if (p_presenter == *it || ((*it)->IsA("MxCompositePresenter") &&
|
if (p_presenter == *it || ((*it)->IsA("MxCompositePresenter") &&
|
||||||
ContainsPresenter(((MxCompositePresenter*) *it)->GetList(), p_presenter))) {
|
ContainsPresenter(*((MxCompositePresenter*) *it)->GetList(), p_presenter))) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user