// // ColorChannelSprite::updateCopyLabel from 0x498f9c to 0x4990ce (306 bytes) // // 2 xrefs: // > ColorChannelSprite::updateValues @ 0x4992fa // > ColorChannelSprite::updateValues @ 0x499354 // // 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 ColorChannelSprite::updateCopyLabel(ColorChannelSprite *a1, int a2, bool a3) { _BOOL4 v3; // r8 cocos2d::CCLabelBMFont *m_copyLabel; // r3 cocos2d::CCLabelBMFont *v7; // r0 ColorChannelSprite_vtbl *v8; // r3 cocos2d::CCLabelBMFont *v9; // r9 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float width; // s17 const cocos2d::CCSize *v12; // r0 cocos2d::CCString *v13; // r0 const unsigned __int8 *CString; // r0 const cocos2d::ccColor3B *v15; // r1 cocos2d::CCPoint v16; // [sp+4h] [bp-Ch] BYREF v3 = a3; m_copyLabel = a1->m_copyLabel; if ( a2 || m_copyLabel ) { if ( !m_copyLabel ) { v7 = cocos2d::CCLabelBMFont::create(); v8 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_copyLabel = v7; v8->addChild_0(a1, v7, 1); v9 = a1->m_copyLabel; setPosition = v9->setPosition; width = a1->getContentSize(a1)->width; v12 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v16, width * 0.5, (float)(v12->height * 0.5) + 3.0); setPosition(v9, &v16); ((void (__fastcall *)(_DWORD, _DWORD))a1->m_copyLabel->setScale)(a1->m_copyLabel, 0.5); } if ( a2 ) { if ( a2 >= 1000 ) { CString = (const unsigned __int8 *)GJSpecialColorSelect::textForColorIdx(a2); } else { v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2); CString = (const unsigned __int8 *)cocos2d::CCString::getCString(v13); } a1->m_copyLabel->setString(a1->m_copyLabel, CString); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_copyLabel, 28.0, 0.5, 0.0); a1->m_copyLabel->setVisible(a1->m_copyLabel, 1); if ( v3 ) v15 = (const cocos2d::ccColor3B *)&unk_9AC080; else v15 = (const cocos2d::ccColor3B *)&word_9AC083; a1->m_copyLabel->setColor(a1->m_copyLabel, v15); } else { a1->m_copyLabel->setVisible(a1->m_copyLabel, 0); } } }