mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
Match RegistrationBook::CreateSurface
This commit is contained in:
parent
0e004aa162
commit
945b24e16d
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user