// // AutoSaveSettingsLayer::init from 0x6e7240 to 0x6e7afe (2238 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:57:25 +0000 // GameManager *__fastcall AutoSaveSettingsLayer::init(AutoSaveSettingsLayer *this) { cocos2d::CCDirector *v2; // r0 cocos2d::CCMenu *WinSize; // r0 int v4; // r0 int v5; // r9 const cocos2d::CCPoint *v6; // r11 void (__fastcall *v7)(int, _DWORD *); // r10 ButtonSprite *v8; // r0 int v9; // r8 float v10; // s17 float v11; // s16 float v12; // s20 float v13; // s16 float v14; // s23 const char *v15; // r2 float v16; // s22 int v17; // r8 void (__fastcall *v18)(int, _DWORD *); // r7 int v19; // r7 void (__fastcall *v20)(int, _DWORD *); // r11 void (__fastcall *v21)(int, _DWORD *); // r11 const char *v22; // r2 int v23; // r7 void (__fastcall *v24)(int, _DWORD *); // r10 int v25; // r7 void (__fastcall *v26)(int, _DWORD *); // r8 void (__fastcall *v27)(int, _DWORD *); // r8 bool v28; // zf int v29; // r0 int v30; // r1 int v31; // r2 int v32; // r7 int v33; // r0 int v34; // r1 int v35; // r2 bool v36; // zf int v37; // r0 int v38; // r1 int v39; // r2 const char *v40; // r1 int v41; // r5 int v42; // r6 const cocos2d::CCPoint *v43; // r10 void (__fastcall *v44)(int, _BYTE *); // r9 float v45; // s16 const char *v46; // r2 int v47; // r0 int v48; // r6 void (__fastcall *v49)(int, _BYTE *); // r8 int v50; // r0 int v51; // r1 int v52; // r2 const char *v53; // r2 int v54; // r0 int v55; // r6 void (__fastcall *v56)(int, _BYTE *); // r8 int v57; // r6 void (__fastcall *v58)(int, _BYTE *); // r8 ValueControlSettings *v60; // [sp+10h] [bp-12Ch] GameManager *v61; // [sp+14h] [bp-128h] void (__fastcall *v62)(int, _DWORD *); // [sp+18h] [bp-124h] cocos2d::CCPoint *v63; // [sp+1Ch] [bp-120h] float v64; // [sp+28h] [bp-114h] BYREF float v65; // [sp+2Ch] [bp-110h] _BYTE v66[8]; // [sp+30h] [bp-10Ch] BYREF _BYTE v67[8]; // [sp+38h] [bp-104h] BYREF _DWORD v68[2]; // [sp+40h] [bp-FCh] BYREF int v69[3]; // [sp+48h] [bp-F4h] BYREF _DWORD v70[4]; // [sp+54h] [bp-E8h] BYREF int v71; // [sp+64h] [bp-D8h] BYREF int v72; // [sp+68h] [bp-D4h] BYREF int v73; // [sp+6Ch] [bp-D0h] _BYTE *v74; // [sp+70h] [bp-CCh] _BYTE v75[8]; // [sp+74h] [bp-C8h] BYREF int v76; // [sp+7Ch] [bp-C0h] char v77; // [sp+80h] [bp-BCh] int v78; // [sp+84h] [bp-B8h] int v79; // [sp+88h] [bp-B4h] char v80; // [sp+8Ch] [bp-B0h] int v81; // [sp+90h] [bp-ACh] float v82; // [sp+94h] [bp-A8h] int v83; // [sp+98h] [bp-A4h] int v84; // [sp+9Ch] [bp-A0h] int v85; // [sp+A0h] [bp-9Ch] int v86; // [sp+A4h] [bp-98h] __int16 v87; // [sp+A8h] [bp-94h] int v88; // [sp+ACh] [bp-90h] int v89; // [sp+B0h] [bp-8Ch] BYREF int v90; // [sp+B4h] [bp-88h] _BYTE *v91; // [sp+B8h] [bp-84h] int v92; // [sp+BCh] [bp-80h] int v93; // [sp+C0h] [bp-7Ch] BYREF int v94; // [sp+C4h] [bp-78h] _BYTE *v95; // [sp+C8h] [bp-74h] int v96[26]; // [sp+CCh] [bp-70h] BYREF v61 = SetupTriggerPopup::init(this, nullptr, nullptr, 400.0, 280.0, (_BYTE *)&dword_0 + 1, 0.0); if ( v61 ) { v2 = (cocos2d::CCDirector *)SetupTriggerPopup::preSetup(this); *((_BYTE *)this + 468) = 1; cocos2d::CCDirector::sharedDirector(v2); WinSize = (cocos2d::CCMenu *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v64); v4 = cocos2d::CCMenu::create(WinSize); *((_DWORD *)this + 111) = v4; (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v4, 10); v71 = 0; v72 = 0; v73 = 0; std::string::__init(&v71, "Auto-Save Settings", 0x12u); memset(v96, 0, 12); std::string::__init( v96, "Auto-Save: saves your level at a set interval while editing.\n" "Auto-Backup: keeps timestamped copies of your level based on active editing time, so you can go back to an" " older version. The options button sets how many are kept per level.", 0xFBu); v5 = InfoAlertButton::create((char *)&v71, (int)v96, 1063675494); std::string::~string((int)v96); std::string::~string((int)&v71); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v5); v6 = *((const cocos2d::CCPoint **)this + 111); v7 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v5 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v68, (float)((float)(*((float *)this + 139) * 0.5) + (float)(v64 * 0.5)) - 2.0, (float)((float)(*((float *)this + 140) * 0.5) + (float)(v65 * 0.5)) - 2.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v6); v7(v5, v70); v8 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&word_28, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), COERCE_FLOAT(&v71)); v68[0] = 684; v68[1] = 1; v9 = CCMenuItemSpriteExtra::create((int)v8, 0, (int)this, 684, 1); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v9); v62 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92); v63 = *((cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v67, v64 * 0.5, (float)((float)(v65 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 25.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v63); v62(v9, v70); v10 = v64 * 0.5; v11 = (float)((float)(*((float *)this + 140) * 0.5) + (float)(v65 * 0.5)) - 12.0; v12 = v11 - 50.0; v13 = v11 - 133.0; v14 = *((float *)this + 139) - 30.0; v16 = (float)(v64 * 0.5) + 60.0; v17 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Auto-Save", "goldFont.fnt", v15); (*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 80))(v17, 1058642330); v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10, v12 + 47.0); v18(v17, v70); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v17); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v70, 0.0, 0.0, 40.0, 40.0); v19 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v70); v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v19 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v70, v14, 50.0); v20(v19, v70); v21 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v19 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10, v12 + 6.0); v21(v19, v70); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v19 + 480))(v19, &unk_BF0120); (*(void (__fastcall **)(int, int))(*(_DWORD *)v19 + 456))(v19, 50); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v19, -1); memset(v96, 0, 12); std::string::__init(v96, "Enabled", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10 - 100.0, v12); SetupTriggerPopup::createToggleValueControl((int)this, -1, (int)v96, (const cocos2d::CCPoint *)v70, 1, 0, 0, 1.0); std::string::~string((int)v96); ValueControlSettings::ValueControlSettings(v60); v71 = -2; std::string::assign(&v72, "Interval (min):"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10 + 60.0, v12); cocos2d::CCPoint::operator=(v75, v70); v78 = 3; v79 = 4; v82 = 60.0; v76 = 1058642330; v77 = 1; v80 = 1; HIBYTE(v87) = 1; v92 = 1057803469; v81 = 1065353216; SetupTriggerPopup::createValueControlAdvanced((cocos2d::CCDictionary **)this, v60); SetupTriggerPopup::toggleLimitArrowValue((int **)this, -2, 1); SetupTriggerPopup::toggleLimitValue((int **)this, -2, 1); v23 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Auto-Backup", "goldFont.fnt", v22); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 80))(v23, 1058642330); v24 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v23 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10, v13 + 47.0); v24(v23, v70); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v23); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v70, 0.0, 0.0, 40.0, 40.0); v25 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v70); v26 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v25 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v70, v14, 50.0); v26(v25, v70); v27 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v25 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10, v13 + 6.0); v27(v25, v70); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v25 + 480))(v25, &unk_BF0120); (*(void (__fastcall **)(int, int))(*(_DWORD *)v25 + 456))(v25, 50); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v25, -1); memset(v69, 0, sizeof(v69)); std::string::__init(v69, "Enabled", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v10 - 100.0, v13); SetupTriggerPopup::createToggleValueControl((int)this, -3, (int)v69, (const cocos2d::CCPoint *)v70, 1, 0, 0, 1.0); std::string::~string((int)v69); memset(v96, 0, sizeof(v96)); ValueControlSettings::ValueControlSettings((ValueControlSettings *)v96); v28 = (v72 & 1) == 0; if ( (v72 & 1) == 0 ) LOWORD(v72) = 0; v71 = v96[0]; if ( !v28 ) { *v74 = 0; v73 = 0; } std::string::reserve(&v72, 0); v29 = v96[1]; v30 = v96[2]; v31 = v96[3]; memset(&v96[1], 0, 12); v72 = v29; v73 = v30; v74 = (_BYTE *)v31; cocos2d::CCPoint::operator=(v75, &v96[4]); v76 = v96[6]; v32 = v89 & 1; if ( (v89 & 1) != 0 ) v32 = 0; else BYTE1(v89) = v89 & 1; v77 = v96[7]; v78 = v96[8]; v79 = v96[9]; v80 = v96[10]; v81 = v96[11]; v82 = *(float *)&v96[12]; v83 = v96[13]; v84 = v96[14]; v85 = v96[15]; v86 = v96[16]; v87 = v96[17]; v88 = v96[18]; if ( (v89 & 1) != 0 ) { *v91 = v32; v90 = v32; } else { LOBYTE(v89) = v32; } std::string::reserve(&v89, 0); v33 = v96[19]; v34 = v96[20]; v35 = v96[21]; memset(&v96[19], 0, 12); v89 = v33; v90 = v34; v91 = (_BYTE *)v35; v36 = (v93 & 1) == 0; if ( (v93 & 1) == 0 ) LOWORD(v93) = 0; v92 = v96[22]; if ( !v36 ) { *v95 = 0; v94 = 0; } std::string::reserve(&v93, 0); v37 = v96[23]; v38 = v96[24]; v39 = v96[25]; memset(&v96[23], 0, 12); v93 = v37; v94 = v38; v95 = (_BYTE *)v39; ValueControlSettings::~ValueControlSettings((ValueControlSettings *)v96); v71 = -4; std::string::assign(&v72, "Interval (min):"); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, v16, v13); cocos2d::CCPoint::operator=(v75, v70); v78 = 3; v79 = 4; v77 = 1; v80 = 1; HIBYTE(v87) = 1; v81 = 1092616192; v76 = 1058642330; v82 = 300.0; v92 = 1057803469; SetupTriggerPopup::createValueControlAdvanced((cocos2d::CCDictionary **)this, (ValueControlSettings *)&v71); SetupTriggerPopup::toggleLimitArrowValue((int **)this, -4, 1); SetupTriggerPopup::toggleLimitValue((int **)this, -4, 1); v41 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_optionsBtn_001.png", v40); (*(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 80))(v41, 1058642330); v70[0] = AutoSaveSettingsLayer::onAdvanced; v70[1] = 0; v42 = CCMenuItemSpriteExtra::create(v41, 0, (int)this, (int)AutoSaveSettingsLayer::onAdvanced, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v42); v43 = *((const cocos2d::CCPoint **)this + 111); v44 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v42 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, v10 + 150.0, v13 + 6.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v67, v43); v44(v42, v67); v45 = (float)(v65 * 0.5) - 80.0; v47 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Backup Directory:", "goldFont.fnt", v46); *((_DWORD *)this + 178) = v47; (*(void (__fastcall **)(int, int))(*(_DWORD *)v47 + 80))(v47, 1055286886); v48 = *((_DWORD *)this + 178); v49 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, v10, v45 + 8.0); v49(v48, v67); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))( *((_DWORD *)this + 115), *((_DWORD *)this + 178)); AutoSaveSettingsLayer::getCustomBackupDirectory((AutoSaveSettingsLayer *)v96); if ( (*((_BYTE *)this + 720) & 1) != 0 ) { **((_BYTE **)this + 182) = 0; *((_DWORD *)this + 181) = 0; } else { *((_BYTE *)this + 721) = 0; *((_BYTE *)this + 720) = 0; } std::string::reserve((int *)this + 180, 0); v50 = v96[0]; v51 = v96[1]; v52 = v96[2]; memset(v96, 0, 12); *((_DWORD *)this + 180) = v50; *((_DWORD *)this + 181) = v51; *((_DWORD *)this + 182) = v52; std::string::~string((int)v96); v54 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&unk_B6B226, "chatFont.fnt", v53); *((_DWORD *)this + 179) = v54; (*(void (__fastcall **)(int, int))(*(_DWORD *)v54 + 80))(v54, 1055286886); v55 = *((_DWORD *)this + 179); v56 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, 0.5, 0.5); v56(v55, v67); v57 = *((_DWORD *)this + 179); v58 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v57 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, v10, v45 - 8.0); v58(v57, v67); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))( *((_DWORD *)this + 115), *((_DWORD *)this + 179)); AutoSaveSettingsLayer::updateBackupDirLabel((int)this); SetupTriggerPopup::postSetup(this); ValueControlSettings::~ValueControlSettings((ValueControlSettings *)&v71); } return v61; }