// // CCCountdown::init from 0x2e53d8 to 0x2e5578 (416 bytes) // // 1 xrefs: // > CCCountdown::create @ 0x2e56f0 // // 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 CCCountdown::init(CCCountdown *a1) { const char *v2; // r1 int v3; // r8 cocos2d::CCSprite *v4; // r0 cocos2d::CCProgressTimer *v5; // r0 cocos2d::CCProgressTimer *m_progressTimer; // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float width; // s17 const cocos2d::CCSize *v9; // r0 cocos2d::CCSprite *m_pSprite; // r0 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3 cocos2d::CCLabelBMFont *v12; // r0 cocos2d::CCLabelBMFont_vtbl *v13; // r3 cocos2d::CCLabelBMFont *v14; // r7 void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float v16; // s17 const cocos2d::CCSize *v17; // r0 cocos2d::CCLabelBMFont *m_countdownLabel; // r7 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCLabelBMFont *v20; // r7 int v21; // r11 void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+4h] [bp-20h] cocos2d::CCPoint v24; // [sp+Ch] [bp-18h] BYREF cocos2d::CCPoint v25; // [sp+14h] [bp-10h] BYREF v3 = cocos2d::CCSprite::initWithFile(a1, "timer_outerCircle.png"); if ( v3 ) { v4 = (cocos2d::CCSprite *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"timer_innerCircle.png", v2); v5 = cocos2d::CCProgressTimer::create(v4); a1->m_progressTimer = v5; cocos2d::CCProgressTimer::setType(v5, kCCProgressTimerTypeRadial); a1->addChild_0(a1, a1->m_progressTimer, -1); m_progressTimer = a1->m_progressTimer; setPosition = m_progressTimer->setPosition; width = a1->getContentSize(a1)->width; v9 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v25, width * 0.5, v9->height * 0.5); setPosition(m_progressTimer, &v25); cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 100.0); m_pSprite = a1->m_progressTimer->m_pSprite; setColor = m_pSprite->setColor; LOWORD(v25.x) = 10240; BYTE2(v25.x) = 70; setColor(m_pSprite, (const cocos2d::ccColor3B *)&v25); cocos2d::CCProgressTimer::updateColor(a1->m_progressTimer); a1->m_progressTimer->m_bReverseDirection = 1; v12 = cocos2d::CCLabelBMFont::create(); v13 = v12->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v14 = v12; a1->m_countdownLabel = v12; v15 = v13->setPosition; v16 = a1->getContentSize(a1)->width; v17 = a1->getContentSize(a1); cocos2d::CCPoint::CCPoint(&v25, v16 * 0.5, v17->height * 0.5); v15(v14, &v25); m_countdownLabel = a1->m_countdownLabel; setAnchorPoint = m_countdownLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v25, 0.5, 0.5); setAnchorPoint(m_countdownLabel, &v25); v20 = a1->m_countdownLabel; v23 = v20->setPosition; v21 = (int)v20->getPosition(v20); cocos2d::CCPoint::CCPoint(&v24, 0.0, -3.0); cocos2d::CCPoint::operator+(&v25, v21, &v24); v23(v20, &v25); a1->addChild_0(a1, a1->m_countdownLabel, 1); } return v3; }