//
// SecretGame01Layer::init from 0xa96b44 to 0xa96d3c (504 bytes)
//
// 3 xrefs:
// > SecretGame01Layer::create @ 0xa96dcc
// > ??> @ 0xb97c0
// > ??> @ 0x11f3f70
//
// 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 SecretGame01Layer::init(SecretGame01Layer *a1)
{
bool v2; // w22
cocos2d::CCDirector *v3; // x0
cocos2d::CCMenu *v4; // x0
SecretGame01Layer_vtbl *v5; // x2
cocos2d::CCArray *v6; // x0
cocos2d::CCArray *v7; // x0
cocos2d::CCArray *v8; // x0
cocos2d::CCArray *v9; // x0
cocos2d::CCSprite *v10; // x24
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
cocos2d::CCSprite *m_timeBarSprite; // x24
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
cocos2d::CCSprite *v14; // x0
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2
cocos2d::CCSprite *v16; // x21
void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // x23
float *v18; // x0
float v20; // [xsp+58h] [xbp+58h]
cocos2d::CCPoint v21; // [xsp+60h] [xbp+60h] BYREF
v2 = cocos2d::CCLayer::init(a1);
if ( v2 )
{
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v3);
v4 = cocos2d::CCMenu::create();
v5 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_mainMenu = v4;
((void (__fastcall *)(SecretGame01Layer *))v5->addChild)(a1);
v6 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCMenu *, _QWORD))a1->m_mainMenu->setTouchEnabled)(
a1->m_mainMenu,
0);
v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);
a1->m_gameObjects = v7;
cocos2d::CCObject::retain(v7);
v9 = (cocos2d::CCArray *)cocos2d::CCArray::create(v8);
a1->m_requiredObjects = v9;
cocos2d::CCObject::retain(v9);
v10 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare20_001.png");
a1->m_timeBarSprite = v10;
setPosition = v10->setPosition;
cocos2d::CCPoint::CCPoint(&v21, (float)(v20 * 0.5) + -50.0, 40.0);
setPosition(v10, &v21);
m_timeBarSprite = a1->m_timeBarSprite;
setAnchorPoint = m_timeBarSprite->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v21, 0.0, 0.5);
setAnchorPoint(m_timeBarSprite, &v21);
a1->m_timeBarSprite->setScaleY(a1->m_timeBarSprite, 0.6);
v14 = a1->m_timeBarSprite;
setColor = v14->setColor;
memset(&v21, 100, 3);
setColor(v14, (const cocos2d::ccColor3B *)&v21);
a1->m_timeBarSprite->setOpacity(a1->m_timeBarSprite, 100);
v16 = a1->m_timeBarSprite;
setScaleX = v16->setScaleX;
v18 = (float *)v16->getContentSize(v16);
setScaleX(v16, 100.0 / *v18);
a1->addChild(a1, a1->m_timeBarSprite);
a1->m_timeBarSprite->setVisible(a1->m_timeBarSprite, 0);
cocos2d::CCNode::scheduleUpdate(a1);
}
return v2;
}