// // PlayLayer::setupHasCompleted from 0x1403a66d0 to 0x1403a77f1 (4385 bytes) // // 2 xrefs: // > PlayLayer::processCreateObjectsFromSetup @ 0x1403ad7af // > @ 0x1406d6b54 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // Hidden C++ exception states: #wind=15 void PlayLayer::setupHasCompleted(PlayLayer *a1) { cocos2d::CCDirector *v2; // rax cocos2d::CCArray *m_objects; // rdi cocos2d::ccArray *data; // rdi __int64 num; // rax __int64 *arr; // rdi __int64 *i; // r14 __int64 v8; // rbx std::vector *p_m_activeSaveObjects1; // rcx std::_Simple_types::value_type *Mylast; // rdx LevelSettingsObject *v11; // rax ColorAction *ColorAction; // rax ColorAction *v13; // rax _DWORD *v14; // r14 int v15; // eax int v16; // r15d cocos2d::CCString *v17; // rax const char *CString; // rbx cocos2d::CCTextureCache *v19; // rax cocos2d::CCString *v20; // rax const char *v21; // rbx cocos2d::CCTextureCache *v22; // rax cocos2d::CCString *v23; // rax const char *v24; // rbx __int64 v25; // rcx cocos2d::CCSpriteFrameCache *v26; // rax int m_middleGroundIndex; // edx PlayerObject *m_player1; // rax unsigned int v29; // xmm0_4 float v30; // xmm8_4 _QWORD *AudioFileName; // rbx __int64 v32; // rcx int m_songID; // edi __int64 v34; // rax MusicDownloadManager *v35; // rbx SongInfoObject *SongInfoObject; // rax FMODAudioEngine *AudioString; // rdi AudioEffectsLayer *v38; // rbx _QWORD *v39; // rax GameManager *v40; // rcx GameManager *v41; // rbx int m_loadedFont; // eax int v43; // ebx cocos2d::CCString *v44; // rax const char *v45; // rax cocos2d::CCLabelBMFont *v46; // rax cocos2d::CCLabelBMFont *v47; // rax float v48; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v49; // rbx __int64 v50; // rax float v51; // xmm0_4 double v52; // xmm0_8 __int64 v53; // rax __int64 v54; // rdx __int64 v55; // rbx struct cocos2d::CCDelayTime *v56; // rax struct cocos2d::CCSequence *v57; // rax cocos2d::ccColor3B *v58; // r8 cocos2d::CCSprite *v59; // rax struct cocos2d::CCSprite *v60; // rax cocos2d::CCTexture2D *v61; // rax PlayerObject *v62; // rcx size_t v63; // rdi float v64; // xmm0_4 cocos2d::CCSprite_vtbl *v65; // rbx __int64 v66; // rax float v67; // xmm0_4 cocos2d::CCSprite_vtbl *v68; // rbx __int64 v69; // rax float v70; // xmm0_4 cocos2d::CCSprite_vtbl *v71; // rbx const cocos2d::CCPoint *v72; // rax cocos2d::CCLabelBMFont *v73; // rax float v74; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v75; // rbx __int64 v76; // rax float v77; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v78; // rbx const cocos2d::CCPoint *v79; // rax _BOOL8 v80; // rdx LevelSettingsObject *m_levelSettings; // rax _BOOL8 v82; // rdx StartPosObject *m_startPosObject; // rax LevelSettingsObject *m_startSettings; // rdx GameManager *v85; // rcx ObjectToolbox *v86; // rax _QWORD *v87; // rax GameObject *v88; // rax __int64 v89; // rdx __int64 v90; // rcx __int64 v91; // r8 __int64 v92; // r9 void **v93; // r15 bool v94; // r13 __int64 v95; // r14 unsigned __int64 v96; // rbx unsigned __int64 v97; // rdi void **v98; // rdi GameObject_vtbl *v99; // rbx double v100; // xmm0_8 __int64 v101; // rax cocos2d::CCLabelBMFont_vtbl *v102; // rbx const cocos2d::CCPoint *v103; // rax __int64 v104; // rdx bool v105; // dl void (*v106)(PlayLayer *); // rdx __int64 v107; // rbx struct cocos2d::CCDelayTime *v108; // rax struct cocos2d::CCSequence *v109; // rax cocos2d::ccColor3B *v110; // r8 float v111; // [rsp+28h] [rbp-E0h] __int64 v112[2]; // [rsp+58h] [rbp-B0h] BYREF FMODAudioEngine *v113; // [rsp+68h] [rbp-A0h] _QWORD v114[3]; // [rsp+70h] [rbp-98h] BYREF unsigned __int64 v115; // [rsp+88h] [rbp-80h] __int64 v116; // [rsp+90h] [rbp-78h] _OWORD v117[2]; // [rsp+98h] [rbp-70h] BYREF void *Src[2]; // [rsp+B8h] [rbp-50h] BYREF unsigned __int64 v119; // [rsp+C8h] [rbp-40h] unsigned __int64 v120; // [rsp+D0h] [rbp-38h] struct cocos2d::_ccTexParams v121; // [rsp+D8h] [rbp-30h] BYREF v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2); GJBaseGameLayer::createTextLayers(a1); GJBaseGameLayer::updateSpecialGroupData(a1); PlayLayer::optimizeColorGroups(a1); PlayLayer::optimizeOpacityGroups(a1); PlayLayer::scanDynamicSaveObjects(a1); m_objects = a1->m_objects; if ( m_objects ) { data = m_objects->data; num = data->num; if ( (_DWORD)num ) { arr = (__int64 *)data->arr; for ( i = &arr[num - 1]; arr <= i; ++arr ) { v8 = *arr; if ( !*arr ) break; if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v8 + 1464LL))(*arr) ) { if ( !(*(unsigned __int8 (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 1576LL))(v8, a1->m_isPlatformer) ) { v112[0] = v8; p_m_activeSaveObjects1 = &a1->m_activeSaveObjects1; Mylast = a1->m_activeSaveObjects1._Mypair._Myval2._Mylast; if ( Mylast == a1->m_activeSaveObjects1._Mypair._Myval2._Myend ) goto LABEL_14; *Mylast = (std::_Simple_types::value_type)v8; ++a1->m_activeSaveObjects1._Mypair._Myval2._Mylast; } } else { if ( *(_DWORD *)(v8 + 1256) != 2 || !*(_BYTE *)(v8 + 1544) ) continue; v112[0] = v8; p_m_activeSaveObjects1 = &a1->m_activeSaveObjects2; Mylast = a1->m_activeSaveObjects2._Mypair._Myval2._Mylast; if ( Mylast == a1->m_activeSaveObjects2._Mypair._Myval2._Myend ) { LABEL_14: sub_140063110(p_m_activeSaveObjects1, Mylast, v112); continue; } *Mylast = (std::_Simple_types::value_type)v8; ++a1->m_activeSaveObjects2._Mypair._Myval2._Mylast; } } } } sub_14003BDB0((__int64)&v114[1], (__int64)&a1->m_level->m_capacityString); GJBaseGameLayer::updateLayerCapacity((__int64)a1, (__int64)&v114[1]); GJBaseGameLayer::increaseBatchNodeCapacity(a1); if ( !a1->m_levelSettings ) { v11 = LevelSettingsObject::create(); a1->m_levelSettings = v11; v11->m_level = a1->m_level; cocos2d::CCObject::retain(a1->m_levelSettings); } a1->m_player1->m_isPlatformer = a1->m_isPlatformer; a1->m_player2->m_isPlatformer = a1->m_isPlatformer; ColorAction = GJEffectManager::getColorAction(a1->m_levelSettings->GJBaseGameLayer::m_effectManager, 1005); ColorAction->m_duration = 0.0; ColorAction->m_fromColor = a1->m_player1->m_playerColor1; ColorAction->m_blending = 1; v13 = GJEffectManager::getColorAction(a1->m_levelSettings->GJBaseGameLayer::m_effectManager, 1006); v13->m_duration = 0.0; v13->m_fromColor = a1->m_player1->m_playerColor2; v13->m_blending = 1; v14 = (_DWORD *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v112[0] = (__int64)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(v112[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v14 = (_DWORD *)qword_1406C2ED8; } if ( v14[216] - v14[217] > 0 ) { v15 = 20; if ( v14[216] - v14[217] < 20 ) v15 = v14[216] - v14[217]; v16 = 1; if ( v15 > 1 ) v16 = v15; if ( v16 != v14[244] ) { if ( (int)v14[244] > 1 ) { v17 = cocos2d::CCString::createWithFormat("PlayerExplosion_%02d.png", v14[244] - 1); CString = cocos2d::CCString::getCString(v17); v19 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::removeTextureForKey(v19, CString); } if ( v16 > 1 ) { v20 = cocos2d::CCString::createWithFormat("PlayerExplosion_%02d.png", v16 - 1); v21 = cocos2d::CCString::getCString(v20); v22 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v22, v21, 0); v23 = cocos2d::CCString::createWithFormat("PlayerExplosion_%02d.plist", v16 - 1); v24 = cocos2d::CCString::getCString(v23); v26 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v25); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v26, v24); } v14[244] = v16; } } GJBaseGameLayer::createBackground(a1, a1->m_levelSettings->m_backgroundIndex); m_middleGroundIndex = a1->m_levelSettings->m_middleGroundIndex; if ( m_middleGroundIndex > 0 ) GJBaseGameLayer::createMiddleground(a1, m_middleGroundIndex); GJBaseGameLayer::createGroundLayer(a1, a1->m_levelSettings->m_groundIndex, a1->m_levelSettings->m_groundLineIndex); UILayer::togglePlatformerMode(a1->m_uiLayer, a1->m_isPlatformer); m_player1 = a1->m_player1; LOWORD(v112[0]) = *(_WORD *)&m_player1->m_playerColor1.r; *(float *)&v29 = (float)m_player1->m_playerColor1.b / 255.0; *(float *)v117 = (float)LOBYTE(v112[0]) / 255.0; *((float *)v117 + 1) = (float)BYTE1(v112[0]) / 255.0; *((_QWORD *)&v117[0] + 1) = v29 | 0x3F80000000000000LL; v30 = 1.0; a1->m_glitterParticles->setStartColor(a1->m_glitterParticles, (const cocos2d::ccColor4F *)v117); v117[0] = xmmword_1406240A0; a1->m_glitterParticles->setEndColor(a1->m_glitterParticles, (const cocos2d::ccColor4F *)v117); GJBaseGameLayer::resetPlayer(a1); v112[0] = (__int64)&v114[1]; AudioFileName = GJGameLevel::getAudioFileName((__int64)a1->m_level, &v114[1]); v32 = qword_1406C2E88; if ( !qword_1406C2E88 ) { v113 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); v32 = qword_1406C2E88; } FMODAudioEngine::loadMusic(v32, (__int64)AudioFileName, 1.0, 0.0, 1.0, 1, 0, 0, a1->m_levelSettings->m_dontReset); m_songID = a1->m_levelSettings->GJBaseGameLayer::m_level->m_songID; if ( m_songID || a1->m_level->m_audioTrack >= 20 ) { v34 = qword_1406C2E88; if ( !qword_1406C2E88 ) { v113 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); v34 = qword_1406C2E88; } *(_BYTE *)(v34 + 544) = 1; *(_DWORD *)(v34 + 528) = 1036831949; *(_QWORD *)(v34 + 532) = 1036831949; a1->m_skipAudioStep = 1; v35 = MusicDownloadManager::sharedState(); SongInfoObject = MusicDownloadManager::getSongInfoObject(v35, m_songID); if ( SongInfoObject ) SongInfoObject->m_priority = ++v35->m_songPriority; } else { if ( !qword_1406C2E88 ) { v113 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); } *(_BYTE *)(qword_1406C2E88 + 544) = 0; } if ( !qword_1406C2E88 ) { v113 = (FMODAudioEngine *)operator new(0x888u); qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88); } a1->m_isSilent = *(float *)(qword_1406C2E88 + 512) <= 0.0; AudioString = (FMODAudioEngine *)LevelTools::getAudioString((__int64)&v114[1], a1->m_level->m_audioTrack); v113 = AudioString; v38 = (AudioEffectsLayer *)operator new(0x250u); v112[0] = (__int64)v38; cocos2d::CCLayerColor::CCLayerColor(v38); v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (AudioEffectsLayer_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&AudioEffectsLayer::`vftable'; v38->cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&AudioEffectsLayer::`vftable'; v38->m_batchNode = nullptr; v38->m_unk1bc = nullptr; v38->m_unk1c0 = nullptr; *(_QWORD *)&v38->m_timeElapsed = 0; v38->m_goingDown = 0; v38->m_audioScale = 0.0; v38->m_unk1d4 = 0; v39 = (_QWORD *)sub_14003BDB0((__int64)v117, (__int64)AudioString); if ( AudioEffectsLayer::init((__int64)v38, v39) ) { cocos2d::CCObject::autorelease(v38); } else { ((void (__fastcall *)(AudioEffectsLayer *, __int64))v38->~AudioEffectsLayer)(v38, 1); v38 = nullptr; } sub_14003A830((__int64)AudioString); a1->m_audioEffectsLayer = v38; a1->m_objectLayer->addChild_0(a1->m_objectLayer, v38, 1); a1->m_audioEffectsLayer->setVisible(a1->m_audioEffectsLayer, 0); v40 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v113 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v40 = (GameManager *)qword_1406C2ED8; } v41 = v40; if ( !v40 ) { v113 = (FMODAudioEngine *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v113); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v40 = (GameManager *)qword_1406C2ED8; } m_loadedFont = v41->m_loadedFont; v43 = 59; if ( m_loadedFont < 59 ) v43 = m_loadedFont; if ( v43 <= 0 ) { GameManager::loadFont(v40, 0); v45 = (const char *)&qword_14052A4D8; } else { GameManager::loadFont(v40, v43); v44 = cocos2d::CCString::createWithFormat("gjFont%02d.fnt", v43); v45 = cocos2d::CCString::getCString(v44); } v46 = cocos2d::CCLabelBMFont::create("Attempt 1", v45); a1->m_attemptLabel = v46; a1->m_objectLayer->addChild_0(a1->m_objectLayer, v46, 1400); if ( a1->m_doNot ) ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_attemptLabel->setScaleY)(a1->m_attemptLabel); v47 = cocos2d::CCLabelBMFont::create(byte_140518980, "chatFont.fnt"); a1->m_infoLabel = v47; v48 = ((float (__fastcall *)(PlayLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v47, 1000); v49 = a1->m_infoLabel->__vftable; cocos2d::CCPoint::CCPoint(v48, 0.0); v51 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v49->setAnchorPoint)(a1->m_infoLabel, v50); v52 = cocos2d::CCPoint::CCPoint(v51, 5.0); cocos2d::CCPoint::CCPoint(*(float *)&v52, 0.0); cocos2d::CCPoint::operator+(v53, v112); a1->m_infoLabel->setPosition_0(a1->m_infoLabel, (const cocos2d::CCPoint *)v112); LOBYTE(v54) = -106; a1->m_infoLabel->setOpacity(&a1->m_infoLabel->cocos2d::CCRGBAProtocol, v54); ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_infoLabel->setScale_0)(a1->m_infoLabel); PlayLayer::updateInfoLabel(a1); a1->toggleInfoLabel(a1); if ( a1->m_levelSettings->m_twoPlayerMode && !a1->m_isTestMode && a1->m_level->m_levelType != Editor && !a1->m_isPlatformer ) { a1->m_attemptLabel->setVisible(a1->m_attemptLabel, 0); v55 = cocos2d::CCCallFunc::create(a1, PlayLayer::showTwoPlayerGuide); v56 = cocos2d::CCDelayTime::create(0.5); v57 = cocos2d::CCSequence::create(v56, v55, 0); cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v57, v58, 0.0, v111); v30 = 2.0; } *(_WORD *)&a1->m_freezeStartCamera = 257; a1->m_skipArtReload = 1; GJBaseGameLayer::updateCamera(a1, 0.0); v59 = cocos2d::CCSprite::create("slidergroove2.png"); a1->m_progressBar = v59; a1->addChild_0(a1, v59, 10); v60 = cocos2d::CCSprite::create("sliderBar2.png"); a1->m_progressFill = v60; a1->m_progressWidth = a1->m_progressBar->m_obRect.size.width - 4.0; a1->m_progressHeight = 8.0; v121.minFilter = 9729; v121.magFilter = 9729; v121.wrapS = 10497; v121.wrapT = 10497; v61 = v60->getTexture(&v60->cocos2d::CCTextureProtocol); cocos2d::CCTexture2D::setTexParameters(v61, &v121); v62 = a1->m_player1; LOWORD(v112[0]) = *(_WORD *)&v62->m_playerColor1.r; BYTE2(v112[0]) = v62->m_playerColor1.b; a1->m_progressFill->setColor(&a1->m_progressFill->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v112); v63 = -1; v64 = ((float (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_progressBar->addChild_0)( a1->m_progressBar, a1->m_progressFill, 0xFFFFFFFFLL); v65 = a1->m_progressFill->__vftable; cocos2d::CCPoint::CCPoint(v64, 0.0); v67 = ((float (__fastcall *)(cocos2d::CCSprite *, __int64))v65->setAnchorPoint)(a1->m_progressFill, v66); v68 = a1->m_progressFill->__vftable; cocos2d::CCPoint::CCPoint(v67, 2.0); v70 = ((float (__fastcall *)(cocos2d::CCSprite *, __int64))v68->setPosition_0)(a1->m_progressFill, v69); v71 = a1->m_progressBar->__vftable; cocos2d::CCPoint::CCPoint(v70, *(float *)v114 * 0.5); v71->setPosition_0(a1->m_progressBar, v72); v73 = cocos2d::CCLabelBMFont::create("100%", (const char *)&qword_14052A4D8); a1->m_percentageLabel = v73; ((void (__fastcall *)(cocos2d::CCLabelBMFont *))v73->setScale_0)(v73); v74 = ((float (__fastcall *)(PlayLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)( a1, a1->m_percentageLabel, 15); v75 = a1->m_percentageLabel->__vftable; cocos2d::CCPoint::CCPoint(v74, (float)(*(float *)v114 * 0.5) + 110.0); v77 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v75->setPosition_0)(a1->m_percentageLabel, v76); v78 = a1->m_percentageLabel->__vftable; cocos2d::CCPoint::CCPoint(v77, 0.0); v78->setAnchorPoint(a1->m_percentageLabel, v79); PlayLayer::updateProgressbar(a1); a1->toggleProgressbar(a1); if ( a1->m_isTestMode || (m_levelSettings = a1->m_levelSettings, m_levelSettings->m_propertykA24) || m_levelSettings->m_spawnGroup > 0 ) { LOBYTE(v80) = 1; a1->m_player1->setVisible(a1->m_player1, v80); LOBYTE(v82) = 1; } else { a1->m_player1->setVisible(a1->m_player1, 0); v82 = 0; } a1->m_player2->setVisible(a1->m_player2, v82); PlayLayer::loadDefaultColors(a1); GJBaseGameLayer::updateLevelColors(a1); m_startPosObject = a1->m_startPosObject; if ( m_startPosObject ) m_startSettings = m_startPosObject->m_startSettings; else m_startSettings = a1->m_levelSettings; GJBaseGameLayer::setupLevelStart(a1, m_startSettings); a1->m_objectsDeactivated = 1; ((void (__fastcall *)(PlayLayer *))a1->updateVisibility)(a1); GJBaseGameLayer::updateCamera(a1, 0.0); a1->toggleGlitter(a1, 0); v85 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { *(_QWORD *)&v117[0] = operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(*(__int64 *)&v117[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v85 = (GameManager *)qword_1406C2ED8; } a1->m_disableGravityEffect = GameManager::getGameVariable(v85, "0072"); LODWORD(v112[0]) = 8; v86 = ObjectToolbox::sharedState(); v87 = (_QWORD *)sub_1401D0660((__int64 *)&v86->m_allKeys, (int *)v112); if ( v87[3] > 0xFu ) v87 = (_QWORD *)*v87; *(_OWORD *)Src = 0; v119 = 0; v120 = 0; do ++v63; while ( *((_BYTE *)v87 + v63) ); sub_14003A930(Src, v87, v63); v88 = GameObject::createWithKey(8); a1->m_anticheatSpike = v88; v88->customSetup(v88); *(_OWORD *)&v114[1] = 0; v115 = 0; v116 = 0; v93 = Src; v94 = v120 > 0xF; if ( v120 > 0xF ) v93 = (void **)Src[0]; v95 = 0x7FFFFFFFFFFFFFFFLL; v96 = v119; if ( v119 > 0x7FFFFFFFFFFFFFFFLL ) sub_140007B50(v90, v89, v91, v92); v116 = 15; if ( v119 > 0xF ) { v97 = v119 | 0xF; if ( (v119 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { if ( v97 < 0x16 ) v97 = 22; } else { v97 = 0x7FFFFFFFFFFFFFFFLL; } v114[1] = sub_14003AA10(v97 + 1); v115 = v96; v116 = v97; memcpy((void *)v114[1], v93, v96 + 1); } else { v115 = v119; *(_OWORD *)&v114[1] = *(_OWORD *)v93; } GameObject::addColorSprite((__int64)a1->m_anticheatSpike, (__int64)&v114[1]); *(_OWORD *)&v114[1] = 0; v115 = 0; v98 = Src; if ( v94 ) v98 = (void **)Src[0]; v116 = 15; if ( v96 > 0xF ) { if ( (v96 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { v95 = v96 | 0xF; if ( (v96 | 0xF) < 0x16 ) v95 = 22; } v114[1] = sub_14003AA10(v95 + 1); v115 = v96; v116 = v95; memcpy((void *)v114[1], v98, v96 + 1); } else { v115 = v96; *(_OWORD *)&v114[1] = *(_OWORD *)v98; } a1->m_anticheatSpike->setupCustomSprites(a1->m_anticheatSpike, (std::string *)&v114[1]); v99 = a1->m_anticheatSpike->GJBaseGameLayer::__vftable; a1->m_player1->getPosition_0(a1->m_player1); v100 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117); ((void (__fastcall *)(GameObject *, __int64))v99->setStartPos)(a1->m_anticheatSpike, v101); a1->m_anticheatSpike->m_bDontDraw = 1; PlayLayer::addObject(a1, a1->m_anticheatSpike); GJBaseGameLayer::createPlayerCollisionBlock(a1); v102 = a1->m_attemptLabel->__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v100, (float)(*(float *)v114 * 0.5) + a1->m_gameState.m_cameraPosition.x); v102->setPosition_0(a1->m_attemptLabel, v103); if ( a1->m_isTestMode ) { LOBYTE(v104) = 50; a1->m_attemptLabel->setOpacity(&a1->m_attemptLabel->cocos2d::CCRGBAProtocol, v104); } a1->m_freezeStartCamera = 1; a1->resetLevel(a1); a1->m_started = 0; PlayLayer::prepareMusic(a1, v105); v106 = PlayLayer::startGame; if ( !a1->m_passedIntegrity ) v106 = PlayLayer::onQuit; v107 = cocos2d::CCCallFunc::create(a1, v106); v108 = cocos2d::CCDelayTime::create(v30); v109 = cocos2d::CCSequence::create(v108, v107, 0); cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v109, v110, 0.0, v111); cocos2d::CCNode::scheduleUpdate(a1); GJBaseGameLayer::checkSpawnObjects(a1); GJEffectManager::updateEffects(a1->m_effectManager, 0.0); ((void (__fastcall *)(PlayLayer *))a1->updateVisibility)(a1); GJBaseGameLayer::updateLevelColors(a1); GJBaseGameLayer::updateProximityVolumeEffects(a1); PlayLayer::updateTestModeLabel(a1); if ( GJBaseGameLayer::shouldExitHackedLevel(a1) ) { PlayLayer::removeAllObjects(a1); PlayLayer::onQuit(a1); } sub_14003A830((__int64)Src); }
GD Web Decomp Icon

GD Web Decomp

Raw Source