// // LevelEditorLayer::updateGameObjects from 0x79e038 to 0x79ea68 (2608 bytes) // // 4 xrefs: // > LevelEditorLayer::updateEditor @ 0x7a8e6c // > LevelEditorLayer::init @ 0x7af3b4 // > EditorUI::onPlayback @ 0x7c2994 // > @ 0xf0e50 // // 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 12:53:38 +0000 // __int64 __fastcall LevelEditorLayer::updateGameObjects(LevelEditorLayer *this) { int SelectedOrderChannel; // w0 __int64 v4; // x23 int v5; // w25 bool v6; // w20 float *v7; // x2 __int64 v8; // x7 __int64 v9; // x6 unsigned __int64 v10; // x1 __int64 v11; // x3 _OWORD *v17; // x5 unsigned __int64 v18; // x4 __int64 v19; // x4 cocos2d::CCDirector *v20; // x0 _QWORD *i; // x1 cocos2d::CCDirector *v22; // x0 __int64 v23; // x0 float v24; // s1 cocos2d::CCNode *v25; // x27 float v26; // s8 int v27; // w0 float v28; // s9 __int64 v29; // x0 __int64 v30; // x0 __int64 v31; // x0 unsigned int *v32; // x1 __int64 *v33; // x27 __int64 v34; // x0 char *v35; // x28 EffectGameObject *v36; // x21 __int64 v37; // x0 __int64 v38; // x0 unsigned int *v39; // x1 char *v40; // x27 __int64 v41; // x0 char *v42; // x28 __int64 v43; // x21 __int64 v44; // x0 __int64 v45; // x0 __int64 v46; // x0 size_t v47; // x1 _QWORD *v48; // x22 _QWORD *v49; // x28 void *v50; // x0 __int64 *v51; // x21 unsigned int v52; // w27 __int64 v53; // x26 __int64 v54; // x2 int v55; // s0 unsigned int *v56; // x1 float v57; // s11 double v58; // d12 ShaderLayer *v59; // x0 __int64 v60; // x0 unsigned int *v61; // x0 unsigned int v62; // w1 unsigned int v63; // w20 double v64; // d9 _BYTE *v65; // x21 double v66; // d10 double v67; // d10 _BOOL4 v68; // w22 __int64 v69; // x0 int v70; // w2 __int64 v71; // x28 __int64 v72; // x1 float v73; // s8 _QWORD *v74; // x2 EffectGameObject *v75; // x28 unsigned __int8 v76; // w2 float v77; // s0 float v78; // s2 void (__fastcall *v79)(EffectGameObject *, float); // x26 float *v80; // x0 __int64 *v81; // x0 __int64 *v82; // x1 __int64 v83; // x0 float v84; // s0 unsigned __int8 v85; // w2 int v86; // w0 float v87; // s0 float v88; // s2 double v89; // d1 __int64 v90; // x0 FMODAudioEngine *v91; // x0 FMODAudioEngine *v92; // x20 char *v93; // x19 __int64 v94; // x0 float v95; // s0 float v96; // s2 float v97; // s4 float v98; // s0 int v99; // w0 _QWORD *v100; // x0 _QWORD *j; // x1 _BYTE *v102; // x2 __int64 v103; // x27 float v104; // s0 GJEffectManager *v105; // x20 __int64 active; // x0 int v107; // [xsp+90h] [xbp+90h] int v108; // [xsp+90h] [xbp+90h] int SelectedEditorOrder; // [xsp+98h] [xbp+98h] int v110; // [xsp+98h] [xbp+98h] int v111; // [xsp+98h] [xbp+98h] int v112; // [xsp+A0h] [xbp+A0h] __int64 v113; // [xsp+A8h] [xbp+A8h] BYREF __int64 v114; // [xsp+B0h] [xbp+B0h] BYREF __int64 v115; // [xsp+B8h] [xbp+B8h] BYREF bool (__fastcall *v116)(__int64, __int64); // [xsp+C0h] [xbp+C0h] BYREF if ( *((_DWORD *)this + 493) ) return _stack_chk_guard; SelectedEditorOrder = LevelEditorLayer::getSelectedEditorOrder(this); SelectedOrderChannel = LevelEditorLayer::getSelectedOrderChannel(this); v4 = *((_QWORD *)this + 1852); v107 = SelectedOrderChannel; if ( !v4 ) { v5 = 0; goto LABEL_5; } v5 = *(_DWORD *)(v4 + 916); if ( *(_DWORD *)(v4 + 1028) != 2900 ) { LABEL_5: v6 = 0; goto LABEL_6; } v6 = 0; if ( !*(_BYTE *)(v4 + 1861) ) { v6 = 1; if ( (unsigned int)GameObject::getObjectDirection((GameObject *)v4) != 1 ) v6 = (unsigned int)GameObject::getObjectDirection((GameObject *)v4) == 2; } LABEL_6: if ( *((_BYTE *)this + 14297) ) GJEffectManager::reset(*((GJEffectManager **)this + 269)); GJBaseGameLayer::updateMGOffsetY(this, 0.0, 0.0, 0, 0.0, -1, -1); v7 = *((float **)this + 1833); v8 = (__int64)(*((_QWORD *)this + 1834) - (_QWORD)v7) >> 2; if ( v8 > 0 ) { v9 = (__int64)(*((_QWORD *)this + 1834) - (_QWORD)v7) >> 2; v10 = ((unsigned __int64)(v8 - 4) >> 2) + 1; v11 = 4 * v10; if ( v8 <= 3 ) goto LABEL_153; __asm { FMOV V0.4S, #-1.0 } v17 = *((_OWORD **)this + 1833); v18 = 0; do { *v17++ = _Q0; ++v18; } while ( v18 < v10 ); v7 += 4 * v10; v8 -= v11; if ( v11 != v9 ) { LABEL_153: *v7 = -1.0; if ( v8 - 1 > 0 ) { v7[1] = -1.0; if ( v8 != 2 ) v7[2] = -1.0; } } } v19 = *((_QWORD *)this + 1811); v20 = nullptr; for ( i = *((_QWORD **)this + 1810); v19; --v19 ) { *i &= ~(1LL << (char)v20); if ( (_DWORD)v20 == 63 ) { ++i; v20 = nullptr; } else { v20 = (cocos2d::CCDirector *)(unsigned int)((_DWORD)v20 + 1); } } v22 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v20); cocos2d::CCDirector::getWinSize(&v113, v22); v23 = *((_QWORD *)this + 1781); v24 = 0.0; if ( v23 ) v24 = *(float *)(v23 + 856) * 0.5; v25 = *((cocos2d::CCNode **)this + 490); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v116, *(float *)&v113 * 0.5, v24 + (float)(*((float *)&v113 + 1) * 0.5)); cocos2d::CCNode::convertToNodeSpace(&v114, v25, (const cocos2d::CCPoint *)&v116); *((_BYTE *)this + 14936) = 0; v26 = *(float *)&v114; v27 = *((_DWORD *)this + 493); v28 = *((float *)&v114 + 1); if ( v27 == 1 ) { v26 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 407) + 192LL))(*((_QWORD *)this + 407)); } else if ( !v27 ) { v29 = *((_QWORD *)this + 1781); if ( v29 && *(_BYTE *)(v29 + 668) ) { v30 = *((_QWORD *)this + 1786); v107 = 0; SelectedEditorOrder = 0; v26 = *(float *)(v30 + 484); v28 = *(float *)(v30 + 488); *((_BYTE *)this + 14936) = 1; } else if ( *((float *)this + 3646) == 0.0 ) { if ( *((float *)this + 3647) != 0.0 ) { v28 = *((float *)this + 3647); v26 = *((float *)this + 3646); } } else { v28 = *((float *)this + 3647); v26 = *((float *)this + 3646); } } v31 = *((_QWORD *)this + 1772); if ( v31 ) { v32 = *(unsigned int **)(v31 + 56); if ( *v32 ) { v33 = *((__int64 **)v32 + 2); v34 = 8LL * *v32 - 8; v35 = (char *)v33 + v34; if ( v33 <= (__int64 *)((char *)v33 + v34) ) { do { v36 = (EffectGameObject *)*v33; if ( !*v33 ) break; GameObject::resetGroupDisabled(*v33); if ( *((_BYTE *)v36 + 1473) ) EffectGameObject::resetSpawnTrigger(v36); ++v33; } while ( v35 >= (char *)v33 ); } } } if ( *((_BYTE *)this + 14184) ) { v37 = *((_QWORD *)this + 1781); *((_BYTE *)this + 14184) = 0; if ( !v37 ) goto LABEL_40; goto LABEL_39; } v37 = *((_QWORD *)this + 1781); if ( v37 ) { if ( *(_BYTE *)(v37 + 869) ) { *((_BYTE *)this + 14184) = 0; LABEL_39: *(_BYTE *)(v37 + 869) = 0; LABEL_40: *(_BYTE *)(*((_QWORD *)this + 1786) + 601LL) = 0; v38 = *((_QWORD *)this + 1772); if ( v38 ) { v39 = *(unsigned int **)(v38 + 56); if ( *v39 ) { v40 = *((char **)v39 + 2); v41 = 8LL * *v39 - 8; v42 = &v40[v41]; while ( v42 >= v40 ) { v43 = *(_QWORD *)v40; if ( !*(_QWORD *)v40 ) break; v44 = *(_QWORD *)v40; v40 += 8; (*(void (__fastcall **)(__int64))(*(_QWORD *)v43 + 1816LL))(v44); cocos2d::CCPoint::operator=(v43 + 1784, &v116); } } } DrawGridLayer::updateTimeMarkers(*((DrawGridLayer **)this + 1786)); LevelTools::sortChannelOrderObjects( *((LevelTools **)this + 1772), nullptr, (cocos2d::CCDictionary *)((char *)&dword_0 + 1)); v45 = *((_QWORD *)this + 1772); if ( v45 ) { v46 = *(_QWORD *)(v45 + 56); LODWORD(v47) = *(_DWORD *)v46; if ( !*(_DWORD *)v46 ) { v50 = *(void **)(v46 + 16); v47 = 0; goto LABEL_53; } v48 = *(_QWORD **)(v46 + 16); v47 = (unsigned int)v47; v49 = &v48[(unsigned int)v47 - 1]; v50 = v48; if ( v48 > v49 ) goto LABEL_53; v51 = (__int64 *)*v48; v52 = 0; if ( !*v48 ) goto LABEL_53; do { v53 = *((_QWORD *)this + 1786); ++v52; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, (const cocos2d::CCPoint *)(v51 + 223)); ++v48; DrawGridLayer::timeForPos( v53, (const cocos2d::CCPoint *)&v116, *((_DWORD *)v51 + 443), *((_DWORD *)v51 + 444), 0, 1u, 0, 0); v54 = *v51; *((_DWORD *)v51 + 452) = v55; (*(void (__fastcall **)(__int64 *, _QWORD))(v54 + 72))(v51, v52); if ( v49 < v48 ) break; v51 = (__int64 *)*v48; } while ( *v48 ); v45 = *((_QWORD *)this + 1772); } v56 = *(unsigned int **)(v45 + 56); v50 = *((void **)v56 + 2); v47 = *v56; LABEL_53: qsort(v50, v47, 8u, (int (*)(const void *, const void *))triggerCompEffect); goto LABEL_54; } if ( *(_BYTE *)(*((_QWORD *)this + 1786) + 601LL) ) { *((_BYTE *)this + 14184) = 0; goto LABEL_39; } } else if ( *(_BYTE *)(*((_QWORD *)this + 1786) + 601LL) ) { *((_BYTE *)this + 14184) = 0; goto LABEL_40; } LABEL_54: if ( !*((_BYTE *)this + 14297) ) { if ( *((_BYTE *)this + 14936) ) goto LABEL_56; LABEL_145: v103 = *((_QWORD *)this + 1786); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v116, v26, v28); DrawGridLayer::timeForPos(v103, (const cocos2d::CCPoint *)&v116, SelectedEditorOrder, v107, 0, 1u, !v6, v5); v57 = v104; v58 = v104; if ( !*((_BYTE *)this + 14297) ) goto LABEL_57; LABEL_146: GJEffectManager::updateEffects(*((GJEffectManager **)this + 269), 0.0); GJEffectManager::processColors(*((GJEffectManager **)this + 269)); v105 = *((GJEffectManager **)this + 269); active = GJEffectManager::activeColorForIndex(v105, 1005); LOWORD(v112) = active; BYTE2(v112) = BYTE2(active); GJEffectManager::calculateLightBGColor(v105, v112); goto LABEL_57; } LevelEditorLayer::transferDefaultColors( this, *(GJEffectManager **)(*((_QWORD *)this + 409) + 320LL), *((GJEffectManager **)this + 269)); if ( !*((_BYTE *)this + 14936) ) goto LABEL_145; LABEL_56: v57 = *(float *)(*((_QWORD *)this + 1786) + 476LL); v58 = v57; if ( *((_BYTE *)this + 14297) ) goto LABEL_146; LABEL_57: GJBaseGameLayer::resetSpawnChannelIndex(this); *((_DWORD *)this + 207) = 0; v59 = *((ShaderLayer **)this + 1552); if ( v59 ) { ShaderLayer::resetAllShaders(v59); *(_BYTE *)(*((_QWORD *)this + 1552) + 1080LL) = 1; if ( *(_BYTE *)(*((_QWORD *)this + 1786) + 492LL) ) *(double *)(*((_QWORD *)this + 1552) + 496LL) = -1.0; } GJBaseGameLayer::resetGradientLayers(this); v60 = *((_QWORD *)this + 1772); if ( v60 ) { v61 = *(unsigned int **)(v60 + 56); v62 = *v61; if ( *v61 ) { v100 = *((_QWORD **)v61 + 2); for ( j = &v100[v62 - 1]; j >= v100; ++v100 ) { v102 = (_BYTE *)*v100; if ( !*v100 ) break; if ( v102[1472] ) v102[1444] = v102[1768]; } } } v63 = 0; LevelEditorLayer::resetDelayedSpawnNodes(this); v64 = -0.000000999999997; if ( v58 > -0.000000999999997 ) { v65 = (char *)this + 14185; do { v64 = v64 + 10.0; if ( v64 <= v58 ) { v67 = 10.0; } else { v66 = v64 - v58; v64 = v58; v67 = 10.0 - v66; } v68 = 0; if ( *((_BYTE *)this + 14936) ) v68 = v64 > *(float *)(*((_QWORD *)this + 1786) + 480LL); LABEL_68: while ( 2 ) { while ( 2 ) { if ( !*v65 ) { LABEL_69: if ( v63 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 1772)) ) goto LABEL_84; LABEL_70: v69 = *((_QWORD *)this + 1857); v70 = 1; v71 = 0; if ( *((_QWORD *)this + 1856) != v69 ) goto LABEL_71; LABEL_88: v115 = 0; goto LABEL_89; } while ( 1 ) { *v65 = 0; v81 = *((__int64 **)this + 1856); v82 = *((__int64 **)this + 1857); v116 = spawnNodeSort; std::__sort( v81, v82, (__int64 (__fastcall **)(__int64 *, __int64 *))&v116); if ( v63 >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 1772)) ) goto LABEL_70; LABEL_84: v83 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 1772), v63); _ZF = v83 == 0; v71 = v83; v69 = *((_QWORD *)this + 1857); v70 = _ZF; if ( *((_QWORD *)this + 1856) == v69 ) goto LABEL_88; LABEL_71: v72 = *(_QWORD *)(v69 - 8); v115 = v72; if ( v70 && v72 ) { v73 = *(float *)(v72 + 8); goto LABEL_74; } if ( !v71 || !v72 ) { if ( v72 ) { LABEL_90: v84 = *(float *)(v71 + 1808); break; } LABEL_89: if ( v70 ) goto LABEL_109; goto LABEL_90; } v73 = *(float *)(v72 + 8); v84 = *(float *)(v71 + 1808); if ( v84 <= v73 ) break; LABEL_74: if ( v64 < v73 ) goto LABEL_109; v74 = *((_QWORD **)this + 1860); v75 = *(EffectGameObject **)v72; if ( v74 == *((_QWORD **)this + 1861) ) { std::vector::__push_back_slow_path( (__int64)this + 14872, &v115); v69 = *((_QWORD *)this + 1857); } else { if ( v74 ) { *v74 = v72; v74 = *((_QWORD **)this + 1860); v69 = *((_QWORD *)this + 1857); } *((_QWORD *)this + 1860) = v74 + 1; } *((_QWORD *)this + 1857) = v69 - 8; if ( *((_DWORD *)v75 + 257) == 1268 ) { v111 = *((_DWORD *)v75 + 366); v95 = (*(float (__fastcall **)(EffectGameObject *))(*(_QWORD *)v75 + 1624LL))(v75); v96 = v64; v97 = v67; LevelEditorLayer::spawnGroupPreview( (__int64)this, v111, v95, v73, v96, v57, v97, *((_BYTE *)v75 + 1666), v68); goto LABEL_68; } *((float *)v75 + 452) = v73; v76 = 0; if ( v68 ) v76 = *(float *)(*((_QWORD *)this + 1786) + 480LL) < v73; v77 = v64; v78 = v67; LevelEditorLayer::activateTriggerEffect(this, v75, v77, v57, v78, v76); v79 = *(void (__fastcall **)(EffectGameObject *, float))(*(_QWORD *)v75 + 1488LL); v80 = (float *)(*(__int64 (__fastcall **)(EffectGameObject *))(*(_QWORD *)v75 + 192LL))(v75); v79(v75, *v80); if ( !*v65 ) goto LABEL_69; } if ( v64 < v84 ) { if ( !*(_BYTE *)(v71 + 1473) ) goto LABEL_109; if ( v68 ) { LABEL_101: v85 = v84 > *(float *)(*((_QWORD *)this + 1786) + 480LL); goto LABEL_102; } ++v63; continue; } break; } v85 = 0; if ( v68 ) goto LABEL_101; LABEL_102: if ( *(_BYTE *)(v71 + 1473) ) goto LABEL_106; v86 = *(_DWORD *)(v71 + 1772); if ( v86 > *((_DWORD *)this + 3710) ) *((_DWORD *)this + 3710) = v86; if ( *((_DWORD *)this + 207) != *(_DWORD *)(v71 + 1776) || (v87 = v64, v88 = v67, (unsigned __int8)LevelEditorLayer::activateTriggerEffect( this, (EffectGameObject *)v71, v87, v57, v88, v85)) ) { LABEL_106: ++v63; continue; } break; } v89 = v64 - *(float *)(v71 + 1808); v64 = *(float *)(v71 + 1808); v67 = v67 - v89; LABEL_109: if ( *((_BYTE *)this + 14297) ) { v98 = v67; GJEffectManager::updateEffects(*((GJEffectManager **)this + 269), v98); GJEffectManager::processColors(*((GJEffectManager **)this + 269)); } } while ( v64 < v58 ); } v90 = *((_QWORD *)this + 1552); if ( v90 ) { *(double *)(v90 + 488) = *(double *)(v90 + 504) + v58; GJShaderState::timesyncShaderActions((GJShaderState *)(*((_QWORD *)this + 1552) + 408LL)); GJBaseGameLayer::updateShaderLayer(this, 0.0); *(_BYTE *)(*((_QWORD *)this + 1552) + 1080LL) = 0; } if ( *((_BYTE *)this + 14297) ) GJBaseGameLayer::updateLevelColors(this); LevelEditorLayer::updateToggledGroups(this); LevelEditorLayer::updateBlendValues((GJEffectManager **)this); if ( *((_BYTE *)this + 14937) ) { v99 = *((unsigned __int8 *)this + 14936); *((_BYTE *)this + 14937) = 0; if ( !v99 ) return _stack_chk_guard; GJBaseGameLayer::processActivatedAudioTriggers(this, *(float *)(*((_QWORD *)this + 1781) + 676LL)); GJBaseGameLayer::clearActivatedAudioTriggers(this); } v91 = (FMODAudioEngine *)*((unsigned __int8 *)this + 14936); if ( *((_BYTE *)this + 14936) ) { v92 = *((FMODAudioEngine **)this + 221); v93 = (char *)this + 1776; if ( v92 != (FMODAudioEngine *)v93 ) { do { v108 = *((_DWORD *)v92 + 8); v110 = *((_DWORD *)v92 + 9); v94 = FMODAudioEngine::sharedEngine(v91); FMODAudioEngine::setChannelVolumeMod(v94, v108, v110, 0.0); v91 = (FMODAudioEngine *)std::__tree_next *>(v92); v92 = v91; } while ( v93 != (char *)v91 ); } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source