// // SecretLayer6::init from 0x59f794 to 0x59fa04 (624 bytes) // // 1 xrefs: // > SecretLayer6::create @ 0x59dd3e // // 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 SecretLayer6::init(SecretLayer6 *a1) { _BOOL4 v2; // r9 cocos2d::CCTextureCache *v3; // r0 cocos2d::CCSpriteFrameCache *v4; // r0 GameManager *v5; // r6 int v6; // r2 int v7; // r3 cocos2d::CCDirector *v8; // r0 const char *v9; // r1 cocos2d::CCNode *v10; // r6 void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r3 cocos2d::CCLabelBMFont *v14; // r6 void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 SecretGame01Layer *v16; // r0 SecretLayer6_vtbl *v17; // r3 cocos2d::CCSprite *v18; // r0 CCMenuItemSpriteExtra *v19; // r10 cocos2d::CCNode *v20; // r6 void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCDirector *v22; // r0 float v23; // s17 cocos2d::CCDirector *v24; // r0 float v25; // r0 cocos2d::CCDelayTime *v26; // r0 cocos2d::CCSequence *v27; // r7 cocos2d::CCFiniteTimeAction *v28; // r0 cocos2d::CCAction *v29; // r0 cocos2d::CCSize v31; // [sp+Ch] [bp-1Ch] BYREF void (*v32)(SecretLayer6 *, cocos2d::CCObject *); // [sp+14h] [bp-14h] int v33; // [sp+18h] [bp-10h] cocos2d::CCPoint v34; // [sp+1Ch] [bp-Ch] BYREF v2 = cocos2d::CCLayer::init(a1); if ( v2 ) { v3 = cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v3, "SecretSheet.png", 0); v4 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v4, "SecretSheet.plist"); v5 = GameManager::sharedState(); sub_776584((int)&v34, "secretLoop03.mp3"); GameManager::fadeInMusic((int)v5, &v34, v6, v7); sub_774008(&v34); a1->setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v31, v8); v10 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v9); setAnchorPoint = v10->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v34, 0.0, 0.0); setAnchorPoint(v10, &v34); a1->addChild_0(a1, v10, -3); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v10->setScaleX)(v10, (float)(v31.width + 10.0) / v10[1].m_fSkewX); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v10->setScaleY)(v10, (float)(v31.height + 10.0) / v10[1].m_fSkewY); setPosition = v10->setPosition; cocos2d::CCPoint::CCPoint(&v34, -5.0, -5.0); setPosition(v10, &v34); getTag = v10->__vftable[1].getTag; LOWORD(v34.x) = 30; BYTE2(v34.x) = 60; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *))getTag)(v10, &v34); v14 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v14->setScale)(v14, 1065353216); a1->addChild(a1, v14); v15 = v14->setPosition; cocos2d::CCPoint::CCPoint(&v34, v31.width * 0.5, v31.height - 24.0); v15(v14, &v34); v16 = SecretGame01Layer::create(); v17 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_gameLayer = v16; v17->addChild_0(a1, v16, 100); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v32 = SecretLayer6::onBack; v33 = 0; v19 = CCMenuItemSpriteExtra::create( v18, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SecretLayer6::onBack, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v19, 1.5); v20 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v19, nullptr); a1->addChild_0(a1, v20, 1); v21 = v20->setPosition; v22 = cocos2d::CCDirector::sharedDirector(); v23 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v22)); v24 = cocos2d::CCDirector::sharedDirector(); v25 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v24)); cocos2d::CCPoint::CCPoint(&v34, v23 + 24.0, v25 - 23.0); v21(v20, &v34); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v19); v26 = cocos2d::CCDelayTime::create(0.5); v34.y = 0.0; LODWORD(v34.x) = SecretLayer6::startGame01; v27 = (cocos2d::CCSequence *)v26; v28 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, SecretLayer6::startGame01, 0); v29 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v27, v28, 0); cocos2d::CCNode::runAction(a1, v29); } return v2; }
GD Web Decomp Icon

GD Web Decomp

Raw Source