// // LevelEditorLayer::updateGameObjects from 0x46c8c8 to 0x46d0d0 (2056 bytes) // // 3 xrefs: // > LevelEditorLayer::updateEditor @ 0x473246 // > LevelEditorLayer::init @ 0x476600 // > EditorUI::onPlayback @ 0x48250a // // 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:49:01 +0000 // LevelEditorLayer *__fastcall LevelEditorLayer::updateGameObjects(LevelEditorLayer *this) { int v1; // r4 int v2; // r5 _DWORD *SelectedOrderChannel; // r0 int v4; // r6 int v5; // r10 cocos2d::CCDirector *updated; // r0 _DWORD *v7; // r2 int i; // r3 int v9; // r1 _DWORD *v10; // r2 int v11; // r3 bool v12; // zf int v13; // r3 float v14; // s15 const cocos2d::CCPoint *v15; // r7 int v16; // r1 int v17; // r3 float v18; // r9 float v19; // r11 int v20; // r1 int v21; // r3 _DWORD *v22; // r3 EffectGameObject **v23; // r7 EffectGameObject **v24; // r6 EffectGameObject *v25; // r8 EffectGameObject *v26; // t1 int v27; // r3 int v28; // r2 GJBaseGameLayer *v29; // r2 int v30; // r3 bool v31; // r3 int v32; // r3 _DWORD *v33; // r3 int v34; // r7 cocos2d::CCPoint **v35; // r3 unsigned int v36; // r6 cocos2d::CCPoint **v37; // r8 cocos2d::CCPoint *v38; // r3 cocos2d::CCPoint *v39; // t1 _DWORD *v40; // r3 int **v41; // r7 int *v42; // r12 int v43; // r8 int *v44; // r6 int *v45; // t1 float v46; // s20 int v47; // r7 double v48; // d11 GJEffectManager *v49; // r5 int active; // r0 ShaderLayer *v51; // r0 _BYTE *v52; // r1 int *v53; // r2 int v54; // r3 double v55; // d8 unsigned int v56; // r7 int v57; // r3 int *v58; // r3 _BYTE *v59; // t1 double v60; // d9 int v61; // r6 unsigned int v62; // r5 _BYTE *v63; // r10 int *v64; // r9 int v65; // r0 int *v66; // r1 int v67; // r1 int v68; // r3 int v69; // r3 float v70; // s15 float *v71; // r11 bool v72; // lr int v73; // r0 float v74; // s15 float v75; // s15 int v76; // r3 LevelEditorLayer *v77; // r5 LevelEditorLayer *v78; // r4 int v79; // r7 int v80; // r6 int v81; // r0 float *v82; // r3 float v83; // s21 _DWORD *v84; // r2 bool *v85; // r5 _DWORD *v86; // r2 int v87; // r1 int v88; // r9 float v89; // r0 bool v90; // r3 float v91; // r2 void (__fastcall *v92)(bool *, _DWORD); // r9 _DWORD *v93; // r0 float v94; // [sp+0h] [bp-64h] float v95; // [sp+0h] [bp-64h] float v96; // [sp+0h] [bp-64h] float v97; // [sp+8h] [bp-5Ch] _DWORD *SelectedEditorOrder; // [sp+1Ch] [bp-48h] int v99; // [sp+20h] [bp-44h] cocos2d::CCPoint *v100; // [sp+24h] [bp-40h] int **v101; // [sp+28h] [bp-3Ch] int v102; // [sp+30h] [bp-34h] int *v103; // [sp+34h] [bp-30h] int v104; // [sp+38h] [bp-2Ch] int v105; // [sp+3Ch] [bp-28h] BYREF bool (__fastcall *v106)(int, int); // [sp+40h] [bp-24h] BYREF float v107[2]; // [sp+44h] [bp-20h] BYREF _DWORD v108[2]; // [sp+4Ch] [bp-18h] BYREF _BYTE v109[8]; // [sp+54h] [bp-10h] BYREF v1 = (int)this; v2 = *((_DWORD *)this + 357); if ( v2 ) return this; SelectedEditorOrder = LevelEditorLayer::getSelectedEditorOrder(this); SelectedOrderChannel = LevelEditorLayer::getSelectedOrderChannel((LevelEditorLayer *)v1); v4 = *(_DWORD *)(v1 + 12212); v5 = (int)SelectedOrderChannel; if ( v4 ) { v99 = *(_DWORD *)(v4 + 780); if ( *(_DWORD *)(v4 + 892) == 2900 ) { if ( !*(_BYTE *)(v4 + 1669) ) LOBYTE(v2) = GameObject::getObjectDirection((GameObject *)v4) == 1 || GameObject::getObjectDirection((GameObject *)v4) == 2; goto LABEL_7; } } else { v99 = 0; } LOBYTE(v2) = 0; LABEL_7: if ( *(_BYTE *)(v1 + 11885) ) GJEffectManager::reset(*(GJEffectManager **)(v1 + 1524)); updated = (cocos2d::CCDirector *)GJBaseGameLayer::updateMGOffsetY((GJBaseGameLayer *)v1, 0.0, 0.0, 0, 0.0, -1, -1); v7 = *(_DWORD **)(v1 + 12072); for ( i = (*(_DWORD *)(v1 + 12076) - (int)v7) >> 2; i > 0; --i ) *v7++ = -1082130432; v9 = *(_DWORD *)(v1 + 11980); v10 = *(_DWORD **)(v1 + 11976); v11 = 0; while ( v9 > 0 ) { v12 = v11 == 31; --v9; updated = (cocos2d::CCDirector *)(*v10 & ~(1 << v11)); if ( v11 != 31 ) ++v11; *v10 = updated; if ( v12 ) { v11 = 0; ++v10; } } cocos2d::CCDirector::sharedDirector(updated); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v107); v13 = *(_DWORD *)(v1 + 11856); if ( v13 ) v14 = *(float *)(v13 + 632); else v14 = 0.0; v15 = *(const cocos2d::CCPoint **)(v1 + 2436); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v107[0] * 0.5, (float)(v14 * 0.5) + (float)(v107[1] * 0.5)); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v108, v15); *(_BYTE *)(v1 + 12276) = 0; v17 = *(_DWORD *)(v1 + 1428); v18 = *(float *)v108; v19 = *(float *)&v108[1]; if ( v17 == 1 ) { v18 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v1 + 2076) + 96))(*(_DWORD *)(v1 + 2076)); } else if ( !v17 ) { v16 = *(_DWORD *)(v1 + 11856); if ( v16 && (v16 = *(unsigned __int8 *)(v16 + 492)) != 0 ) { v5 = *(_DWORD *)(v1 + 1428); v20 = *(_DWORD *)(v1 + 11880); SelectedEditorOrder = (_DWORD *)v5; v18 = *(float *)(v20 + 360); v19 = *(float *)(v20 + 364); v16 = 1; *(_BYTE *)(v1 + 12276) = 1; } else { v82 = (float *)(v1 + 12032); if ( *(float *)(v1 + 12028) != 0.0 || *v82 != 0.0 ) { v19 = *v82; v18 = *(float *)(v1 + 12028); } } } v21 = *(_DWORD *)(v1 + 11808); if ( v21 ) { v22 = *(_DWORD **)(v21 + 52); if ( *v22 ) { v23 = (EffectGameObject **)v22[3]; v24 = &v23[*v22] + 0x3FFFFFFF; while ( v23 <= v24 ) { v26 = *v23++; v25 = v26; if ( !v26 ) break; GameObject::resetGroupDisabled((int)v25); if ( *((_BYTE *)v25 + 1293) ) EffectGameObject::resetSpawnTrigger(v25); } } } if ( *(_BYTE *)(v1 + 11812) || (v27 = *(_DWORD *)(v1 + 11856)) != 0 && *(_BYTE *)(v27 + 645) || *(_BYTE *)(*(_DWORD *)(v1 + 11880) + 441) ) { *(_BYTE *)(v1 + 11812) = 0; v28 = *(_DWORD *)(v1 + 11856); if ( v28 ) *(_BYTE *)(v28 + 645) = 0; v29 = *(GJBaseGameLayer **)(v1 + 11880); *((_BYTE *)v29 + 441) = 0; v30 = *(_DWORD *)(v1 + 11808); if ( v30 ) { v33 = *(_DWORD **)(v30 + 52); if ( *v33 ) { v34 = *v33 + 0x40000000; v35 = (cocos2d::CCPoint **)v33[3]; v36 = (unsigned int)&v35[v34 - 1]; v37 = v35; while ( (unsigned int)v37 <= v36 ) { v39 = *v37++; v38 = v39; if ( !v39 ) break; v100 = v38; (*(void (__fastcall **)(_BYTE *, cocos2d::CCPoint *))(*(_DWORD *)v38 + 908))(v109, v38); cocos2d::CCPoint::operator=((char *)v100 + 1600, v109); } } } DrawGridLayer::updateTimeMarkers(*(DrawGridLayer **)(v1 + 11880), v16, v29, 11880); LevelTools::sortChannelOrderObjects( *(cocos2d::CCDictionary **)(v1 + 11808), nullptr, (cocos2d::CCDictionary *)((char *)&dword_0 + 1), v31); v32 = *(_DWORD *)(v1 + 11808); if ( v32 ) { v40 = *(_DWORD **)(v32 + 52); if ( *v40 ) { v41 = (int **)v40[3]; v42 = (int *)(v1 + 11880); v43 = 0; v101 = &(&v41[*v40])[-1]; while ( v41 <= v101 ) { v45 = *v41++; v44 = v45; if ( !v45 ) break; ++v43; v103 = v42; v102 = *v42; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, (const cocos2d::CCPoint *)(v44 + 400)); v44[406] = DrawGridLayer::timeForPos(v102, (const cocos2d::CCPoint *)v109, v44[397], v44[398], 0, 1, 0, 0); (*(void (__fastcall **)(int *, int))(*v44 + 36))(v44, v43); v42 = v103; } } } qsort( *(void **)(*(_DWORD *)(*(_DWORD *)(v1 + 11808) + 52) + 12), **(_DWORD **)(*(_DWORD *)(v1 + 11808) + 52), 4u, (int (*)(const void *, const void *))triggerCompEffect); } if ( *(_BYTE *)(v1 + 11885) ) LevelEditorLayer::transferDefaultColors( (LevelEditorLayer *)v1, *(GJEffectManager **)(*(_DWORD *)(v1 + 2084) + 264), *(GJEffectManager **)(v1 + 1524)); if ( *(_BYTE *)(v1 + 12276) ) { v46 = *(float *)(*(_DWORD *)(v1 + 11880) + 352); } else { v47 = *(_DWORD *)(v1 + 11880); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v18, v19); v46 = COERCE_FLOAT( DrawGridLayer::timeForPos( v47, (const cocos2d::CCPoint *)v109, (int)SelectedEditorOrder, v5, 0, 1, v2 ^ 1, v99)); } v48 = v46; if ( *(_BYTE *)(v1 + 11885) ) { GJEffectManager::updateEffects(*(GJEffectManager **)(v1 + 1524), 0.0); GJEffectManager::processColors(*(GJEffectManager **)(v1 + 1524)); v49 = *(GJEffectManager **)(v1 + 1524); active = GJEffectManager::activeColorForIndex(v49, 1005); LOWORD(v104) = active; BYTE2(v104) = BYTE2(active); GJEffectManager::calculateLightBGColor(v49, v104); } GJBaseGameLayer::resetSpawnChannelIndex((GJBaseGameLayer *)v1); *(_DWORD *)(v1 + 732) = 0; v51 = *(ShaderLayer **)(v1 + 10712); if ( v51 ) { ShaderLayer::resetAllShaders(v51); *(_BYTE *)(*(_DWORD *)(v1 + 10712) + 952) = 1; if ( *(_BYTE *)(*(_DWORD *)(v1 + 11880) + 368) ) *(_QWORD *)(*(_DWORD *)(v1 + 10712) + 368) = 0xBFF0000000000000LL; } GJBaseGameLayer::resetGradientLayers((GJBaseGameLayer *)v1); v54 = *(_DWORD *)(v1 + 11808); if ( v54 ) { v53 = *(int **)(v54 + 52); v57 = *v53; if ( *v53 ) { v53 = (int *)v53[3]; v58 = &v53[v57 - 1]; while ( v53 <= v58 ) { v59 = (_BYTE *)*v53++; v52 = v59; if ( !v59 ) break; if ( v52[1292] ) v52[1264] = v52[1584]; } } } LevelEditorLayer::resetDelayedSpawnNodes((LevelEditorLayer *)v1, (int)v52, (int)v53); v55 = -0.000000999999997; v56 = 0; while ( v55 < v48 ) { v60 = 10.0; v55 = v55 + 10.0; if ( v55 > v48 ) { v60 = 10.0 - (v55 - v48); v55 = v46; } v61 = *(unsigned __int8 *)(v1 + 12276); if ( *(_BYTE *)(v1 + 12276) ) v61 = v55 > *(float *)(*(_DWORD *)(v1 + 11880) + 356); v62 = v56; v63 = (_BYTE *)(v1 + 11813); while ( 1 ) { v64 = (int *)(v1 + 12232); if ( *v63 ) { *v63 = 0; v65 = *v64; v66 = *(int **)(v1 + 12236); v106 = spawnNodeSort; std::__sort( v65, v66, (int (__fastcall **)(int *, int *))&v106); } if ( v56 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(v1 + 11808)) ) v67 = 0; else v67 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v1 + 11808), v56); v68 = *(_DWORD *)(v1 + 12236); if ( *v64 == v68 ) v69 = 0; else v69 = *(_DWORD *)(v68 - 4); v105 = v69; if ( !v67 ) { if ( !v69 ) goto LABEL_86; LABEL_128: v83 = *(float *)(v69 + 4); if ( v83 > v55 ) goto LABEL_105; v84 = *(_DWORD **)(v1 + 12248); v85 = *(bool **)v69; if ( v84 == *(_DWORD **)(v1 + 12252) ) { std::vector::__push_back_slow_path(v1 + 12244, &v105); } else { if ( v84 ) *v84 = v69; *(_DWORD *)(v1 + 12248) += 4; } v86 = (_DWORD *)(v1 + 12236); v87 = *(_DWORD *)(v1 + 12236) - 4; while ( v87 != *v86 ) *v86 -= 4; if ( *((_DWORD *)v85 + 223) == 1268 ) { v88 = *((_DWORD *)v85 + 321); v89 = (*(float (__fastcall **)(bool *))(*(_DWORD *)v85 + 812))(v85); v95 = v55; v97 = v60; LevelEditorLayer::spawnGroupPreview((LevelEditorLayer *)v1, v88, v89, v83, v95, v46, v97, v85[1486], v61); } else { *((float *)v85 + 406) = v83; if ( v61 ) v90 = v83 > *(float *)(*(_DWORD *)(v1 + 11880) + 356); else v90 = 0; v91 = v55; v96 = v60; LevelEditorLayer::activateTriggerEffect((LevelEditorLayer *)v1, (EffectGameObject *)v85, v91, v46, v96, v90); v92 = *(void (__fastcall **)(bool *, _DWORD))(*(_DWORD *)v85 + 744); v93 = (_DWORD *)(*(int (__fastcall **)(bool *))(*(_DWORD *)v85 + 96))(v85); v92(v85, *v93); } goto LABEL_99; } v71 = (float *)(v67 + 1624); if ( v69 && *v71 > *(float *)(v69 + 4) ) goto LABEL_128; if ( *v71 > v55 && !*(_BYTE *)(v67 + 1293) ) goto LABEL_105; v72 = v61 && *v71 > *(float *)(*(_DWORD *)(v1 + 11880) + 356); ++v56; if ( !*(_BYTE *)(v67 + 1293) ) { v73 = *(_DWORD *)(v67 + 1588); if ( v73 > *(_DWORD *)(v1 + 12224) ) *(_DWORD *)(v1 + 12224) = v73; if ( *(_DWORD *)(v1 + 732) == *(_DWORD *)(v67 + 1592) ) { v74 = v60; v94 = v74; v75 = v55; if ( !LevelEditorLayer::activateTriggerEffect( (LevelEditorLayer *)v1, (EffectGameObject *)v67, v75, v46, v94, v72) ) break; } } LABEL_99: v62 = v56; } v60 = v60 - (v55 - *v71); v55 = *v71; LABEL_105: v56 = v62; LABEL_86: if ( *(_BYTE *)(v1 + 11885) ) { v70 = v60; GJEffectManager::updateEffects(*(GJEffectManager **)(v1 + 1524), v70); GJEffectManager::processColors(*(GJEffectManager **)(v1 + 1524)); } } v76 = *(_DWORD *)(v1 + 10712); if ( v76 ) { *(double *)(v76 + 360) = *(double *)(v76 + 376) + v48; GJShaderState::timesyncShaderActions((GJShaderState *)(*(_DWORD *)(v1 + 10712) + 320)); GJBaseGameLayer::updateShaderLayer((GJBaseGameLayer *)v1, 0.0); *(_BYTE *)(*(_DWORD *)(v1 + 10712) + 952) = 0; } if ( *(_BYTE *)(v1 + 11885) ) GJBaseGameLayer::updateLevelColors((GJBaseGameLayer *)v1); LevelEditorLayer::updateToggledGroups(v1); this = (LevelEditorLayer *)LevelEditorLayer::updateBlendValues((GJEffectManager **)v1); if ( *(_BYTE *)(v1 + 12277) ) { *(_BYTE *)(v1 + 12277) = 0; if ( *(_BYTE *)(v1 + 12276) ) { GJBaseGameLayer::processActivatedAudioTriggers((GJBaseGameLayer *)v1, *(float *)(*(_DWORD *)(v1 + 11856) + 500)); this = (LevelEditorLayer *)GJBaseGameLayer::clearActivatedAudioTriggers((GJBaseGameLayer *)v1); } } if ( *(_BYTE *)(v1 + 12276) ) { v77 = *(LevelEditorLayer **)(v1 + 1308); v78 = (LevelEditorLayer *)(v1 + 1312); while ( v77 != v78 ) { v79 = *((_DWORD *)v77 + 4); v80 = *((_DWORD *)v77 + 5); v81 = FMODAudioEngine::sharedEngine(this); FMODAudioEngine::setChannelVolumeMod(v81, v79, v80, 0.0); this = (LevelEditorLayer *)std::__tree_next *>(v77); v77 = this; } } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source