// // LevelEditorLayer::onPlaytest from 0x46819c to 0x4685f4 (1112 bytes) // // 1 xrefs: // > EditorUI::onPlaytest @ 0x489eba // // 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:48:58 +0000 // int __fastcall LevelEditorLayer::onPlaytest(LevelEditorLayer *this) { EditorBuildStats *v2; // r0 cocos2d::CCDirector *v3; // r0 int v4; // r0 cocos2d::CCDirector *updated; // r0 cocos2d::CCDirector *v6; // r0 cocos2d::CCDirector *fixed; // r0 float v8; // s15 int v9; // r1 int v10; // r3 StartPosObject *StartPosObject; // r0 int v12; // r3 _DWORD *v13; // r3 GameObject **v14; // r7 GameObject **v15; // r8 GameObject *v16; // r5 GameObject *v17; // t1 _DWORD *v18; // r2 cocos2d::CCObject **v19; // r5 cocos2d::CCObject **v20; // r8 int v21; // r3 LevelSettingsObject *v22; // r1 cocos2d::CCObject *v23; // r7 cocos2d::CCObject *v24; // t1 StartPosObject *v25; // r1 GameManager *v26; // r0 GameManager *v27; // r0 int v28; // r3 _DWORD *v29; // r3 _DWORD *v30; // r7 _DWORD *v31; // r5 int v33; // r7 const cocos2d::CCPoint *v34; // r0 int v35; // r7 const cocos2d::CCPoint *v36; // r0 GameObject *v37; // r5 const cocos2d::CCPoint *v38; // r0 GameObject *v39; // r5 const cocos2d::CCPoint *v40; // r0 GameManager *v41; // r0 GameManager *v42; // r0 int result; // r0 float v44; // s15 _BYTE v45[8]; // [sp+14h] [bp-Ch] BYREF v2 = (LevelEditorLayer *)((char *)this + 12104); ++*((_DWORD *)v2 + 6); v3 = (cocos2d::CCDirector *)EditorBuildStats::noteAction(v2); v4 = cocos2d::CCDirector::sharedDirector(v3); *(_BYTE *)((*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4) + 92) = 1; GJBaseGameLayer::preResumeGame(this); UILayer::editorPlaytest(*((UILayer **)this + 2810), 1); UILayer::togglePlatformerMode(*((UILayer **)this + 2810), *((_BYTE *)this + 10614)); *((_DWORD *)this + 83) = -1082130432; GJBaseGameLayer::updateZoom(this, 1.0, 0.0, 0, 0.0, -1, -1); GJBaseGameLayer::resetLevelVariables(this); *((_QWORD *)this + 1407) = 0; *((_BYTE *)this + 1438) = 0; *((_BYTE *)this + 1281) = 1; LevelEditorLayer::addPlayerCollisionBlock((int)this); *((_DWORD *)this + 2928) = 0; GJBaseGameLayer::loadLevelSettings(this); updated = (cocos2d::CCDirector *)GJBaseGameLayer::updateMaxGameplayY(this); if ( *((_BYTE *)this + 11709) ) { v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(updated); fixed = (cocos2d::CCDirector *)cocos2d::CCDirector::resetSmoothFixCounter(v6); *(_BYTE *)(cocos2d::CCDirector::sharedDirector(fixed) + 142) = 1; } GJEffectManager::removePersistentFromAllItems(*((GJEffectManager **)this + 381)); GJEffectManager::reset(*((GJEffectManager **)this + 381)); LevelEditorLayer::transferDefaultColors( this, *(GJEffectManager **)(*((_DWORD *)this + 521) + 264), *((GJEffectManager **)this + 381)); GJEffectManager::updateEffects(*((GJEffectManager **)this + 381), 0.0); GJEffectManager::processColors(*((GJEffectManager **)this + 381)); LevelEditorLayer::updateBlendValues((GJEffectManager **)this); GJBaseGameLayer::togglePlayerVisibility(this, 1); *((_DWORD *)this + 2962) = 0; *((_DWORD *)this + 2957) = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 609) + 84))(*((_DWORD *)this + 609)); v8 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 609) + 84))(*((_DWORD *)this + 609))); *((float *)this + 2957) = v8; if ( v8 < 0.7 ) v9 = LODWORD(v8); else v9 = 1060320051; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 609) + 80))(*((_DWORD *)this + 609), v9); *((_QWORD *)this + 98) = 0; LevelEditorLayer::clearPlayerPoints(this); LevelEditorLayer::clearTouchPoints(this); GJBaseGameLayer::clearHitboxTrail(this); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 519) + 172))(*((_DWORD *)this + 519), 1); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 520) + 172))(*((_DWORD *)this + 520), 1); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 2961) + 172))(*((_DWORD *)this + 2961), 0); GJBaseGameLayer::setActiveStartPosObject(this, nullptr); v10 = *((_DWORD *)this + 522); if ( v10 ) { v13 = *(_DWORD **)(v10 + 52); if ( *v13 ) { v14 = (GameObject **)v13[3]; v15 = &v14[*v13] + 0x3FFFFFFF; while ( v14 <= v15 ) { v17 = *v14++; v16 = v17; if ( !v17 ) break; (*(void (__fastcall **)(GameObject *))(*(_DWORD *)v16 + 688))(v16); (*(void (__fastcall **)(GameObject *))(*(_DWORD *)v16 + 644))(v16); (*(void (__fastcall **)(GameObject *, int))(*(_DWORD *)v16 + 888))(v16, 1); if ( (*(int (__fastcall **)(GameObject *))(*(_DWORD *)v16 + 900))(v16) == 25 ) GameObject::determineSlopeDirection(v16); else GameObject::updateIsOriented((int)v16); } } } LevelEditorLayer::updateAnimateOnTriggerObjects((int)this, 0); StartPosObject = (StartPosObject *)LevelEditorLayer::findStartPosObject(this); GJBaseGameLayer::setActiveStartPosObject(this, StartPosObject); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 525)); v12 = *((_DWORD *)this + 2941); if ( v12 ) { v18 = *(_DWORD **)(v12 + 52); if ( *v18 ) { v19 = (cocos2d::CCObject **)v18[3]; v20 = &v19[*v18] + 0x3FFFFFFF; while ( v19 <= v20 ) { v24 = *v19++; v23 = v24; if ( !v24 ) break; if ( !*((_BYTE *)v23 + 1292) && !*((_BYTE *)v23 + 1293) || (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v23 + 844))(v23) ) { cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 525), v23); } } } } GJBaseGameLayer::orderSpawnObjects(this); GJBaseGameLayer::resetSpawnChannelIndex(this); LevelEditorLayer::resetToggledGroupsAndObjects(this); GJEffectManager::resetEffects(*(GJEffectManager **)(*((_DWORD *)this + 521) + 264)); LevelEditorLayer::recreateGroups((cocos2d::CCArray **)this); GJBaseGameLayer::updateSpecialGroupData(this); LevelEditorLayer::dirtifyTriggers(this); GJBaseGameLayer::resetGroupCounters(this, 1); GJBaseGameLayer::resetPlayer(this); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 520) + 456))(*((_DWORD *)this + 520), 0); GJBaseGameLayer::updateCamera(this, 0.0); v21 = *((_DWORD *)this + 2680); if ( v21 ) v22 = *(LevelSettingsObject **)(v21 + 1648); else v22 = *((LevelSettingsObject **)this + 521); GJBaseGameLayer::setupLevelStart(this, v22); v25 = *((StartPosObject **)this + 2680); if ( v25 ) { v26 = (GameManager *)GJBaseGameLayer::loadStartPosObject(this, v25); v27 = (GameManager *)GameManager::sharedState(v26); if ( GameManager::getGameVariable(v27, "0151") ) { v28 = *((_DWORD *)this + 522); if ( v28 ) { v29 = *(_DWORD **)(v28 + 52); if ( *v29 ) { v30 = (_DWORD *)v29[3]; v31 = &v30[*v29 - 1]; while ( v30 <= v31 ) { if ( !*v30++ ) break; (*(void (__fastcall **)(LevelEditorLayer *))(*(_DWORD *)this + 684))(this); } } } } } else { *((_BYTE *)this + 1439) = 1; GJBaseGameLayer::checkSpawnObjects(this); } GJBaseGameLayer::syncBGTextures(this); v33 = *((_DWORD *)this + 519); v34 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v33 + 96))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v34); cocos2d::CCPoint::operator=(v33 + 2112, v45); if ( *((_BYTE *)this + 866) ) { v35 = *((_DWORD *)this + 520); v36 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v35 + 96))(v35); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, v36); cocos2d::CCPoint::operator=(v35 + 2112, v45); } v37 = *((GameObject **)this + 519); v38 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v37 + 96))(v37); GameObject::setLastPosition(v37, v38); if ( *((_BYTE *)this + 866) ) { v39 = *((GameObject **)this + 520); v40 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v39 + 96))(v39); GameObject::setLastPosition(v39, v40); } cocos2d::CCNode::resumeSchedulerAndActions(*((cocos2d::CCNode **)this + 519)); cocos2d::CCNode::resumeSchedulerAndActions(*((cocos2d::CCNode **)this + 520)); LevelEditorLayer::updatePlayerState((int)this, 1); LevelEditorLayer::updatePreviewParticles(this); GJBaseGameLayer::stopCameraShake(this); if ( *((_BYTE *)this + 11885) ) GJBaseGameLayer::updateLevelColors(this); GJBaseGameLayer::updateGradientLayers(this); GJBaseGameLayer::updateShaderLayer(this, 0.0); GJBaseGameLayer::updateCamera(this, 0.0); v41 = (GameManager *)(*(int (__fastcall **)(LevelEditorLayer *, _DWORD))(*(_DWORD *)this + 596))(this, 0); v42 = (GameManager *)GameManager::sharedState(v41); result = GameManager::getGameVariable(v42, "0002"); if ( result ) { v44 = *((double *)this + 99); GJBaseGameLayer::processActivatedAudioTriggers(this, v44); GJBaseGameLayer::clearActivatedAudioTriggers(this); result = GJBaseGameLayer::processQueuedAudioTriggers(this); } *((_BYTE *)this + 1439) = 0; *((_BYTE *)this + 10829) = 0; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source