// // StartPosLayer::init from 0xb67dec to 0xb68a44 (3160 bytes) // // 2 xrefs: // > StartPosLayer::create @ 0xb68cac // > @ 0xfd048 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:02:16 +0000 // __int64 __fastcall StartPosLayer::init(cocos2d::CCDictionary **this, StartPosObject *a2) { unsigned __int8 v3; // w0 unsigned int v4; // w24 cocos2d::CCDirector *v6; // x0 cocos2d::CCMenu *WinSize; // x0 __int64 v8; // x0 __int64 v9; // x27 void (__fastcall *v10)(__int64, __int64 *); // x28 const char *v11; // x6 __int64 v12; // x0 __int64 v13; // x27 void (__fastcall *v14)(__int64, __int64 *); // x28 float v15; // s0 float v16; // s1 float v17; // s10 float v18; // s9 float v19; // s8 int v20; // [xsp+8h] [xbp-8h] cocos2d::CCNode *v21; // [xsp+A8h] [xbp+98h] cocos2d::CCNode *v22; // [xsp+A8h] [xbp+98h] __int64 v23; // [xsp+B0h] [xbp+A0h] BYREF _BYTE v24[8]; // [xsp+B8h] [xbp+A8h] BYREF _BYTE v25[8]; // [xsp+C0h] [xbp+B0h] BYREF __int64 v26; // [xsp+C8h] [xbp+B8h] BYREF __int64 v27[2]; // [xsp+D0h] [xbp+C0h] BYREF void *v28; // [xsp+E0h] [xbp+D0h] __int64 v29; // [xsp+E8h] [xbp+D8h] BYREF __int64 v30; // [xsp+F0h] [xbp+E0h] void *v31; // [xsp+F8h] [xbp+E8h] __int64 v32; // [xsp+100h] [xbp+F0h] BYREF __int64 v33; // [xsp+108h] [xbp+F8h] BYREF void *v34; // [xsp+110h] [xbp+100h] void *v35; // [xsp+118h] [xbp+108h] __int64 v36; // [xsp+120h] [xbp+110h] BYREF float v37; // [xsp+128h] [xbp+118h] char v38; // [xsp+12Ch] [xbp+11Ch] int v39; // [xsp+130h] [xbp+120h] int v40; // [xsp+134h] [xbp+124h] char v41; // [xsp+138h] [xbp+128h] int v42; // [xsp+13Ch] [xbp+12Ch] int v43; // [xsp+140h] [xbp+130h] int v44; // [xsp+144h] [xbp+134h] int v45; // [xsp+148h] [xbp+138h] int v46; // [xsp+14Ch] [xbp+13Ch] int v47; // [xsp+150h] [xbp+140h] char v48; // [xsp+154h] [xbp+144h] char v49; // [xsp+155h] [xbp+145h] int v50; // [xsp+158h] [xbp+148h] __int64 v51[2]; // [xsp+160h] [xbp+150h] BYREF void *v52; // [xsp+170h] [xbp+160h] int v53; // [xsp+178h] [xbp+168h] __int64 v54[2]; // [xsp+180h] [xbp+170h] BYREF void *v55; // [xsp+190h] [xbp+180h] if ( a2 && (*(this + 127) = a2, cocos2d::CCObject::retain(a2), v3 = SetupTriggerPopup::init((SetupTriggerPopup *)this, nullptr, nullptr, 400.0, 280.0, 1u, 0.0), (v4 = v3) != 0) ) { SetupTriggerPopup::preSetup((SetupTriggerPopup *)this); *((_BYTE *)this + 596) = (unsigned __int8)&dword_0 + 1; v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)((char *)&dword_0 + 1)); WinSize = (cocos2d::CCMenu *)cocos2d::CCDirector::getWinSize(&v23, v6); v8 = cocos2d::CCMenu::create(WinSize); *(this + 69) = (cocos2d::CCDictionary *)v8; (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v8, 10); v29 = 0; v30 = 0; v31 = nullptr; std::string::__init(&v29, "Start Pos", 9u); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init( &v32, "Y Velocity: Adds speed up or down.\n" "Spawn Group ID: Spawns a specific Group ID.\n" "P2 Group ID: If not '0', spawns player 2 at this Group ID.\n" "SP Name: Gives the start position a name in menus.\n" "Free: Removes borders for certain game modes.\n" "Reset: Resets the camera.\n" "Inactive: Disables the start position for immediate spawning. Can still switch to it using start position " "switcher.\n" "Online: Shows the start position in the Practice mode switcher when the level is played online.", 0x218u); v9 = InfoAlertButton::create((char *)&v29, (char *)&v32, 0.9); if ( (v32 & 1) != 0 ) operator delete(v34); if ( (v29 & 1) != 0 ) operator delete(v31); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v9); v10 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v9 + 184LL); v21 = *(this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v25, (float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v23 * 0.5)) - 2.0, (float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v23 + 1) * 0.5)) - 2.0); cocos2d::CCNode::convertToNodeSpace(&v26, v21, (const cocos2d::CCPoint *)v25); v10(v9, &v26); v12 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&qword_28, 0, 1, 0.8, "goldFont.fnt", "GJ_button_01.png", v11, 30.0); v13 = CCMenuItemSpriteExtra::create(v12, 0, (__int64)this, 1368, 1); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v13); v14 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL); v22 = *(this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v25, *(float *)&v23 * 0.5, 25.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v23 + 1) * 0.5))); cocos2d::CCNode::convertToNodeSpace(&v26, v22, (const cocos2d::CCPoint *)v25); v14(v13, &v26); StartPosLayer::addModeButtons((StartPosLayer *)this); StartPosLayer::addSpeedButtons((StartPosLayer *)this); v32 = 0; v15 = *((float *)this + 183) * 0.5; v16 = *((float *)this + 184) * 0.5; v33 = 0; v34 = nullptr; v17 = 35.0 - (float)(v15 - (float)(*(float *)&v23 * 0.5)); v18 = (float)(v16 + (float)(*((float *)&v23 + 1) * 0.5)) - 40.0; v19 = (float)(v15 + (float)(*(float *)&v23 * 0.5)) - 35.0; std::string::__init(&v32, "Flip", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v17, v18); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFF, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Mini", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v17, v18 - 50.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFE, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Dual", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v17, v18 - 100.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFD, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Mirror", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v17, v18 - 150.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFC, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Free", 4u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v17, v18 - 200.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFB, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Rotate", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v19, v18); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFFA, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Reverse", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v19, v18 - 50.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFF9, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Reset", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v19, v18 - 100.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFF8, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Inactive", 8u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v19, v18 - 150.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFF7, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); v32 = 0; v33 = 0; v34 = nullptr; std::string::__init(&v32, "Online", 6u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, v19, v18 - 200.0); SetupTriggerPopup::createToggleValueControl( (__int64)this, 0xFFFFFFF6, &v32, (const cocos2d::CCPoint *)&v26, 1, 0, 0, 1.0); if ( (v32 & 1) != 0 ) operator delete(v34); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v24, *(float *)&v23 * 0.5, (float)(*((float *)&v23 + 1) * 0.5) + -15.0); LODWORD(v32) = 0; v33 = 0; v34 = nullptr; v35 = nullptr; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v36, (const cocos2d::CCPoint *)&unk_155E508); v40 = 6; v38 = 0; v37 = 1.0; v39 = 2; v41 = 1; v42 = 0; v44 = 0; v43 = 0; v45 = 0; v46 = 0; v47 = 2; v48 = 0; v49 = 0; v50 = 1116471296; v51[0] = 0; v51[1] = 0; v52 = nullptr; std::string::__init(v51, "goldFont.fnt", 0xCu); v54[0] = 0; v54[1] = 0; v53 = 0; v55 = nullptr; std::string::__init(v54, "Num", 3u); LODWORD(v32) = -13; std::string::assign(&v33, "Y Velocity:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, -70.0, 0.0); cocos2d::CCPoint::operator+(&v26, v24); cocos2d::CCPoint::operator=(&v36, &v26); v38 = 1; v49 = 1; v41 = 0; v53 = 1060320051; v37 = 0.6; v39 = 1; SetupTriggerPopup::createValueControlAdvanced(this, (ValueControlSettings *)&v32); v27[0] = 0; v27[1] = 0; v28 = nullptr; std::string::__init(v27, "Spawn Group ID:", 0xFu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 70.0, 0.0); cocos2d::CCPoint::operator+(&v26, v24); IDNameInput::create(this, this + 68, 1, 4294967282LL, v27, &v26, 6, 0, 0.6, 0, 0); if ( (v27[0] & 1) != 0 ) operator delete(v28); v29 = 0; v30 = 0; v31 = nullptr; std::string::__init(&v29, "P2 Group ID:", 0xCu); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, -70.0, -55.0); cocos2d::CCPoint::operator+(&v26, v24); LOBYTE(v20) = 0; IDNameInput::create(this, this + 68, 1, 4294967281LL, &v29, &v26, 6, 0, 0.6, 0, v20); if ( (v29 & 1) != 0 ) operator delete(v31); LODWORD(v32) = -16; std::string::assign(&v33, "SP Name:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 70.0, -55.0); cocos2d::CCPoint::operator+(&v26, v24); cocos2d::CCPoint::operator=(&v36, &v26); v39 = 4; v40 = 20; v50 = 1124859904; std::string::assign(v54, "Name"); SetupTriggerPopup::createValueControlAdvanced(this, (ValueControlSettings *)&v32); cocos2d::CCDictionary::objectForKey(*(this + 95), -16); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v26, *(float *)&v23 * 0.5, 20.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v23 + 1) * 0.5))); cocos2d::CCPoint::operator=(v24, &v26); v40 = 6; v50 = 1116471296; LODWORD(v32) = -11; std::string::assign(&v33, "Order:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, -90.0, 0.0); cocos2d::CCPoint::operator+(&v26, v24); cocos2d::CCPoint::operator=(&v36, &v26); v41 = 1; v39 = 3; SetupTriggerPopup::createValueControlAdvanced(this, (ValueControlSettings *)&v32); LODWORD(v32) = -12; std::string::assign(&v33, "Channel:"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, 90.0, 0.0); cocos2d::CCPoint::operator+(&v26, v24); cocos2d::CCPoint::operator=(&v36, &v26); SetupTriggerPopup::createValueControlAdvanced(this, (ValueControlSettings *)&v32); SetupTriggerPopup::postSetup((SetupTriggerPopup *)this); if ( (v54[0] & 1) != 0 ) operator delete(v55); if ( (v51[0] & 1) != 0 ) operator delete(v52); if ( (v33 & 1) != 0 ) operator delete(v35); } else { return 0; } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source