// // SecretLayer6::init from 0x10047eb70 to 0x10047ef31 (961 bytes) // // 3 xrefs: // > SecretLayer6::scene @ 0x10047ea70 // > SecretLayer6::create @ 0x10047eb2f // > @ 0x10093bee8 // // 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 __fastcall SecretLayer6::init(SecretLayer6 *a1) { bool result; // al bool v2; // r13 cocos2d::CCTextureCache *v3; // rax cocos2d::CCSpriteFrameCache *v4; // rax GameManager *v5; // rax cocos2d::CCSprite *v6; // r14 cocos2d::CCLabelBMFont *v7; // r14 char *v8; // r14 cocos2d::CCSprite *v9; // rax CCMenuItemSpriteExtra *v10; // r14 int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d __int64 v15; // r15 cocos2d::CCDirector *v16; // rax cocos2d::CCDirector *v17; // rax double v18; // xmm0_8 cocos2d::CCDelayTime *v19; // r14 cocos2d::CCCallFunc *v20; // rax cocos2d::CCSequence *v21; // rax void *v22[3]; // [rsp+8h] [rbp-58h] BYREF float v23; // [rsp+24h] [rbp-3Ch] float v24; // [rsp+28h] [rbp-38h] BYREF float v25; // [rsp+2Ch] [rbp-34h] float v26[12]; // [rsp+30h] [rbp-30h] BYREF result = cocos2d::CCLayer::init(a1); if ( result ) { v2 = result; v3 = cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v3, "SecretSheet.png", 0); v4 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v4, "SecretSheet.plist"); v5 = GameManager::sharedState(); strcpy((char *)v22, " secretLoop03.mp3"); GameManager::fadeInMusic(*(__m128 *)"secretLoop03.mp3", (__int64)v5, (unsigned __int8 *)v22); if ( ((__int64)v22[0] & 1) != 0 ) operator delete(v22[2]); ((void (__fastcall *)(SecretLayer6 *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(SecretLayer6 *, __int64))a1->setKeyboardEnabled)(a1, 1); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v24); v6 = cocos2d::CCSprite::create_1("GJ_gradientBG.png"); sub_10028CBE0(v26, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v6->setAnchorPoint)(v6, v26); ((void (__fastcall *)(SecretLayer6 *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v6, 4294967293LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScaleX)(v6, (float)(v24 + 10.0) / v6->m_obRect.size.width); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScaleY)(v6, (float)(v25 + 10.0) / v6->m_obRect.size.height); sub_10028CBE0(v26, -5.0, -5.0); ((void (__fastcall *)(cocos2d::CCSprite *, float *))v6->setPosition)(v6, v26); BYTE2(v26[0]) = 60; LOWORD(v26[0]) = 30; ((void (__fastcall *)(cocos2d::CCSprite *, float *))v6->setColor)(v6, v26); v7 = cocos2d::CCLabelBMFont::create_3("...", "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v7->setScale)(v7, 1.0); ((void (__fastcall *)(SecretLayer6 *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v7); sub_10028CBE0(v26, v24 * 0.5, v25 + -24.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float *))v7->setPosition)(v7, v26); v8 = (char *)operator new(0x1D0u); cocos2d::CCLayer::CCLayer(v8); *(_QWORD *)v8 = off_10093B8B0; *((_QWORD *)v8 + 40) = off_10093BD30; *((_QWORD *)v8 + 41) = &off_10093BDA0; *((_QWORD *)v8 + 42) = off_10093BDB8; *((_QWORD *)v8 + 43) = off_10093BDD8; *((_QWORD *)v8 + 44) = off_10093BDF8; *(_QWORD *)(v8 + 444) = 0; *((_QWORD *)v8 + 57) = 0; *(_OWORD *)(v8 + 408) = 0; *(_OWORD *)(v8 + 424) = 0; v8[440] = 0; if ( SecretGame01Layer::init((SecretGame01Layer *)v8) ) { cocos2d::CCObject::autorelease((cocos2d::CCObject *)v8); } else { (*(void (__fastcall **)(char *))(*(_QWORD *)v8 + 16LL))(v8); v8 = nullptr; } a1->m_gameLayer = (SecretGame01Layer *)v8; ((void (__fastcall *)(SecretLayer6 *, char *, __int64))a1->addChild_0)(a1, v8, 100); v9 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v10 = CCMenuItemSpriteExtra::create( v9, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)SecretLayer6::onBack); CCMenuItemSpriteExtra::setSizeMult(v10, 1.5); v15 = sub_100792C50((_DWORD)v10, 0, v11, v12, v13, v14); ((void (__fastcall *)(SecretLayer6 *, __int64, __int64))a1->addChild_0)(a1, v15, 1); v16 = cocos2d::CCDirector::sharedDirector(); v23 = sub_100484D90(v16) + 24.0; v17 = cocos2d::CCDirector::sharedDirector(); v18 = sub_100484D70(v17); sub_10028CBE0(v26, v23, *(float *)&v18 + -23.0); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v15 + 184LL))(v15, v26); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v10); v19 = cocos2d::CCDelayTime::create(0.5); v20 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)(unsigned __int64)SecretLayer6::startGame01); v21 = sub_1003B5760(v19, v20, 0); cocos2d::CCNode::runAction(a1, v21); return v2; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source