// // LevelEditorLayer::updateDebugDraw from 0x1000fe560 to 0x10010066a (8458 bytes) // // 1 xrefs: // > @ 0x1008c06a0 // // 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 // void __fastcall LevelEditorLayer::updateDebugDraw(LevelEditorLayer *a1) { __m128 v1; // xmm2 GameManager *v2; // rax double v3; // xmm0_8 double v4; // xmm0_8 __m128d v5; // xmm1 float v6; // xmm0_4 cocos2d::CCDirector *v7; // rsi __m128 v8; // xmm1 __m128 v9; // xmm0 GameManager *v10; // rax LevelEditorLayer *v11; // rbx unsigned int v12; // r12d __m128 v13; // xmm3 cocos2d::CCDrawNode *v14; // rdi cocos2d::CCDrawNode *v15; // rbx cocos2d::CCDrawNode *v16; // rdi unsigned int *v17; // r13 float *v18; // rax __m128 v19; // xmm1 __m128 v20; // xmm0 __m128 v21; // xmm1 float v22; // xmm1_4 __m128 v23; // xmm2 __m128 v24; // xmm3 cocos2d::CCDrawNode *m_debugDrawNode; // rdi float y; // xmm1_4 cocos2d::CCDictionary *m_keyframeGroups; // rax cocos2d::CCDictElement *m_pElements; // rax char *v29; // r12 int v30; // ecx __int64 v31; // rsi unsigned int v32; // ecx __m128 v33; // xmm0 __m128 v34; // xmm2 cocos2d::CCArray *m_pObject; // rbx __int64 v36; // rax GJEffectManager *m_effectManager; // rdi GroupCommandObject2 *v38; // r14 std::__vector_base::pointer begin; // rsi std::__vector_base::pointer end; // rax unsigned __int64 v41; // rdi double v42; // xmm0_8 KeyframeObject *v43; // rsi float v44; // xmm0_4 char *v45; // rbx __int64 i; // r12 float v47; // xmm0_4 float v48; // xmm1_4 cocos2d::CCDrawNode *v49; // rdi __int64 v50; // rbx unsigned __int64 v51; // r14 EffectGameObject *m_traceInObject; // rdi unsigned int m_unk3b24; // eax EffectGameObject *m_traceOutObject; // rdi unsigned int v55; // eax int m_leftSectionIndex; // ecx int m_rightSectionIndex; // eax unsigned __int64 v58; // rdx cocos2d::ccColor4F *v59; // rsi __int64 v60; // rdi __int64 v61; // rdx __int64 v62; // rcx std::vector *v63; // r15 __int64 v64; // r14 __int64 j; // r12 LevelEditorLayer *v66; // r13 GameObject *v67; // r13 int v68; // eax __int64 v69; // rcx __int64 m_currentLayer; // rdx __int64 v71; // rsi double v72; // xmm0_8 cocos2d::CCDrawNode *v73; // rdi cocos2d::CCPoint *elems; // rsi GameObject *m_selectedObject; // r14 int height_low; // esi cocos2d::CCArray *Group; // rax cocos2d::CCArray *v78; // rbx double v79; // xmm0_8 double v80; // xmm0_8 double v81; // xmm0_8 cocos2d::ccArray *data; // rax float v83; // xmm2_4 cocos2d::CCObject **arr; // r15 unsigned __int64 v85; // r15 int v86; // r12d __int64 v87; // rsi LevelEditorLayer *v88; // rbx cocos2d::CCDrawNode *v89; // rbx cocos2d::CCDrawNode *v90; // rbx cocos2d::CCDrawNode *v91; // rbx cocos2d::CCDrawNode *v92; // r14 bool v93; // al cocos2d::CCDrawNode *v94; // rdi cocos2d::CCDrawNode *v95; // rbx cocos2d::CCDrawNode *v96; // rbx cocos2d::CCDrawNode *v97; // rbx LevelEditorLayer *v98; // r14 cocos2d::CCDrawNode *v99; // rbx cocos2d::CCDrawNode *v100; // rdi bool v101; // al cocos2d::CCDrawNode *v102; // rdi cocos2d::CCDrawNode *v103; // rbx cocos2d::CCDrawNode *v104; // rbx cocos2d::CCDrawNode *v105; // rbx cocos2d::CCDrawNode *v106; // rbx bool v107; // al cocos2d::CCDrawNode *v108; // rdi bool v109; // cc LevelEditorLayer *v110; // rbx GameManager *v111; // rax unsigned __int64 v112; // rax __int64 v113; // r14 __int64 v114; // r15 const cocos2d::CCPoint *v115; // rdx LevelEditorLayer *v116; // rdx cocos2d::CCDrawNode *v117; // rbx std::__vector_base::pointer v118; // r12 std::__vector_base>::pointer v119; // rcx std::__vector_base>::pointer v120; // rax int v121; // ecx cocos2d::ccColor4F *v122; // rcx std::__vector_base>::pointer v123; // rax __int64 v124; // rcx unsigned __int64 v125; // rdx unsigned __int64 v126; // rdi __int64 v127; // r13 __int64 v128; // r14 __int64 v129; // r15 const cocos2d::CCPoint *v130; // rdx cocos2d::CCDrawNode *v131; // rbx __int64 v132; // r12 __int64 v133; // rbx cocos2d::CCDrawNode *v134; // rdi const cocos2d::CCPoint *v135; // rsi const cocos2d::CCPoint *v136; // rdx _QWORD *v137; // r14 GameManager *v138; // rax std::__vector_base::pointer v139; // r14 __int64 v140; // r12 cocos2d::CCRect *v141; // rbx double v142; // xmm0_8 cocos2d::CCRect *v143; // r12 cocos2d::CCDrawNode *v144; // rbx cocos2d::CCDrawNode *v145; // rdi cocos2d::CCPoint v146; // [rsp+18h] [rbp-198h] BYREF __m128d v147; // [rsp+20h] [rbp-190h] __int64 v148; // [rsp+38h] [rbp-178h] __int64 v149; // [rsp+40h] [rbp-170h] __int64 v150; // [rsp+48h] [rbp-168h] __m128 v151; // [rsp+50h] [rbp-160h] _BYTE v152[4]; // [rsp+60h] [rbp-150h] BYREF float v153; // [rsp+64h] [rbp-14Ch] cocos2d::CCRect v154; // [rsp+68h] [rbp-148h] BYREF float v155; // [rsp+78h] [rbp-138h] BYREF __m128 v156; // [rsp+80h] [rbp-130h] __m128 v157; // [rsp+90h] [rbp-120h] unsigned int v158; // [rsp+A8h] [rbp-108h] BYREF unsigned int v159; // [rsp+ACh] [rbp-104h] __int128 v160; // [rsp+B0h] [rbp-100h] __m128 v161; // [rsp+C0h] [rbp-F0h] __m128 v162; // [rsp+D0h] [rbp-E0h] float v163; // [rsp+E8h] [rbp-C8h] BYREF float v164; // [rsp+ECh] [rbp-C4h] cocos2d::ccColor4F *v165; // [rsp+F0h] [rbp-C0h] __int64 p_m_spline1; // [rsp+F8h] [rbp-B8h] std::vector v167; // [rsp+100h] [rbp-B0h] BYREF float v168; // [rsp+118h] [rbp-98h] BYREF float v169; // [rsp+11Ch] [rbp-94h] __m128 v170; // [rsp+120h] [rbp-90h] __m128 v171; // [rsp+130h] [rbp-80h] BYREF cocos2d::ccColor4F *v172; // [rsp+148h] [rbp-68h] __m128 inserted; // [rsp+150h] [rbp-60h] BYREF __int64 p_m_unk190; // [rsp+160h] [rbp-50h] cocos2d::CCPoint v175; // [rsp+168h] [rbp-48h] BYREF double v176; // [rsp+170h] [rbp-40h] LevelEditorLayer *v177; // [rsp+178h] [rbp-38h] float v178; // [rsp+184h] [rbp-2Ch] double v179; // 0:xmm0_8.8 GJBaseGameLayer::updateDebugDraw(a1); v2 = GameManager::sharedState(); byte_10099EFB0 = GameManager::getGameVariable(v2, "0181"); ftime((timeb *)&v167); v3 = (double)(LOWORD(v167.__end_) + 1000 * ((__int64)v167.__begin_ & 0xFFFFF)) / 1000.0; *(double *)&qword_10099EFB8 = v3; if ( byte_10099EFB0 ) { v4 = 0.5199999809265137; } else { v5 = (__m128d)0x3FE0000000000000uLL; v5.f64[0] = 0.5 * v3; v5.f64[0] = _mm_round_sd(v5, v5, 11).f64[0]; v1.i64[0] = fabs(v3 - (v5.f64[0] + v5.f64[0])); v6 = COERCE_DOUBLE(*(_QWORD *)&v3 & 0x8000000000000000LL | v1.i64[0]) * -0.5; v4 = (float)(v6 + 1.0); } qword_10099EFA8 = *(_QWORD *)&v4; v7 = cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v179 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v158); v8.i32[1] = 0; v8.f32[0] = 0.25 / ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCDirector *, double))a1->m_objectLayer->getScale)( a1->m_objectLayer, v7, v179); v178 = v8.f32[0]; v177 = a1; *(double *)v9.i64 = sub_10028D180(&v154); v10 = GameManager::sharedState(); LOBYTE(v165) = GameManager::getGameVariable(v10, "0121"); v11 = v177; cocos2d::CCDrawNode::enableDrawArea(v177->m_debugDrawNode, &v154); if ( (unsigned int)sub_100720070(v11->m_cameraGuideTriggers) ) { LODWORD(v176) = v158; v9.i64[0] = v159; LODWORD(v172) = v159; if ( (unsigned int)sub_100720070(v11->m_cameraGuideTriggers) ) { *(float *)&v176 = *(float *)&v176 + *(float *)&v176; *(float *)&p_m_unk190 = *(float *)&v176 * 0.5; *(float *)&v172 = *(float *)&v172 + *(float *)&v172; *(float *)&p_m_spline1 = *(float *)&v172 * 0.5; v12 = 0; do { v17 = (unsigned int *)sub_1007200C0(v11->m_cameraGuideTriggers, v12); v18 = (float *)(*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v17 + 192LL))(v17); v170.f32[0] = *v18 - *(float *)&p_m_unk190; v8.i64[0] = *(unsigned int *)((*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v17 + 192LL))(v17) + 4); v8.f32[0] = v8.f32[0] - *(float *)&p_m_spline1; v9.i64[0] = v170.u32[0]; v1.i64[0] = LODWORD(v176); sub_10028CC00( &v167, COERCE_DOUBLE((unsigned __int64)v170.u32[0]), *(double *)v8.i64, *(float *)&v176, *(float *)&v172); if ( v17[257] == 2016 && (unsigned __int8)sub_10028D320(&v154, &v167, *(double *)v9.i64) && (!(_BYTE)v165 || *((_BYTE *)v17 + 1294) != 1 || *((_BYTE *)v17 + 1133) == 1) ) { v9.i64[0] = v17[465]; if ( v9.f32[0] > 0.0 ) { v160 = v17[465]; (*(void (__fastcall **)(unsigned int *))(*(_QWORD *)v17 + 192LL))(v17); sub_10028CC60(&v175); v19 = (__m128)0x40400000u; v19.f32[0] = fmaxf(fminf(3.0, *((float *)v17 + 436)), 0.40000001); v157 = v19; v20 = _mm_moveldup_ps(v19); v170 = _mm_div_ps(_mm_insert_ps((__m128)xmmword_1008165A0, (__m128)v158, 16), v20); v162 = _mm_div_ps(_mm_blend_ps((__m128)v159, (__m128)xmmword_1008165B0, 14), v20); sub_10028CC60(&v168); v21 = _mm_movehdup_ps(v170); v1 = _mm_movehdup_ps(v162); if ( v170.f32[0] != v21.f32[0] || v162.f32[0] != v1.f32[0] ) { v156 = v21; v161 = v1; (*(void (__fastcall **)(unsigned int *, unsigned int *))(*(_QWORD *)v17 + 192LL))(v17, v17 + 372); sub_10028CC60(&v163); v23 = v162; v22 = v164; v23.f32[0] = v162.f32[0] * 0.5; if ( (float)(v162.f32[0] * 0.5) > v164 ) { v22 = v23.f32[0] + 0.0; v164 = v23.f32[0] + 0.0; } v24 = v156; v24.f32[0] = v156.f32[0] * 0.5; v156 = v24; v162 = v23; sub_10028CBE0(v152, (float)(v163 - v24.f32[0]) + v168, (float)(v22 - v23.f32[0]) + v169); sub_10028CBE0(&v155, (float)(v156.f32[0] + v163) + v168, (float)(v162.f32[0] + v164) + v169); m_debugDrawNode = v11->m_debugDrawNode; v171 = 0; inserted = _mm_insert_ps((__m128)0x3F0000003F800000uLL, (__m128)(unsigned int)v160, 52); cocos2d::CCDrawNode::drawRect(m_debugDrawNode, v152, &v155, &v171, &inserted, 0, v178); v1 = v161; } y = v175.y; v1.f32[0] = v1.f32[0] * 0.5; if ( v1.f32[0] > v175.y ) { y = v1.f32[0] + 0.0; v175.y = v1.f32[0] + 0.0; } v13 = v170; v13.f32[0] = v170.f32[0] * 0.5; v170 = v13; v161 = v1; sub_10028CBE0(&v163, (float)(v175.x - v13.f32[0]) + v168, (float)(y - v1.f32[0]) + v169); sub_10028CBE0(v152, (float)(v170.f32[0] + v175.x) + v168, (float)(v161.f32[0] + v175.y) + v169); sub_10028CBE0(&v155, v175.x - (float)((float)v11->m_gameState.m_unkInt1 / v157.f32[0]), v175.y); v14 = v11->m_debugDrawNode; v171 = 0; inserted = _mm_insert_ps((__m128)0x3F80000000000000uLL, (__m128)(unsigned int)v160, 52); cocos2d::CCDrawNode::drawRect(v14, &v163, v152, &v171, &inserted, 0, v178); v15 = v177->m_debugDrawNode; sub_10028CBE0(&inserted, v155, v164); v8.i64[0] = LODWORD(v153); sub_10028CBE0(&v146, v155, v153); v171 = _mm_insert_ps((__m128)xmmword_1008154E0, (__m128)(unsigned int)v160, 52); v16 = v15; v11 = v177; v9.i64[0] = LODWORD(v178); cocos2d::CCDrawNode::drawSegment( v16, (const cocos2d::CCPoint *)&inserted, &v146, v178, (const cocos2d::ccColor4F *)&v171); } } ++v12; } while ( v12 < (unsigned int)sub_100720070(v11->m_cameraGuideTriggers) ); } } m_keyframeGroups = v11->m_keyframeGroups; if ( m_keyframeGroups ) { m_pElements = m_keyframeGroups->m_pElements; if ( m_pElements ) { v29 = nullptr; v30 = 0; while ( 1 ) { v31 = (unsigned int)(v30 + 1); if ( v30 >= 5 ) v31 = 0; v156.i64[0] = v31; switch ( (int)v31 ) { case 2: v32 = 3315455; break; case 3: v32 = 16776960; break; case 4: v32 = 0xFFFF; break; case 5: v32 = 16711935; break; default: v32 = 3342130; break; } v33 = 0; v33.f32[0] = (float)(unsigned __int8)v32 / 255.0; v8 = 0; v8.f32[0] = (float)BYTE1(v32) / 255.0; v34 = 0; v151.i64[0] = (__int64)m_pElements->hh.next; v34.f32[0] = (float)HIWORD(v32) / 255.0; v1 = _mm_blend_ps(v34, (__m128)xmmword_1008150D0, 14); v9 = _mm_movelh_ps(_mm_insert_ps(v33, v8, 16), v1); v171 = v9; m_pObject = (cocos2d::CCArray *)m_pElements->m_pObject; if ( m_pObject ) { if ( (unsigned int)sub_100720070(m_pElements->m_pObject) >= 2 ) { v36 = sub_1007200C0(m_pObject, 0); if ( !(_BYTE)v165 || *(_BYTE *)(v36 + 1294) != 1 || *(_BYTE *)(v36 + 1133) == 1 ) { m_effectManager = v177->m_effectManager; memset(&v167, 0, sizeof(v167)); v9.i64[0] = 1065353216; v8.i64[0] = 1065353216; v1.i64[0] = 1065353216; v38 = GJEffectManager::createKeyframeCommand( m_effectManager, 0, m_pObject, nullptr, 0, 0, 1, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, &v167); if ( v167.__begin_ ) { v167.__end_ = v167.__begin_; operator delete(v167.__begin_); } v11 = v177; if ( !v38 ) goto LABEL_26; begin = v38->m_keyframes.__begin_; end = v38->m_keyframes.__end_; if ( end == begin || (char *)end - (char *)begin == 448 ) goto LABEL_26; v157.i64[0] = (__int64)v38; v41 = 0; do { v9.i64[0] = *(_QWORD *)&begin[v41].m_unk170; if ( *(double *)v9.i64 <= 0.0 ) { v11 = v177; } else { *(_QWORD *)&v160 = v41; v42 = *(double *)v9.i64 / 50.0; if ( !v29 ) { *(double *)v170.i64 = v42; v29 = (char *)operator new[](0x190u); sub_10028CC30(v29); sub_10028CC30(v29 + 8); sub_10028CC30(v29 + 16); sub_10028CC30(v29 + 24); sub_10028CC30(v29 + 32); sub_10028CC30(v29 + 40); sub_10028CC30(v29 + 48); sub_10028CC30(v29 + 56); sub_10028CC30(v29 + 64); sub_10028CC30(v29 + 72); sub_10028CC30(v29 + 80); sub_10028CC30(v29 + 88); sub_10028CC30(v29 + 96); sub_10028CC30(v29 + 104); sub_10028CC30(v29 + 112); sub_10028CC30(v29 + 120); sub_10028CC30(v29 + 128); sub_10028CC30(v29 + 136); sub_10028CC30(v29 + 144); sub_10028CC30(v29 + 152); sub_10028CC30(v29 + 160); sub_10028CC30(v29 + 168); sub_10028CC30(v29 + 176); sub_10028CC30(v29 + 184); sub_10028CC30(v29 + 192); sub_10028CC30(v29 + 200); sub_10028CC30(v29 + 208); sub_10028CC30(v29 + 216); sub_10028CC30(v29 + 224); sub_10028CC30(v29 + 232); sub_10028CC30(v29 + 240); sub_10028CC30(v29 + 248); sub_10028CC30(v29 + 256); sub_10028CC30(v29 + 264); sub_10028CC30(v29 + 272); sub_10028CC30(v29 + 280); sub_10028CC30(v29 + 288); sub_10028CC30(v29 + 296); sub_10028CC30(v29 + 304); sub_10028CC30(v29 + 312); sub_10028CC30(v29 + 320); sub_10028CC30(v29 + 328); sub_10028CC30(v29 + 336); sub_10028CC30(v29 + 344); sub_10028CC30(v29 + 352); sub_10028CC30(v29 + 360); sub_10028CC30(v29 + 368); sub_10028CC30(v29 + 376); sub_10028CC30(v29 + 384); sub_10028CC30(v29 + 392); v42 = *(double *)v170.i64; } v43 = &begin[v41]; v44 = v42; *(float *)&v172 = v44; p_m_unk190 = (__int64)&v43->m_unk190; p_m_spline1 = (__int64)&v43->m_spline1; v161.i64[0] = (__int64)v43; v162.i64[0] = (__int64)v29; v45 = v29; for ( i = 0; i != 50; ++i ) { v176 = (float)((float)(int)i * *(float *)&v172); v47 = sub_1004E0F50(p_m_spline1); v170.f32[0] = v47; v48 = sub_1004E0F50(&v43->m_spline2); sub_10028CBE0(&inserted, v170.f32[0], v48); sub_10028CCE0(&v167, p_m_unk190); sub_10028CC90(); v45 += 8; } v11 = v177; v49 = v177->m_debugDrawNode; v8 = _mm_movelh_ps( (__m128)0x3F80000000000000uLL, _mm_insert_ps((__m128)xmmword_1008165D0, (__m128)*(unsigned int *)(v161.i64[0] + 440), 16)); *(__m128 *)&v167.__begin_ = v8; v29 = (char *)v162.i64[0]; v9.i64[0] = LODWORD(v178); cocos2d::CCDrawNode::drawLines( v49, (cocos2d::CCPoint *)v162.i64[0], 0x32u, v178, (const cocos2d::ccColor4F *)&v167); begin = *(std::__vector_base::pointer *)(v157.i64[0] + 440); end = *(std::__vector_base::pointer *)(v157.i64[0] + 448); v41 = v160; } ++v41; } while ( 0x6DB6DB6DB6DB6DB7LL * (((char *)end - (char *)begin) >> 6) - 1 > v41 ); if ( (char *)end - (char *)begin == 448 ) goto LABEL_26; v50 = 848; v51 = 0; do { if ( !*((_BYTE *)&begin[-1] + v50 - 370) ) { v171.i32[3] = *(_DWORD *)((char *)&begin->m_spline1.m_x.__end_ + v50); v9.i64[0] = LODWORD(v178); cocos2d::CCDrawNode::drawSegment( v177->m_debugDrawNode, (const cocos2d::CCPoint *)((char *)&begin[-1] + v50), (const cocos2d::CCPoint *)((char *)begin + v50), v178, (const cocos2d::ccColor4F *)&v171); begin = *(std::__vector_base::pointer *)(v157.i64[0] + 440); end = *(std::__vector_base::pointer *)(v157.i64[0] + 448); } ++v51; v50 += 448; } while ( 0x6DB6DB6DB6DB6DB7LL * (((char *)end - (char *)begin) >> 6) - 1 > v51 ); } } } v11 = v177; LABEL_26: GJEffectManager::resetTempGroupCommands(v11->m_effectManager, 0); m_pElements = (cocos2d::CCDictElement *)v151.i64[0]; v30 = v156.i32[0]; if ( !v151.i64[0] ) { if ( v29 ) operator delete(v29); break; } } } } cocos2d::CCDrawNode::disableDrawArea(v11->m_debugDrawNode); m_traceInObject = v11->m_traceInObject; if ( m_traceInObject ) { m_unk3b24 = v11->m_unk3b24; if ( v11->m_unk3b28 < m_unk3b24 ) { v11->m_unk3b28 = m_unk3b24; sub_1000F78E0( m_traceInObject, v11, (void **)&v11->m_unk3b30.__begin_, 1, *(double *)v9.i64, *(double *)v8.i64, *(double *)v1.i64); } sub_1000FBF30(v11, (__int64 *)&v11->m_unk3b30, 0, v11->m_debugDrawNode); } m_traceOutObject = v11->m_traceOutObject; if ( m_traceOutObject ) { v55 = v11->m_unk3b24; if ( v11->m_unk3b2c < v55 ) { v11->m_unk3b2c = v55; sub_1000F78E0( m_traceOutObject, v11, (void **)&v11->m_unk3b48.__begin_, 0, *(double *)v9.i64, *(double *)v8.i64, *(double *)v1.i64); } sub_1000FBF30(v11, (__int64 *)&v11->m_unk3b48, 0, v11->m_debugDrawNode); } if ( v11->m_drawTriggerBoxes ) { m_leftSectionIndex = v11->m_leftSectionIndex; m_rightSectionIndex = v11->m_rightSectionIndex; if ( m_leftSectionIndex <= m_rightSectionIndex ) { v58 = (unsigned __int64)((char *)v11->m_sections.__end_ - (char *)v11->m_sections.__begin_) >> 3; if ( m_leftSectionIndex < (int)v58 ) { v59 = (cocos2d::ccColor4F *)m_leftSectionIndex; v60 = (int)v58; v176 = 0.0; p_m_spline1 = (int)v58; while ( 1 ) { v61 = (__int64)v11->m_sections.__begin_[(_QWORD)v59]; if ( v61 ) { v62 = (*(_QWORD *)(v61 + 8) - *(_QWORD *)v61) >> 3; LODWORD(v61) = v11->m_bottomSectionIndex; if ( (int)v61 <= v11->m_topSectionIndex ) goto LABEL_76; } else { LODWORD(v62) = -1; LODWORD(v61) = v11->m_bottomSectionIndex; if ( (int)v61 <= v11->m_topSectionIndex ) { LABEL_76: if ( (int)v61 < (int)v62 ) { v61 = (int)v61; p_m_unk190 = (int)v62; v172 = v59; do { v63 = v11->m_sections.__begin_[(_QWORD)v59]->__begin_[v61]; v170.i64[0] = v61; if ( v63 ) { v64 = v11->m_sectionSizes.__begin_[(_QWORD)v59]->__begin_[v61]; if ( v64 > 0 ) { for ( j = 0; v64 != j; ++j ) { v67 = v63->__begin_[j]; if ( ((unsigned __int8 (__fastcall *)(GameObject *, double))v67->isVisible)( v67, *(double *)v9.i64) ) { v68 = *(_DWORD *)&v67->m_editorLayer2; v69 = (unsigned int)-((_WORD)v68 == 0); m_currentLayer = (unsigned __int16)v11->m_currentLayer; if ( (_WORD)m_currentLayer == 0xFFFF || (_WORD)m_currentLayer == v67->m_editorLayer || (v69 = v68 | (unsigned int)v69, (_WORD)m_currentLayer == (_WORD)v69) ) { if ( (!(_BYTE)v165 || !v67->m_isHide || v67->m_isSelected) && (v67->m_classType == Effect && LOBYTE(v67[1].m_sAdditionalTransform.b) || ((unsigned int (__fastcall *)(GameObject *, cocos2d::ccColor4F *, __int64, __int64))v67->getType)( v67, v59, m_currentLayer, v69) == 30 && !v67->m_isDisabled) && ((unsigned __int8 (__fastcall *)(GameObject *, cocos2d::ccColor4F *, __int64, __int64))v67->shouldDrawEditorHitbox)( v67, v59, m_currentLayer, v69) && !v67->m_greenDebugDraw ) { v71 = ((__int64 (__fastcall *)(GameObject *))v67->getObjectRect)(v67); v72 = sub_10028D180(&v167); if ( __ROR4__( -1527099483 * (int)((float (__fastcall *)(GameObject *, __int64, double))v67->getRotation)( v67, v71, v72) + 47721858, 1) < 0x2D82D83u ) { sub_10028CC30(&v171); sub_10028CC30(&inserted); sub_10028CC30(&v175); sub_10028CC30(&v168); sub_10028CC90(); sub_10028CBE0( &v163, *(float *)&v167.__begin_ + *(float *)&v167.__end_, *((float *)&v167.__begin_ + 1) + *((float *)&v167.__end_ + 1)); sub_10028CC90(); sub_10028CBE0(&v163, v171.f32[0], v175.y); sub_10028CC90(); v8.i64[0] = v171.u32[1]; sub_10028CBE0(&v163, v175.x, v171.f32[1]); } else { GameObject::calculateOrientedBox(v67); sub_10028CC30(&v171); sub_10028CC30(&inserted); sub_10028CC30(&v175); sub_10028CC30(&v168); ((void (__fastcall *)(GameObject *))v67->getOrientedBox)(v67); sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); } *(double *)v9.i64 = sub_10028CC90(); if ( SLODWORD(v176) > 391 ) { v11 = v177; break; } v66 = v177; sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); sub_10028CC90(); *(_QWORD *)&v176 = (unsigned int)(LODWORD(v176) + 8); v11 = v66; v59 = (cocos2d::ccColor4F *)&v171; *(double *)v9.i64 = sub_10028CC90(); } } } } } } v59 = v172; if ( v170.i64[0] >= v11->m_topSectionIndex ) break; v61 = v170.i64[0] + 1; } while ( v170.i64[0] + 1 < p_m_unk190 ); m_rightSectionIndex = v11->m_rightSectionIndex; v60 = p_m_spline1; } } } if ( (__int64)v59 < m_rightSectionIndex ) { v59 = (cocos2d::ccColor4F *)((char *)v59 + 1); if ( (__int64)v59 < v60 ) continue; } if ( SLODWORD(v176) > 0 ) { v73 = v11->m_debugDrawNode; elems = v11->m_debugDrawPoints->__elems_; *(_OWORD *)&v167.__begin_ = xmmword_100815DF0; v9.i64[0] = LODWORD(v178); cocos2d::CCDrawNode::drawLines(v73, elems, LODWORD(v176), v178, (const cocos2d::ccColor4F *)&v167); } break; } } } } cocos2d::CCDrawNode::enableDrawArea(v11->m_debugDrawNode, &v154); m_selectedObject = v11->m_editorUI->m_selectedObject; if ( m_selectedObject ) { if ( (unsigned int)(m_selectedObject->m_objectID - 3602) <= 3 && m_selectedObject->m_objectID != 3604 ) { height_low = LODWORD(m_selectedObject[1].m_obContentSize.height); if ( height_low > 0 ) { *(float *)&v172 = m_selectedObject[1].m_fTextureRight; Group = GJBaseGameLayer::getGroup(v177, height_low); if ( Group ) { v78 = Group; if ( (unsigned int)sub_100720070(Group) ) { *(float *)&v176 = (float)SLODWORD(m_selectedObject[1].m_fBlVertexMod); v170.f32[0] = (float)SLODWORD(m_selectedObject[1].m_fBrVertexMod); *(float *)&p_m_unk190 = (float)SLODWORD(m_selectedObject[1].m_fTextureLeft); v79 = sub_10028D270(&v154); LODWORD(v165) = LODWORD(v79); v80 = sub_10028D2C0(&v154); LODWORD(v160) = LODWORD(v80); v81 = sub_10028D230(&v154); v162.i32[0] = LODWORD(v81); *(double *)v9.i64 = sub_10028D280(&v154); v161.i32[0] = v9.i32[0]; data = v78->data; if ( data->num ) { v8.i64[0] = LODWORD(v176); v8.f32[0] = *(float *)&v176 * 3.0; v83 = (float)(v170.f32[0] * 3.0) + (float)(*(float *)&v176 * 3.0); arr = data->arr; v156.i64[0] = (__int64)&arr[data->num - 1]; LODWORD(p_m_spline1) = (unsigned int)v172 & 0xFFFFFFFD; LODWORD(v176) = v8.i32[0]; v150 = (unsigned int)(int)v8.f32[0]; v170.f32[0] = v83; v148 = (unsigned int)(int)v83; *(float *)&p_m_unk190 = (float)(*(float *)&p_m_unk190 * 3.0) + v83; v149 = (unsigned int)(int)*(float *)&p_m_unk190; v157.i32[0] = (unsigned int)v172 & 0xFFFFFFFE; v85 = (unsigned __int64)(arr + 1); v86 = 0; v147 = _mm_unpacklo_pd((__m128d)0x3F800000u, (__m128d)xmmword_1008150D0); v9 = _mm_loadh_ps((const double *)&qword_1008164A8); v151 = v9; while ( 1 ) { v87 = *(_QWORD *)(v85 - 8); if ( !v87 ) goto LABEL_159; (*(void (__fastcall **)(__m128 *))(*(_QWORD *)v87 + 1344LL))(&inserted); if ( *(float *)&v176 <= 0.0 ) { LABEL_123: v88 = v177; if ( v170.f32[0] == *(float *)&v176 ) goto LABEL_144; goto LABEL_131; } *(__m128d *)&v167.__begin_ = v147; v88 = v177; if ( (_DWORD)v172 ) break; v94 = v177->m_debugDrawNode; v171 = 0; v8.i64[0] = LODWORD(v178); v93 = cocos2d::CCDrawNode::drawCircle( v94, (const cocos2d::CCPoint *)&inserted, *(float *)&v176, (const cocos2d::ccColor4F *)&v171, v178, (const cocos2d::ccColor4F *)&v167, v150); LABEL_130: v86 += v93; if ( v170.f32[0] == *(float *)&v176 ) goto LABEL_144; LABEL_131: *(_OWORD *)&v167.__begin_ = xmmword_1008165E0; if ( !(_DWORD)v172 ) { v102 = v88->m_debugDrawNode; v171 = 0; v8.i64[0] = LODWORD(v178); v101 = cocos2d::CCDrawNode::drawCircle( v102, (const cocos2d::CCPoint *)&inserted, v170.f32[0], (const cocos2d::ccColor4F *)&v171, v178, (const cocos2d::ccColor4F *)&v167, v148); LABEL_143: v86 += v101; LABEL_144: v9.i64[0] = (unsigned int)p_m_unk190; if ( *(float *)&p_m_unk190 == v170.f32[0] ) goto LABEL_157; LABEL_145: v9.i64[0] = v151.i64[0]; *(__m128 *)&v167.__begin_ = v151; if ( (_DWORD)v172 ) { if ( (unsigned int)v172 > 2 ) { if ( (_DWORD)p_m_spline1 == 1 ) goto LABEL_152; LABEL_148: if ( v157.i32[0] == 4 ) goto LABEL_149; LABEL_153: if ( (_DWORD)p_m_spline1 != 4 ) goto LABEL_157; } else { v103 = v88->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] - *(float *)&p_m_unk190, *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] - *(float *)&p_m_unk190, v161.f32[0]); v9.i64[0] = LODWORD(v178); v86 += cocos2d::CCDrawNode::drawSegment( v103, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 != 1 ) goto LABEL_148; LABEL_152: v105 = v177->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] + *(float *)&p_m_unk190, *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] + *(float *)&p_m_unk190, v161.f32[0]); v9.i64[0] = LODWORD(v178); v86 += cocos2d::CCDrawNode::drawSegment( v105, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( v157.i32[0] != 4 ) goto LABEL_153; LABEL_149: v104 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] - *(float *)&p_m_unk190); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] - *(float *)&p_m_unk190; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] - *(float *)&p_m_unk190); v9.i64[0] = LODWORD(v178); v86 += cocos2d::CCDrawNode::drawSegment( v104, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 != 4 ) goto LABEL_157; } v106 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] + *(float *)&p_m_unk190); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] + *(float *)&p_m_unk190; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] + *(float *)&p_m_unk190); v9.i64[0] = LODWORD(v178); v107 = cocos2d::CCDrawNode::drawSegment( v106, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); } else { v108 = v88->m_debugDrawNode; v171 = 0; v9.i64[0] = (unsigned int)p_m_unk190; v8.i64[0] = LODWORD(v178); v107 = cocos2d::CCDrawNode::drawCircle( v108, (const cocos2d::CCPoint *)&inserted, *(float *)&p_m_unk190, (const cocos2d::ccColor4F *)&v171, v178, (const cocos2d::ccColor4F *)&v167, v149); } v86 += v107; goto LABEL_157; } if ( (unsigned int)v172 > 2 ) { if ( (_DWORD)p_m_spline1 != 1 ) { LABEL_134: if ( v157.i32[0] == 4 ) goto LABEL_135; goto LABEL_140; } } else { v95 = v88->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] - v170.f32[0], *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] - v170.f32[0], v161.f32[0]); v86 += cocos2d::CCDrawNode::drawSegment( v95, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 != 1 ) goto LABEL_134; } v97 = v177->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] + v170.f32[0], *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] + v170.f32[0], v161.f32[0]); v86 += cocos2d::CCDrawNode::drawSegment( v97, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( v157.i32[0] == 4 ) { LABEL_135: v96 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] - v170.f32[0]); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] - v170.f32[0]; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] - v170.f32[0]); v86 += cocos2d::CCDrawNode::drawSegment( v96, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 == 4 ) goto LABEL_141; goto LABEL_136; } LABEL_140: if ( (_DWORD)p_m_spline1 == 4 ) { LABEL_141: v98 = v177; v99 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] + v170.f32[0]); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] + v170.f32[0]; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] + v170.f32[0]); v100 = v99; v88 = v98; v101 = cocos2d::CCDrawNode::drawSegment( v100, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); goto LABEL_143; } LABEL_136: v88 = v177; v9.i64[0] = (unsigned int)p_m_unk190; if ( *(float *)&p_m_unk190 != v170.f32[0] ) goto LABEL_145; LABEL_157: if ( v86 <= 100 ) { v109 = v85 <= v156.i64[0]; v85 += 8LL; if ( v109 ) continue; } goto LABEL_159; } if ( (unsigned int)v172 > 2 ) { if ( (_DWORD)p_m_spline1 != 1 ) { LABEL_121: if ( v157.i32[0] == 4 ) goto LABEL_122; goto LABEL_127; } } else { v89 = v177->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] - *(float *)&v176, *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] - *(float *)&v176, v161.f32[0]); v86 += cocos2d::CCDrawNode::drawSegment( v89, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 != 1 ) goto LABEL_121; } v91 = v177->m_debugDrawNode; sub_10028CBE0(&v171, inserted.f32[0] + *(float *)&v176, *(float *)&v160); v8.i64[0] = v161.u32[0]; sub_10028CBE0(&v175, inserted.f32[0] + *(float *)&v176, v161.f32[0]); v86 += cocos2d::CCDrawNode::drawSegment( v91, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( v157.i32[0] == 4 ) { LABEL_122: v90 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] - *(float *)&v176); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] - *(float *)&v176; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] - *(float *)&v176); v86 += cocos2d::CCDrawNode::drawSegment( v90, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); if ( (_DWORD)p_m_spline1 != 4 ) goto LABEL_123; LABEL_128: v88 = v177; v92 = v177->m_debugDrawNode; sub_10028CBE0(&v171, *(float *)&v165, inserted.f32[1] + *(float *)&v176); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] + *(float *)&v176; sub_10028CBE0(&v175, v162.f32[0], inserted.f32[1] + *(float *)&v176); v93 = cocos2d::CCDrawNode::drawSegment( v92, (const cocos2d::CCPoint *)&v171, &v175, v178, (const cocos2d::ccColor4F *)&v167); goto LABEL_130; } LABEL_127: if ( (_DWORD)p_m_spline1 != 4 ) goto LABEL_123; goto LABEL_128; } } } } } } LABEL_159: v110 = v177; cocos2d::CCDrawNode::disableDrawArea(v177->m_debugDrawNode); if ( v110->m_playerPoints.__begin_ != v110->m_playerPoints.__end_ ) { v111 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v111, "0152") ) { LODWORD(p_m_unk190) = v110->m_playbackMode; v112 = (unsigned __int64)((char *)v110->m_playerPoints.__end_ - (char *)v110->m_playerPoints.__begin_) >> 3; if ( (int)v112 >= 2 ) { v170.i64[0] = (unsigned int)(v112 - 1); *(_QWORD *)&v176 = (unsigned int)(v112 - 2); v113 = 0; v114 = 0; do { if ( (unsigned __int8)sub_10028D2D0( &v154, &v110->m_playerPoints.__begin_[v113], *(double *)v9.i64, *(double *)v8.i64) || (unsigned __int8)sub_10028D2D0( &v154, &v110->m_playerPoints.__begin_[v113 + 1], *(double *)v9.i64, *(double *)v8.i64) ) { v116 = v110; v117 = v110->m_debugDrawNode; v118 = v116->m_playerPoints.__begin_; if ( (_DWORD)p_m_unk190 == 1 && *(_QWORD *)&v176 == v114 ) v115 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(PlayerObject *))v116->m_player1->getPosition)(v116->m_player1); else v115 = &v118[v113 + 1]; *(_OWORD *)&v167.__begin_ = xmmword_1008165F0; v9.i64[0] = 1056964608; cocos2d::CCDrawNode::drawSegment(v117, &v118[v113], v115, 0.5, (const cocos2d::ccColor4F *)&v167); v110 = v177; } ++v114; ++v113; } while ( v170.i64[0] != v114 ); } v119 = v110->m_player2Points.__begin_; v120 = v110->m_player2Points.__end_; if ( v119 != v120 ) { v121 = -1431655765 * (((char *)v120 - (char *)v119) >> 3); if ( v121 > 0 ) { v165 = (cocos2d::ccColor4F *)(unsigned int)(v121 - 1); p_m_spline1 = v121 & 0x7FFFFFFF; v122 = nullptr; do { v123 = v110->m_player2Points.__begin_; v172 = v122; v124 = (__int64)v122; v125 = (unsigned __int64)((char *)v123[v124].__end_ - (char *)v123[v124].__begin_) >> 3; if ( (int)v125 >= 2 ) { v126 = (unsigned __int64)((char *)v123[v124].__end_ - (char *)v123[v124].__begin_) >> 3; v170.i64[0] = (__int64)&v123[v124]; v127 = (unsigned int)(v125 - 1); if ( (_DWORD)p_m_unk190 == 1 && v177->m_gameState.m_isDualMode && v172 == v165 ) { *(_QWORD *)&v176 = (unsigned int)(v126 - 2); v128 = 0; v129 = 0; do { if ( (unsigned __int8)sub_10028D2D0( &v154, v128 + *(_QWORD *)v170.i64[0], *(double *)v9.i64, *(double *)v8.i64) || (unsigned __int8)sub_10028D2D0( &v154, *(_QWORD *)v170.i64[0] + v128 + 8, *(double *)v9.i64, *(double *)v8.i64) ) { v131 = v177->m_debugDrawNode; v132 = *(_QWORD *)v170.i64[0]; if ( *(_QWORD *)&v176 == v129 ) v130 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(PlayerObject *))v177->m_player2->getPosition)(v177->m_player2); else v130 = (const cocos2d::CCPoint *)(v132 + v128 + 8); *(_OWORD *)&v167.__begin_ = xmmword_100816600; v9.i64[0] = 1056964608; cocos2d::CCDrawNode::drawSegment( v131, (const cocos2d::CCPoint *)(v128 + v132), v130, 0.5, (const cocos2d::ccColor4F *)&v167); } ++v129; v128 += 8; } while ( v127 != v129 ); } else { v133 = 8; do { v137 = (_QWORD *)v170.i64[0]; if ( (unsigned __int8)sub_10028D2D0( &v154, *(_QWORD *)v170.i64[0] + v133 - 8, *(double *)v9.i64, *(double *)v8.i64) || (unsigned __int8)sub_10028D2D0(&v154, v133 + *v137, *(double *)v9.i64, *(double *)v8.i64) ) { v134 = v177->m_debugDrawNode; v135 = (const cocos2d::CCPoint *)(*v137 + v133 - 8); v136 = (const cocos2d::CCPoint *)(v133 + *v137); *(_OWORD *)&v167.__begin_ = xmmword_100816600; v9.i64[0] = 1056964608; cocos2d::CCDrawNode::drawSegment(v134, v135, v136, 0.5, (const cocos2d::ccColor4F *)&v167); } v133 += 8; --v127; } while ( v127 ); } } v122 = (cocos2d::ccColor4F *)((char *)&v172->r + 1); v110 = v177; } while ( (cocos2d::ccColor4F *)((char *)&v172->r + 1) != (cocos2d::ccColor4F *)p_m_spline1 ); } } } } if ( v110->m_touchPoints.__begin_ != v110->m_touchPoints.__end_ ) { v138 = GameManager::sharedState(); if ( GameManager::getGameVariable(v138, "0149") ) { v139 = v110->m_touchPoints.__begin_; v140 = (__int64)v110->m_touchPoints.__end_; if ( v139 != (std::__vector_base::pointer)v140 ) { v141 = &v154; v170.i64[0] = v140; do { v142 = sub_10028CC60(&inserted); if ( (unsigned __int8)sub_10028D2D0(v141, &inserted, v142, *(double *)v8.i64) ) { v143 = v141; v144 = v177->m_debugDrawNode; sub_10028CBE0(&v175, inserted.f32[0] + -2.0, inserted.f32[1] + -2.0); v8.i64[0] = inserted.u32[1]; v8.f32[0] = inserted.f32[1] + 2.0; sub_10028CBE0(&v168, inserted.f32[0] + 2.0, inserted.f32[1] + 2.0); *(_OWORD *)&v167.__begin_ = xmmword_100816610; v171 = 0; v145 = v144; v141 = v143; v140 = v170.i64[0]; cocos2d::CCDrawNode::drawRect(v145, &v175, &v168, &v167, &v171, 0, 0.0); } ++v139; } while ( v139 != (std::__vector_base::pointer)v140 ); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source