// // OptionsCell::loadFromObject from 0x1002441b0 to 0x1002444ea (826 bytes) // // 2 xrefs: // > CustomListView::loadCell @ 0x100242676 // > CustomListView::reloadAll @ 0x10024e313 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall OptionsCell::loadFromObject(OptionsCell *a1, OptionsObject *a2) { int m_count; // r15d std::array *longStorage; // r14 cocos2d::CCLabelBMFont *v5; // r14 const std::string::value_type *p_s; // rsi std::string::size_type v7; // rdx const char *data; // rdi cocos2d::CCLabelBMFont *v9; // r15 __int64 v10; // r12 float v11; // xmm2_4 const char *v12; // rdi cocos2d::CCSprite *v13; // r14 CCMenuItemSpriteExtra *v14; // rax int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d __int64 v19; // r14 _BYTE v20[8]; // [rsp+4h] [rbp-5Ch] BYREF float v21; // [rsp+Ch] [rbp-54h] unsigned __int8 v22; // [rsp+10h] [rbp-50h] BYREF std::string::value_type __s; // [rsp+11h] [rbp-4Fh] BYREF std::string::size_type v24; // [rsp+18h] [rbp-48h] void *__p; // [rsp+20h] [rbp-40h] std::string v26; // [rsp+28h] [rbp-38h] BYREF a1->m_optionsObject = a2; ((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1); m_count = a2->m_count; if ( (a2->m_name.m_data.m_short.sizex2 & 1) != 0 ) longStorage = (std::array *)a2->m_name.m_data.m_long.longStorage; else longStorage = &a2->m_name.m_data.m_short.shortStorage; v5 = cocos2d::CCLabelBMFont::create_3(longStorage->__elems_, "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v5, 2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v5->setScale)(v5, 0.40000001); sub_10028CBE0(&v26, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v5->setAnchorPoint)(v5, &v26); sub_10028CBE0(&v26, 40.0, 0.5 * a1->m_height); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v5->setPosition)(v5, &v26); if ( m_count ) { if ( m_count > 0 ) { v26.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)4; strcpy(v26.__r_.__value_.__s.__data_, "[ "); GameToolbox::intToString(&v22, (unsigned int)m_count); if ( (v22 & 1) != 0 ) { p_s = (const std::string::value_type *)__p; v7 = v24; } else { v7 = v22 >> 1; p_s = &__s; } std::string::append(&v26, p_s, v7); if ( (v22 & 1) != 0 ) operator delete(__p); std::string::append(&v26, " ]"); if ( (*(_BYTE *)&v26.__r_.__value_.__s.0 & 1) != 0 ) data = v26.__r_.__value_.__l.__data_; else data = v26.__r_.__value_.__s.__data_; v9 = cocos2d::CCLabelBMFont::create_3(data, "chatFont.fnt"); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v9, 2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v9->setScale)(v9, 0.60000002); sub_10028CBE0(&v22, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int8 *))v9->setAnchorPoint)(v9, &v22); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v9->setColor)(v9, &unk_100818050); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v9->setOpacity)(v9, 175); v10 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v5->getPosition)(v5); v21 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v5->getContentSize)(v5); v11 = (float)(v21 * ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v5->getScale)(v5)) + 8.0; sub_10028CBE0(v20, v11, 0.0); sub_10028CCE0(&v22, v10); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int8 *))v9->setPosition)(v9, &v22); if ( (*(_BYTE *)&v26.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v26.__r_.__value_.__l.__data_); } } else { v26.__r_.__value_.__s.__data_[1] = -106; *(_WORD *)&v26.__r_.__value_.__l.0 = -26986; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v5->setColor)(v5, &v26); } v12 = "GJ_checkOff_001.png"; if ( a1->m_optionsObject->m_enabled ) v12 = "GJ_checkOn_001.png"; v13 = cocos2d::CCSprite::createWithSpriteFrameName(v12); ((void (__fastcall *)(cocos2d::CCSprite *, float))v13->setScale)(v13, 0.60000002); v14 = CCMenuItemSpriteExtra::create( v13, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)OptionsCell::onToggleOption); LODWORD(v13) = (_DWORD)v14; CCMenuItemSpriteExtra::setSizeMult(v14, 1.5); v19 = sub_100792C50((_DWORD)v13, 0, v15, v16, v17, v18); ((void (__fastcall *)(cocos2d::CCLayer *, __int64, __int64))a1->m_mainLayer->addChild_0)(a1->m_mainLayer, v19, 3); sub_10028CBE0(&v26, 20.0, a1->m_height * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v19 + 184LL))(v19, &v26); }
GD Web Decomp Icon

GD Web Decomp

Raw Source