// // SearchButton::init from 0x3ad9d8 to 0x3adb90 (440 bytes) // // 1 xrefs: // > SearchButton::create @ 0x3adbec // // 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 // bool SearchButton::init(SearchButton *a1, const char *a2, const char *a3, float a4, const char *a5) { _BOOL4 v7; // r8 const cocos2d::CCSize *v8; // r0 cocos2d::CCLabelBMFont *v9; // r0 SearchButton_vtbl *v10; // r3 cocos2d::CCLabelBMFont *m_label; // r10 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v13; // r0 SearchButton_vtbl *v14; // r3 cocos2d::CCSprite *m_icon; // r0 float width; // s18 float v17; // s17 float v18; // s18 float v19; // r0 cocos2d::CCLabelBMFont *v20; // r7 void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float v22; // s15 float v23; // s18 float v24; // s17 cocos2d::CCSprite *v25; // r4 void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCPoint v28; // [sp+4h] [bp-20h] BYREF cocos2d::CCSize v29; // [sp+Ch] [bp-18h] BYREF cocos2d::CCPoint v30; // [sp+14h] [bp-10h] BYREF v7 = cocos2d::CCSprite::initWithSpriteFrameName(a1, a2); if ( v7 ) { cocos2d::CCPoint::CCPoint(&v28, -1.0, 1.0); v8 = a1->getContentSize(a1); cocos2d::CCSize::CCSize(&v29, v8); v9 = cocos2d::CCLabelBMFont::create(); v10 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_label = v9; v10->addChild_0(a1, v9, 1); m_label = a1->m_label; setPosition = m_label->setPosition; cocos2d::CCPoint::CCPoint(&v30, v28.x + (float)(v29.width * 0.5), v28.y + (float)(v29.height * 0.5)); setPosition(m_label, &v30); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))a1->m_label->setScale)(a1->m_label, LODWORD(a4)); if ( a5 ) { if ( *a5 ) { v13 = cocos2d::CCSprite::createWithSpriteFrameName(a5); v14 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_icon = v13; v14->addChild_0(a1, v13, 1); ((void (__fastcall *)(cocos2d::CCSprite *, int))a1->m_icon->setScale)(a1->m_icon, 1066192077); m_icon = a1->m_icon; width = m_icon->m_obRect.size.width; v17 = width * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))m_icon->getScale)(m_icon)); v18 = a1->m_label->getContentSize(a1->m_label)->width; v19 = a1->m_label->getScale(a1->m_label); v20 = a1->m_label; v21 = v20->setPosition; v22 = (float)(v18 * v19) + 5.0; v23 = v17 * 0.5; v24 = (float)((float)((float)(v17 * 0.5) + v22) + 10.0) * 0.5; cocos2d::CCPoint::CCPoint( &v30, (float)((float)((float)(v29.width * 0.5) - v24) + (float)(v22 * 0.5)) + v28.x, v28.y + (float)(v29.height * 0.5)); v21(v20, &v30); v25 = a1->m_icon; v26 = v25->setPosition; cocos2d::CCPoint::CCPoint(&v30, (float)(v24 + (float)(v29.width * 0.5)) - v23, v29.height * 0.5); v26(v25, &v30); } } } return v7; }
GD Web Decomp Icon

GD Web Decomp

Raw Source