// // LevelEditorLayer::updateDebugDraw from 0x100367cfc to 0x1003691ec (5360 bytes) // // 1 xrefs: // > @ 0x1007f4308 // // 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) { LevelEditorLayer *v1; // x20 GameManager *v2; // x0 int8x16_t v3; // q1 int8x16_t v4; // q0 double v5; // d0 float64x2_t v6; // q2 float v7; // s0 cocos2d::CCDirector *v8; // x0 float v9; // s15 GameManager *v10; // x0 float v11; // s8 float v12; // s10 unsigned int v13; // w21 float v14; // s9 float v15; // s10 float v16; // s8 float v17; // s12 __int64 v22; // x22 float v23; // s11 __int64 v24; // x0 float v25; // s11 __int64 *v26; // x0 float v27; // s0 float v28; // s15 float v29; // s14 float v30; // s13 float v31; // s12 float v32; // s8 __n128 v33; // q0 __n128 v34; // q1 __int64 *v36; // x0 __n128 v37; // q0 __n128 v38; // q1 float v39; // s8 float v40; // s12 __n128 v41; // q0 __n128 v42; // q1 cocos2d::CCDrawNode *m_debugDrawNode; // x0 float v44; // s8 __n128 v45; // q0 __n128 v46; // q1 __n128 v47; // q1 __n128 v48; // q0 cocos2d::CCDrawNode *v49; // x0 cocos2d::CCDrawNode *v50; // x22 __n128 v51; // q0 __n128 v52; // q1 __n128 v53; // q0 __n128 v54; // q1 cocos2d::CCDictionary *m_keyframeGroups; // x8 cocos2d::CCDictElement *m_pElements; // x26 cocos2d::CCPoint *v57; // x21 int v58; // w24 float32x2_t v59; // d11 cocos2d::CCDictElement *v60; // x8 unsigned __int32 v61; // w9 int8x8_t v62; // d1 cocos2d::CCArray *m_pObject; // x22 __int64 v64; // x0 GJEffectManager *m_effectManager; // x0 GroupCommandObject2 *v66; // x22 std::__vector_base::pointer end; // x8 std::__vector_base::pointer begin; // x9 unsigned __int64 v69; // x19 KeyframeObject *v70; // x20 double m_unk170; // d8 __int64 i; // x23 __int64 v73; // x25 float v74; // s8 cocos2d::CCPoint *v75; // x23 float v76; // s10 __n128 v77; // q0 __n128 v78; // q1 cocos2d::CCDrawNode *v79; // x0 float m_unk1b8; // s0 unsigned __int64 v81; // x19 __int64 v82; // x23 GLfloat *v83; // x2 int *p_m_activeGradients; // x23 __int64 m_traceInObject; // x0 unsigned int m_unk3b24; // w8 __int64 m_traceOutObject; // x0 unsigned int v88; // w8 int m_leftSectionIndex; // w9 int m_rightSectionIndex; // w8 __int64 v91; // x10 signed int v92; // w21 __int64 v93; // x24 __int64 v94; // x12 std::vector *, std::allocator *>> *v95; // x9 unsigned __int64 v96; // x9 int m_bottomSectionIndex; // w10 bool v98; // cc __int64 v99; // x27 __int64 v100; // x28 std::vector *v101; // x25 __int64 v102; // x8 unsigned __int64 v103; // x20 __int64 v104; // x19 unsigned __int16 *v105; // x22 int v106; // w9 int v107; // w10 bool v108; // zf bool v109; // zf __int64 v110; // x0 double v111; // d0 unsigned __int64 v112; // t2 __int64 v113; // x22 double *v114; // x1 __n128 v115; // q0 __n128 v116; // q1 __n128 v117; // q0 __n128 v118; // q1 __n128 v119; // q0 __n128 v120; // q1 cocos2d::CCDrawNode *v122; // x0 cocos2d::CCPoint *elems; // x1 GameObject *m_selectedObject; // x19 unsigned int v125; // w8 int height_low; // w1 unsigned int m_fTextureRight_low; // w24 cocos2d::CCArray *Group; // x0 cocos2d::CCArray *v130; // x20 int m_fBlVertexMod_low; // s13 int m_fBrVertexMod_low; // s14 int m_fTextureLeft_low; // s8 float v134; // s9 float v135; // s10 unsigned __int32 v136; // s11 float v137; // s0 cocos2d::ccArray *data; // x8 __int64 num; // x9 unsigned __int32 v140; // s12 int v141; // w25 float v142; // s13 float v143; // s14 float v144; // s8 cocos2d::CCObject **arr; // x8 unsigned __int64 v146; // x26 unsigned int v147; // w27 unsigned int v148; // w28 unsigned __int64 v149; // x20 __int64 v150; // x0 __n128 v151; // q1 __n128 v152; // q0 cocos2d::CCDrawNode *v153; // x23 __n128 v154; // q0 __n128 v155; // q1 cocos2d::CCDrawNode *v156; // x23 __n128 v157; // q0 __n128 v158; // q1 cocos2d::CCDrawNode *v159; // x23 __n128 v160; // q1 __n128 v161; // q0 cocos2d::CCDrawNode *v162; // x23 __n128 v163; // q1 __n128 v164; // q0 int v165; // w0 cocos2d::CCDrawNode *v166; // x0 __n128 v167; // q0 cocos2d::CCDrawNode *v168; // x23 __n128 v169; // q0 __n128 v170; // q1 cocos2d::CCDrawNode *v171; // x23 __n128 v172; // q0 __n128 v173; // q1 cocos2d::CCDrawNode *v174; // x23 __n128 v175; // q1 __n128 v176; // q0 cocos2d::CCDrawNode *v177; // x23 __n128 v178; // q1 __n128 v179; // q0 int v180; // w0 cocos2d::CCDrawNode *v181; // x0 __n128 v182; // q0 cocos2d::CCDrawNode *v183; // x23 __n128 v184; // q0 __n128 v185; // q1 cocos2d::CCDrawNode *v186; // x23 __n128 v187; // q0 __n128 v188; // q1 cocos2d::CCDrawNode *v189; // x23 __n128 v190; // q1 __n128 v191; // q0 cocos2d::CCDrawNode *v192; // x23 __n128 v193; // q1 __n128 v194; // q0 int v195; // w0 cocos2d::CCDrawNode *v196; // x0 LevelEditorLayer *v197; // x20 GameManager *v198; // x0 unsigned __int64 v199; // x8 __int64 v200; // x22 __int64 v201; // x23 __int64 v202; // x24 LevelEditorLayer *v203; // x8 cocos2d::CCDrawNode *v204; // x20 const cocos2d::CCPoint *v205; // x21 const cocos2d::CCPoint *v206; // x2 std::__vector_base>::pointer v207; // x8 std::__vector_base>::pointer v208; // x9 int v209; // w8 __int64 v210; // x22 __int64 v211; // x23 __int64 v212; // x24 _BOOL4 m_isDualMode; // w8 std::vector *v214; // x26 _BOOL4 v215; // w27 unsigned __int64 v216; // x8 __int64 v217; // x28 __int64 v218; // x25 __int64 v219; // x19 LevelEditorLayer *v220; // x9 cocos2d::CCDrawNode *v221; // x20 const cocos2d::CCPoint *v222; // x21 _BOOL4 v223; // w8 const cocos2d::CCPoint *v224; // x2 GameManager *v225; // x0 __int64 *v226; // x20 __int64 *j; // x19 __n128 v228; // q0 __n128 v229; // q1 cocos2d::CCDrawNode *v230; // x21 __n128 v231; // q0 __n128 v232; // q1 float v233; // [xsp+1Ch] [xbp-174h] __int64 v234; // [xsp+20h] [xbp-170h] float v235; // [xsp+3Ch] [xbp-154h] __int64 v236; // [xsp+40h] [xbp-150h] PlaybackMode m_playbackMode; // [xsp+40h] [xbp-150h] LevelEditorLayer *v238; // [xsp+58h] [xbp-138h] _BOOL4 GameVariable; // [xsp+60h] [xbp-130h] std::vector v240; // [xsp+70h] [xbp-120h] BYREF cocos2d::CCPoint v241; // [xsp+90h] [xbp-100h] BYREF __int64 v242; // [xsp+98h] [xbp-F8h] BYREF int v243; // [xsp+A0h] [xbp-F0h] float v244; // [xsp+A4h] [xbp-ECh] cocos2d::ccColor4F v245; // [xsp+A8h] [xbp-E8h] BYREF unsigned __int32 v246; // [xsp+B8h] [xbp-D8h] BYREF unsigned __int32 v247[2]; // [xsp+C0h] [xbp-D0h] BYREF __int64 v248; // [xsp+C8h] [xbp-C8h] BYREF __int64 v249; // [xsp+D0h] [xbp-C0h] BYREF cocos2d::CCPoint v250; // [xsp+D8h] [xbp-B8h] BYREF cocos2d::CCRect v251; // [xsp+E0h] [xbp-B0h] BYREF float v252; // [xsp+F0h] [xbp-A0h] float v253; // [xsp+F4h] [xbp-9Ch] cocos2d::CCSize WinSize; // 0:kr00_8.8 v1 = a1; GJBaseGameLayer::updateDebugDraw(a1); v2 = GameManager::sharedState(); byte_10086E368 = GameManager::getGameVariable(v2, "0181"); ftime((timeb *)&v240); *(double *)v4.i64 = (double)(LOWORD(v240.__end_) + 1000 * (unsigned __int64)((__int64)v240.__begin_ & 0xFFFFF)) / 1000.0; qword_10086E370 = v4.i64[0]; if ( (byte_10086E368 & 1) != 0 ) { v5 = 0.519999981; } else { *(double *)v3.i64 = *(double *)v4.i64 + trunc(*(double *)v4.i64 * 0.5) * -2.0; v6.f64[0] = NAN; v6.f64[1] = NAN; v7 = *(double *)vbslq_s8((int8x16_t)vnegq_f64(v6), v3, v4).i64 * -0.5; v5 = (float)(v7 + 1.0); } qword_10086E360 = *(_QWORD *)&v5; v8 = cocos2d::CCDirector::sharedDirector(); WinSize = cocos2d::CCDirector::getWinSize(v8); v9 = 0.25 / ((float (__fastcall *)(cocos2d::CCLayer *, float, float))v1->m_objectLayer->getScale)( v1->m_objectLayer, WinSize.width, WinSize.height); sub_100022B98(&v251, (__int64)&v1->m_debugDrawNode->m_rDrawArea); v10 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v10, "0121"); cocos2d::CCDrawNode::enableDrawArea(v1->m_debugDrawNode, &v251); if ( (unsigned int)sub_10024A36C((__int64)v1->m_cameraGuideTriggers) ) { v11 = v252; v12 = v253; if ( (unsigned int)sub_10024A36C((__int64)v1->m_cameraGuideTriggers) ) { v13 = 0; v14 = v11 + v11; v15 = v12 + v12; v16 = (float)(v11 + v11) * 0.5; v17 = v15 * 0.5; __asm { FMOV V0.2S, #1.0 } v234 = _D0; v235 = v9; v233 = v16; do { v22 = sub_10024A388((__int64)v1->m_cameraGuideTriggers, v13); v23 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 192LL))(v22) - v16; v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 192LL))(v22); sub_100022990((float *)&v240, v23, *(float *)(v24 + 4) - v17, v14, v15); if ( *(_DWORD *)(v22 + 1028) == 2016 && sub_100022CB0((float *)&v251.origin, (float *)&v240) && (!GameVariable || *(_BYTE *)(v22 + 1294) != 1 || *(_BYTE *)(v22 + 1133) == 1) ) { v25 = *(float *)(v22 + 1860); if ( v25 > 0.0 ) { v26 = (__int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 192LL))(v22); sub_1000229B8((__int64 *)&v250, v26); v27 = *(float *)(v22 + 1744); if ( v27 > 3.0 ) v27 = 3.0; v28 = fmaxf(v27, 0.4); v29 = 480.0 / v28; v30 = 320.0 / v28; v31 = v252 / v28; v32 = v253 / v28; v33.n128_f32[0] = sub_1000229B8(&v249, (__int64 *)(v22 + 1488)); if ( (float)(480.0 / v28) != v31 || v32 != v30 ) { v36 = (__int64 *)(*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)v22 + 192LL))(v22, v33); sub_1000229B8(&v248, v36); v38.n128_u32[0] = HIDWORD(v248); v39 = v32 * 0.5; if ( *((float *)&v248 + 1) < v39 ) { v38.n128_f32[0] = v39 + 0.0; *((float *)&v248 + 1) = v39 + 0.0; } v40 = v31 * 0.5; v37.n128_f32[0] = (float)(*(float *)&v248 - v40) + *(float *)&v249; v38.n128_f32[0] = (float)(v38.n128_f32[0] - v39) + *((float *)&v249 + 1); sub_100022980(v37, v38, v247); v41.n128_f32[0] = (float)(v40 + *(float *)&v248) + *(float *)&v249; v42.n128_f32[0] = (float)(v39 + *((float *)&v248 + 1)) + *((float *)&v249 + 1); sub_100022980(v41, v42, &v246); m_debugDrawNode = v1->m_debugDrawNode; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; v242 = 0x3F0000003F800000LL; v243 = 0; v244 = v25; cocos2d::CCDrawNode::drawRect( m_debugDrawNode, v247, &v246, (float32x2_t *)&v245, (float32x2_t *)&v242, 0, v235); v29 = 480.0 / v28; } v34.n128_u32[0] = LODWORD(v250.y); v44 = v30 * 0.5; if ( v250.y < (float)(v30 * 0.5) ) { v34.n128_f32[0] = v44 + 0.0; v250.y = v44 + 0.0; } v33.n128_f32[0] = (float)(v250.x - (float)(v29 * 0.5)) + *(float *)&v249; v34.n128_f32[0] = (float)(v34.n128_f32[0] - v44) + *((float *)&v249 + 1); sub_100022980(v33, v34, &v248); v45.n128_f32[0] = (float)((float)(v29 * 0.5) + v250.x) + *(float *)&v249; v46.n128_f32[0] = (float)(v44 + v250.y) + *((float *)&v249 + 1); sub_100022980(v45, v46, v247); v47.n128_u32[0] = LODWORD(v250.y); v48.n128_f32[0] = v250.x - (float)((float)v1->m_gameState.m_unkInt1 / v28); sub_100022980(v48, v47, &v246); v49 = v1->m_debugDrawNode; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; v242 = 0x3F80000000000000LL; v243 = 0; v244 = v25; v9 = v235; cocos2d::CCDrawNode::drawRect( v49, (unsigned __int32 *)&v248, v247, (float32x2_t *)&v245, (float32x2_t *)&v242, 0, v235); v50 = v1->m_debugDrawNode; v51.n128_u32[0] = v246; v52.n128_u32[0] = HIDWORD(v248); sub_100022980(v51, v52, &v242); v53.n128_u32[0] = v246; v54.n128_u32[0] = v247[1]; sub_100022980(v53, v54, &v241); *(_QWORD *)&v245.r = v234; v245.b = 0.0; v245.a = v25; cocos2d::CCDrawNode::drawSegment(v50, (const cocos2d::CCPoint *)&v242, &v241, v235, &v245); v17 = v15 * 0.5; v16 = v233; } } ++v13; } while ( v13 < (unsigned int)sub_10024A36C((__int64)v1->m_cameraGuideTriggers) ); } } m_keyframeGroups = v1->m_keyframeGroups; v238 = v1; if ( m_keyframeGroups ) { m_pElements = m_keyframeGroups->m_pElements; if ( m_pElements ) { v57 = nullptr; v58 = 0; v59 = (float32x2_t)vdup_n_s32(0x437F0000u); do { v60 = m_pElements; if ( v58 <= 4 ) ++v58; else v58 = 0; if ( (unsigned int)(v58 - 2) > 3 ) v61 = 3342130; else v61 = dword_100645660[v58 - 2]; m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next; v62.i32[0] = v61; v62.i32[1] = v61 >> 8; *(float32x2_t *)&v245.r = vdiv_f32(vcvt_f32_u32((uint32x2_t)vand_s8(v62, (int8x8_t)0xFF000000FFLL)), v59); v245.b = (float)HIWORD(v61) / 255.0; v245.a = 1.0; m_pObject = (cocos2d::CCArray *)v60->m_pObject; if ( m_pObject ) { if ( (unsigned int)sub_10024A36C((__int64)v60->m_pObject) >= 2 ) { v64 = sub_10024A388((__int64)m_pObject, 0); if ( !GameVariable || *(_BYTE *)(v64 + 1294) != 1 || *(_BYTE *)(v64 + 1133) == 1 ) { m_effectManager = v1->m_effectManager; memset(&v240, 0, sizeof(v240)); v66 = GJEffectManager::createKeyframeCommand( m_effectManager, 0, m_pObject, nullptr, 0, 0, 1, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, &v240); if ( v240.__begin_ ) { v240.__end_ = v240.__begin_; operator delete(v240.__begin_); } if ( v66 ) { begin = v66->m_keyframes.__begin_; end = v66->m_keyframes.__end_; if ( end != begin && (char *)end - (char *)begin != 448 ) { v69 = 0; do { v70 = &begin[v69]; m_unk170 = v70->m_unk170; if ( m_unk170 > 0.0 ) { if ( !v57 ) { v57 = (cocos2d::CCPoint *)operator new[](0x190u); for ( i = 0; i != 50; ++i ) sub_1000229B0(&v57[i]); } v73 = 0; v74 = m_unk170 / 50.0; v75 = v57; do { v76 = sub_100252658((__int64)&v70->m_spline1, (float)(v74 * (float)(unsigned int)v73)); v77.n128_f64[0] = sub_100252658( (__int64)&v70->m_spline2, (float)(v74 * (float)(unsigned int)v73)); v78.n128_f32[0] = v77.n128_f64[0]; v77.n128_f32[0] = v76; sub_100022980(v77, v78, &v242); sub_1000229DC((float32x2_t *)&v70->m_unk190, (float32x2_t *)&v242, (float32x2_t *)&v240); sub_1000229D0(v75, (double *)&v240); ++v73; ++v75; } while ( v73 != 50 ); v79 = v238->m_debugDrawNode; m_unk1b8 = v70->m_unk1b8; v240.__begin_ = (std::__vector_base::pointer)0x3F80000000000000LL; LODWORD(v240.__end_) = 1065353216; *((float *)&v240.__end_ + 1) = m_unk1b8; cocos2d::CCDrawNode::drawLines(v79, v57, 0x32u, v9, (const cocos2d::ccColor4F *)&v240); begin = v66->m_keyframes.__begin_; end = v66->m_keyframes.__end_; } ++v69; } while ( 0x6DB6DB6DB6DB6DB7LL * (((char *)end - (char *)begin) >> 6) - 1 > v69 ); if ( (char *)end - (char *)begin != 448 ) { v81 = 0; v82 = 888; do { v83 = (GLfloat *)((char *)begin + v82); if ( (*((_BYTE *)&begin[-1] + v82 - 410) & 1) == 0 ) { v245.a = *v83; cocos2d::CCDrawNode::drawSegment( v238->m_debugDrawNode, (const cocos2d::CCPoint *)v83 - 61, (const cocos2d::CCPoint *)v83 - 5, v9, &v245); begin = v66->m_keyframes.__begin_; end = v66->m_keyframes.__end_; } ++v81; v82 += 448; } while ( 0x6DB6DB6DB6DB6DB7LL * (((char *)end - (char *)begin) >> 6) - 1 > v81 ); } v1 = v238; } } } } } GJEffectManager::resetTempGroupCommands(v1->m_effectManager, 0); } while ( m_pElements ); if ( v57 ) operator delete(v57); } } p_m_activeGradients = &v1->m_activeGradients; cocos2d::CCDrawNode::disableDrawArea(v1->m_debugDrawNode); m_traceInObject = (__int64)v1->m_traceInObject; if ( m_traceInObject ) { m_unk3b24 = v1->m_unk3b24; if ( v1->m_unk3b28 < m_unk3b24 ) { v1->m_unk3b28 = m_unk3b24; sub_100365890(m_traceInObject, v1, (__int64)&v1->m_unk3b30, 1); } sub_100366FC4(v1, (__int64 *)&v1->m_unk3b30, 0, v1->m_debugDrawNode); } m_traceOutObject = (__int64)v1->m_traceOutObject; if ( m_traceOutObject ) { v88 = v1->m_unk3b24; if ( v1->m_unk3b2c < v88 ) { v1->m_unk3b2c = v88; sub_100365890(m_traceOutObject, v1, (__int64)&v1->m_unk3b48, 0); } sub_100366FC4(v1, (__int64 *)&v1->m_unk3b48, 0, v1->m_debugDrawNode); } if ( v1->m_drawTriggerBoxes ) { m_leftSectionIndex = v1->m_leftSectionIndex; m_rightSectionIndex = v1->m_rightSectionIndex; if ( m_leftSectionIndex <= m_rightSectionIndex ) { v91 = (char *)v1->m_sections.__end_ - (char *)v1->m_sections.__begin_; if ( m_leftSectionIndex < (int)((unsigned __int64)v91 >> 3) ) { v92 = 0; v93 = m_leftSectionIndex; v94 = (int)(v91 >> 3); v236 = v94; do { v95 = v1->m_sections.__begin_[v93]; if ( v95 ) v96 = (unsigned __int64)((char *)v95->__end_ - (char *)v95->__begin_) >> 3; else LODWORD(v96) = -1; m_bottomSectionIndex = v1->m_bottomSectionIndex; v98 = m_bottomSectionIndex <= v1->m_topSectionIndex && m_bottomSectionIndex < (int)v96; if ( v98 ) { v99 = m_bottomSectionIndex; v100 = (int)v96; do { v101 = v1->m_sections.__begin_[v93]->__begin_[v99]; if ( v101 ) { v102 = (unsigned int)v1->m_sectionSizes.__begin_[v93]->__begin_[v99]; if ( (int)v102 >= 1 ) { v103 = 0; v104 = 8 * v102; do { v105 = (unsigned __int16 *)v101->__begin_[v103 / 8]; if ( (*(unsigned int (__fastcall **)(unsigned __int16 *))(*(_QWORD *)v105 + 336LL))(v105) ) { v106 = v105[602]; if ( !v105[602] ) v106 = 0xFFFF; v107 = *((unsigned __int16 *)p_m_activeGradients + 829); v108 = v107 == 0xFFFF || v107 == v105[601]; v109 = v108 || v107 == v106; if ( v109 && (!GameVariable || *((_BYTE *)v105 + 1294) != 1 || *((_BYTE *)v105 + 1133) == 1) && (*((_DWORD *)v105 + 312) == 1 && (v105[736] & 1) != 0 || (*(unsigned int (__fastcall **)(unsigned __int16 *))(*(_QWORD *)v105 + 1784LL))(v105) == 30 && (v105[485] & 1) == 0) && (*(unsigned int (__fastcall **)(unsigned __int16 *))(*(_QWORD *)v105 + 1704LL))(v105) && (v105[673] & 1) == 0 ) { v110 = (*(__int64 (__fastcall **)(unsigned __int16 *))(*(_QWORD *)v105 + 1312LL))(v105); v111 = sub_100022B98(&v240, v110); HIDWORD(v112) = -1527099483 * (int)(*(float (__fastcall **)(unsigned __int16 *, double))(*(_QWORD *)v105 + 352LL))( v105, v111) + 47721858; LODWORD(v112) = HIDWORD(v112); if ( (unsigned int)(v112 >> 1) < 0x2D82D83 ) { sub_1000229B0(&v245); sub_1000229B0(&v242); sub_1000229B0(&v250); sub_1000229B0(&v249); v115.n128_f64[0] = sub_1000229D0(&v245, (double *)&v240); v115.n128_f32[0] = *(float *)&v240.__begin_ + *(float *)&v240.__end_; v116.n128_f32[0] = *((float *)&v240.__begin_ + 1) + *((float *)&v240.__end_ + 1); sub_100022980(v115, v116, &v248); v117.n128_f64[0] = sub_1000229D0(&v250, (double *)&v248); v117.n128_u32[0] = LODWORD(v245.r); v118.n128_u32[0] = LODWORD(v250.y); sub_100022980(v117, v118, &v248); v119.n128_f64[0] = sub_1000229D0(&v242, (double *)&v248); v119.n128_u32[0] = LODWORD(v250.x); v120.n128_u32[0] = LODWORD(v245.g); sub_100022980(v119, v120, &v248); v114 = (double *)&v248; } else { GameObject::calculateOrientedBox((GameObject *)v105); sub_1000229B0(&v245); sub_1000229B0(&v242); sub_1000229B0(&v250); sub_1000229B0(&v249); v113 = (*(__int64 (__fastcall **)(unsigned __int16 *))(*(_QWORD *)v105 + 1544LL))(v105); sub_1000229D0(&v245, (double *)(v113 + 316)); sub_1000229D0(&v242, (double *)(v113 + 324)); sub_1000229D0(&v250, (double *)(v113 + 332)); v114 = (double *)(v113 + 340); } sub_1000229D0(&v249, v114); if ( v92 > 391 ) break; sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92], (double *)&v245.r); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 1], (double *)&v242); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 2], (double *)&v242); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 3], (double *)&v250); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 4], (double *)&v250); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 5], (double *)&v249); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 6], (double *)&v249); sub_1000229D0(&v238->m_debugDrawPoints->__elems_[v92 + 7], (double *)&v245.r); v92 += 8; } } v103 += 8LL; } while ( v104 != v103 ); } } v1 = v238; v98 = v99++ < v238->m_topSectionIndex; } while ( v98 && v99 < v100 ); m_rightSectionIndex = v238->m_rightSectionIndex; v94 = v236; } if ( v93 >= m_rightSectionIndex ) break; ++v93; } while ( v93 < v94 ); if ( v92 > 0 ) { v122 = v1->m_debugDrawNode; elems = v1->m_debugDrawPoints->__elems_; *(_OWORD *)&v240.__begin_ = xmmword_100635DC0; cocos2d::CCDrawNode::drawLines(v122, elems, v92, v9, (const cocos2d::ccColor4F *)&v240); } } } } cocos2d::CCDrawNode::enableDrawArea(v1->m_debugDrawNode, &v251); m_selectedObject = v1->m_editorUI->m_selectedObject; if ( m_selectedObject ) { v125 = m_selectedObject->m_objectID - 3602; if ( v125 <= 3 && v125 != 2 ) { height_low = LODWORD(m_selectedObject[1].m_obContentSize.height); if ( height_low >= 1 ) { m_fTextureRight_low = LODWORD(m_selectedObject[1].m_fTextureRight); Group = GJBaseGameLayer::getGroup(v238, height_low); if ( Group ) { v130 = Group; if ( (unsigned int)sub_10024A36C((__int64)Group) ) { m_fBlVertexMod_low = LODWORD(m_selectedObject[1].m_fBlVertexMod); m_fBrVertexMod_low = LODWORD(m_selectedObject[1].m_fBrVertexMod); m_fTextureLeft_low = LODWORD(m_selectedObject[1].m_fTextureLeft); v134 = sub_100022C40((__int64)&v251); v135 = sub_100022C58((__int64)&v251); v136 = sub_100022C30((float *)&v251.origin); v137 = sub_100022C48((__int64)&v251); data = v130->data; num = data->num; if ( (_DWORD)num ) { v140 = LODWORD(v137); v141 = 0; v142 = (float)m_fBlVertexMod_low * 3.0; v143 = v142 + (float)((float)m_fBrVertexMod_low * 3.0); v144 = v143 + (float)((float)m_fTextureLeft_low * 3.0); arr = data->arr; v146 = (unsigned __int64)&arr[num - 1]; v147 = m_fTextureRight_low & 0xFFFFFFFD; v148 = m_fTextureRight_low & 0xFFFFFFFE; v149 = (unsigned __int64)(arr + 1); while ( 1 ) { v150 = *(_QWORD *)(v149 - 8); if ( !v150 ) break; (*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)v150 + 1344LL))(&v242); if ( v142 > 0.0 ) { v152 = (__n128)xmmword_1006356D0; *(_OWORD *)&v240.__begin_ = xmmword_1006356D0; if ( !m_fTextureRight_low ) { v166 = v238->m_debugDrawNode; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; v165 = cocos2d::CCDrawNode::drawCircle( v166, (const cocos2d::CCPoint *)&v242, v142, &v245, v9, (const cocos2d::ccColor4F *)&v240, (unsigned int)v142); goto LABEL_144; } if ( m_fTextureRight_low <= 2 ) { v153 = v238->m_debugDrawNode; v152.n128_f32[0] = *(float *)&v242 - v142; v151.n128_f32[0] = v135; sub_100022980(v152, v151, &v245); v154.n128_f32[0] = *(float *)&v242 - v142; v155.n128_u32[0] = v140; sub_100022980(v154, v155, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v153, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 == 1 ) { v156 = v238->m_debugDrawNode; v152.n128_f32[0] = v142 + *(float *)&v242; v151.n128_f32[0] = v135; sub_100022980(v152, v151, &v245); v157.n128_f32[0] = v142 + *(float *)&v242; v158.n128_u32[0] = v140; sub_100022980(v157, v158, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v156, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v148 == 4 ) { v159 = v238->m_debugDrawNode; v151.n128_f32[0] = *((float *)&v242 + 1) - v142; v152.n128_f32[0] = v134; sub_100022980(v152, v151, &v245); v160.n128_f32[0] = *((float *)&v242 + 1) - v142; v161.n128_u32[0] = v136; sub_100022980(v161, v160, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v159, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 == 4 ) { v162 = v238->m_debugDrawNode; v151.n128_f32[0] = v142 + *((float *)&v242 + 1); v152.n128_f32[0] = v134; sub_100022980(v152, v151, &v245); v163.n128_f32[0] = v142 + *((float *)&v242 + 1); v164.n128_u32[0] = v136; sub_100022980(v164, v163, &v250); v165 = cocos2d::CCDrawNode::drawSegment( v162, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); LABEL_144: v141 += v165; } } if ( v143 == v142 ) goto LABEL_157; v167 = (__n128)xmmword_100635E00; *(_OWORD *)&v240.__begin_ = xmmword_100635E00; if ( !m_fTextureRight_low ) { v181 = v238->m_debugDrawNode; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; v180 = cocos2d::CCDrawNode::drawCircle( v181, (const cocos2d::CCPoint *)&v242, v143, &v245, v9, (const cocos2d::ccColor4F *)&v240, (unsigned int)v143); goto LABEL_156; } if ( m_fTextureRight_low <= 2 ) { v168 = v238->m_debugDrawNode; v167.n128_f32[0] = *(float *)&v242 - v143; v151.n128_f32[0] = v135; sub_100022980(v167, v151, &v245); v169.n128_f32[0] = *(float *)&v242 - v143; v170.n128_u32[0] = v140; sub_100022980(v169, v170, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v168, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 == 1 ) { v171 = v238->m_debugDrawNode; v167.n128_f32[0] = v143 + *(float *)&v242; v151.n128_f32[0] = v135; sub_100022980(v167, v151, &v245); v172.n128_f32[0] = v143 + *(float *)&v242; v173.n128_u32[0] = v140; sub_100022980(v172, v173, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v171, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v148 == 4 ) { v174 = v238->m_debugDrawNode; v151.n128_f32[0] = *((float *)&v242 + 1) - v143; v167.n128_f32[0] = v134; sub_100022980(v167, v151, &v245); v175.n128_f32[0] = *((float *)&v242 + 1) - v143; v176.n128_u32[0] = v136; sub_100022980(v176, v175, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v174, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 == 4 ) { v177 = v238->m_debugDrawNode; v151.n128_f32[0] = v143 + *((float *)&v242 + 1); v167.n128_f32[0] = v134; sub_100022980(v167, v151, &v245); v178.n128_f32[0] = v143 + *((float *)&v242 + 1); v179.n128_u32[0] = v136; sub_100022980(v179, v178, &v250); v180 = cocos2d::CCDrawNode::drawSegment( v177, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); LABEL_156: v141 += v180; } LABEL_157: if ( v144 != v143 ) { v182 = (__n128)xmmword_100635DB0; *(_OWORD *)&v240.__begin_ = xmmword_100635DB0; if ( m_fTextureRight_low ) { if ( m_fTextureRight_low <= 2 ) { v183 = v238->m_debugDrawNode; v182.n128_f32[0] = *(float *)&v242 - v144; v151.n128_f32[0] = v135; sub_100022980(v182, v151, &v245); v184.n128_f32[0] = *(float *)&v242 - v144; v185.n128_u32[0] = v140; sub_100022980(v184, v185, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v183, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 == 1 ) { v186 = v238->m_debugDrawNode; v182.n128_f32[0] = v144 + *(float *)&v242; v151.n128_f32[0] = v135; sub_100022980(v182, v151, &v245); v187.n128_f32[0] = v144 + *(float *)&v242; v188.n128_u32[0] = v140; sub_100022980(v187, v188, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v186, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v148 == 4 ) { v189 = v238->m_debugDrawNode; v151.n128_f32[0] = *((float *)&v242 + 1) - v144; v182.n128_f32[0] = v134; sub_100022980(v182, v151, &v245); v190.n128_f32[0] = *((float *)&v242 + 1) - v144; v191.n128_u32[0] = v136; sub_100022980(v191, v190, &v250); v141 += cocos2d::CCDrawNode::drawSegment( v189, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } if ( v147 != 4 ) goto LABEL_169; v192 = v238->m_debugDrawNode; v151.n128_f32[0] = v144 + *((float *)&v242 + 1); v182.n128_f32[0] = v134; sub_100022980(v182, v151, &v245); v193.n128_f32[0] = v144 + *((float *)&v242 + 1); v194.n128_u32[0] = v136; sub_100022980(v194, v193, &v250); v195 = cocos2d::CCDrawNode::drawSegment( v192, (const cocos2d::CCPoint *)&v245, &v250, v9, (const cocos2d::ccColor4F *)&v240); } else { v196 = v238->m_debugDrawNode; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; v195 = cocos2d::CCDrawNode::drawCircle( v196, (const cocos2d::CCPoint *)&v242, v144, &v245, v9, (const cocos2d::ccColor4F *)&v240, (unsigned int)v144); } v141 += v195; } LABEL_169: if ( v141 <= 100 ) { v98 = v149 > v146; v149 += 8LL; if ( !v98 ) continue; } break; } } } } } } } v197 = v238; cocos2d::CCDrawNode::disableDrawArea(v238->m_debugDrawNode); if ( v197->m_playerPoints.__begin_ != v197->m_playerPoints.__end_ ) { v198 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v198, "0152") ) { m_playbackMode = v238->m_playbackMode; v199 = (unsigned __int64)((char *)v238->m_playerPoints.__end_ - (char *)v238->m_playerPoints.__begin_) >> 3; if ( (int)v199 >= 2 ) { v200 = 0; v201 = (unsigned int)(v199 - 1); v202 = (unsigned int)(v199 - 2); do { if ( sub_100022C60((float *)&v251.origin, (float *)&v197->m_playerPoints.__begin_[v200]) || sub_100022C60((float *)&v251.origin, (float *)&v197->m_playerPoints.__begin_[v200 + 1]) ) { v203 = v197; v204 = v197->m_debugDrawNode; v205 = &v203->m_playerPoints.__begin_[v200]; if ( v202 || m_playbackMode != Playing ) v206 = v205 + 1; else v206 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(PlayerObject *))v238->m_player1->getPosition)(v238->m_player1); *(_OWORD *)&v240.__begin_ = xmmword_1006455F0; cocos2d::CCDrawNode::drawSegment(v204, v205, v206, 0.5, (const cocos2d::ccColor4F *)&v240); v197 = v238; } --v202; ++v200; --v201; } while ( v201 ); } v207 = v197->m_player2Points.__begin_; v208 = v197->m_player2Points.__end_; if ( v207 != v208 ) { v209 = -1431655765 * (((char *)v208 - (char *)v207) >> 3); if ( v209 >= 1 ) { v210 = 0; v211 = (unsigned int)(v209 - 1); v212 = v209 & 0x7FFFFFFF; do { m_isDualMode = v197->m_gameState.m_isDualMode; if ( v210 != v211 ) m_isDualMode = 0; v214 = &v197->m_player2Points.__begin_[v210]; v215 = m_playbackMode == Playing && m_isDualMode; v216 = (unsigned __int64)((char *)v214->__end_ - (char *)v214->__begin_) >> 3; if ( (int)v216 >= 2 ) { v217 = 0; v218 = (unsigned int)(v216 - 1); v219 = (unsigned int)(v216 - 2); do { if ( sub_100022C60((float *)&v251.origin, (float *)&v214->__begin_[v217]) || sub_100022C60((float *)&v251.origin, (float *)&v214->__begin_[v217 + 1]) ) { v220 = v197; v221 = v197->m_debugDrawNode; v222 = &v214->__begin_[v217]; if ( v219 ) v223 = 0; else v223 = v215; if ( v223 ) v224 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(PlayerObject *))v220->m_player2->getPosition)(v220->m_player2); else v224 = v222 + 1; *(_OWORD *)&v240.__begin_ = xmmword_100645600; cocos2d::CCDrawNode::drawSegment(v221, v222, v224, 0.5, (const cocos2d::ccColor4F *)&v240); v197 = v238; } ++v217; --v219; --v218; } while ( v218 ); } ++v210; } while ( v210 != v212 ); } } } } if ( v197->m_touchPoints.__begin_ != v197->m_touchPoints.__end_ ) { v225 = GameManager::sharedState(); if ( GameManager::getGameVariable(v225, "0149") ) { v226 = (__int64 *)v238->m_touchPoints.__begin_; for ( j = (__int64 *)v238->m_touchPoints.__end_; v226 != j; ++v226 ) { sub_1000229B8(&v242, v226); if ( sub_100022C60((float *)&v251.origin, (float *)&v242) ) { v230 = v238->m_debugDrawNode; v228.n128_f32[0] = *(float *)&v242 + -2.0; v229.n128_f32[0] = *((float *)&v242 + 1) + -2.0; sub_100022980(v228, v229, &v250); v231.n128_f32[0] = *(float *)&v242 + 2.0; v232.n128_f32[0] = *((float *)&v242 + 1) + 2.0; sub_100022980(v231, v232, &v249); *(_OWORD *)&v240.__begin_ = xmmword_100645610; *(_QWORD *)&v245.r = 0; *(_QWORD *)&v245.b = 0; cocos2d::CCDrawNode::drawRect( v230, (unsigned __int32 *)&v250, (unsigned __int32 *)&v249, (float32x2_t *)&v240, (float32x2_t *)&v245, 0, 0.0); } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source