// // GJRotateCommandLayer::textChanged from 0x1000049c0 to 0x100004f12 (1362 bytes) // // 2 xrefs: // > sub_100004F40 @ 0x100004f4c // > @ 0x1008af298 // // 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 GJRotateCommandLayer::textChanged(GJRotateCommandLayer *a1, CCTextInputNode *a2) { __m128 v2; // xmm1 char *v4; // rdi int v5; // r14d int v6; // r14d int *p_m_times360; // r15 EffectGameObject *v8; // rax char *v9; // r15 int v10; // eax int v11; // esi EffectGameObject *v12; // rdi char *v13; // r15 int v14; // eax int v15; // esi EffectGameObject *v16; // rdi char *v17; // r14 cocos2d::CCString *v18; // rax float v19; // xmm0_4 EffectGameObject *v20; // rax float v21; // xmm0_4 EffectGameObject *m_gameObject; // rax char *v23; // r14 unsigned int v24; // r14d __m128 v25; // xmm0 float v26; // xmm0_4 float v27; // xmm3_4 Slider *m_degreesSlider; // rdi unsigned int v29; // r14d EffectGameObject *v30; // rax unsigned int v31; // r14d EffectGameObject *v32; // rax unsigned int v33; // r14d __m128 m_moveTime_low; // xmm1 __m128 v35; // xmm0 unsigned int v36; // r14d __m128 m_degrees_low; // xmm1 __m128 v38; // xmm0 char v39; // [rsp+0h] [rbp-40h] char v40; // [rsp+10h] [rbp-30h] BYREF char v41[15]; // [rsp+11h] [rbp-2Fh] BYREF char *v42; // [rsp+20h] [rbp-20h] if ( !a1->m_disableTextChanged ) { switch ( ((unsigned int (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) ) { case 0u: CCTextInputNode::getString(&v40); if ( (v40 & 1) != 0 ) v4 = v42; else v4 = v41; v21 = atof(v4); a1->m_degrees = sub_1001FA0D0(v21); if ( (v40 & 1) != 0 ) operator delete(v42); m_gameObject = a1->m_gameObject; if ( m_gameObject ) { m_gameObject->m_rotationDegrees = a1->m_degrees; } else if ( (unsigned int)sub_100720070(a1->m_gameObjects) ) { v36 = 0; do *(float *)(sub_1007200C0(a1->m_gameObjects, v36++) + 1544) = a1->m_degrees; while ( v36 < (unsigned int)sub_100720070(a1->m_gameObjects) ); } m_degrees_low = (__m128)LODWORD(a1->m_degrees); m_degrees_low.f32[0] = (float)(m_degrees_low.f32[0] / 720.0) + 0.5; v38 = _mm_cmpge_ss(m_degrees_low, (__m128)0x3F800000u); LODWORD(v26) = v38.i32[0] & 0x3F800000 | _mm_andnot_ps(v38, _mm_and_ps(_mm_cmplt_ss((__m128)0LL, m_degrees_low), (__m128)0x3F800000u)).u32[0]; v27 = m_degrees_low.f32[0]; if ( m_degrees_low.f32[0] <= 0.0 ) v27 = v26; m_degreesSlider = a1->m_degreesSlider; if ( m_degrees_low.f32[0] < 1.0 ) goto LABEL_58; goto LABEL_59; case 1u: CCTextInputNode::getString(&v40); if ( (v40 & 1) != 0 ) { v23 = v42; p_m_times360 = &a1->m_times360; a1->m_times360 = atoi(v42); operator delete(v23); v8 = a1->m_gameObject; if ( v8 ) goto LABEL_13; } else { p_m_times360 = &a1->m_times360; a1->m_times360 = atoi(v41); v8 = a1->m_gameObject; if ( v8 ) { LABEL_13: v8->m_times360 = *p_m_times360; goto LABEL_40; } } if ( (unsigned int)sub_100720070(a1->m_gameObjects) ) { v24 = 0; do *(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v24++) + 1548) = a1->m_times360; while ( v24 < (unsigned int)sub_100720070(a1->m_gameObjects) ); } LABEL_40: v2.f32[0] = (float)((float)a1->m_times360 / 20.0) + 0.5; v25 = _mm_cmpge_ss(v2, (__m128)0x3F800000u); LODWORD(v26) = v25.i32[0] & 0x3F800000 | _mm_andnot_ps(v25, _mm_and_ps(_mm_cmplt_ss((__m128)0LL, v2), (__m128)0x3F800000u)).u32[0]; v27 = v2.f32[0]; if ( v2.f32[0] <= 0.0 ) v27 = v26; m_degreesSlider = a1->m_timesSlider; if ( v2.f32[0] < 1.0 ) LABEL_58: v26 = v27; LABEL_59: Slider::setValue(m_degreesSlider, v26); break; case 2u: CCTextInputNode::getString(&v40); if ( (v40 & 1) != 0 ) { v13 = v42; v6 = atoi(v42); operator delete(v13); } else { v6 = atoi(v41); } v14 = 1; if ( v6 >= 2 ) v14 = v6; v15 = 9999; if ( v14 < 9999 ) v15 = v14; a1->m_targetGroupID = v15; v16 = a1->m_gameObject; if ( v16 ) { EffectGameObject::setTargetID(v16, v15); } else if ( (unsigned int)sub_100720070(a1->m_gameObjects) ) { v31 = 0; do { v32 = (EffectGameObject *)sub_1007200C0(a1->m_gameObjects, v31); EffectGameObject::setTargetID(v32, a1->m_targetGroupID); ++v31; } while ( v31 < (unsigned int)sub_100720070(a1->m_gameObjects) ); } SetupTriggerPopup::updateEditorLabel(a1); return; case 3u: CCTextInputNode::getString(&v40); if ( (v40 & 1) != 0 ) { v17 = v42; atof(v42); operator delete(v17); } else { atof(v41); } v18 = (cocos2d::CCString *)sub_1007AB580("%.02f", v39); v19 = cocos2d::CCString::floatValue(v18); a1->m_moveTime = v19; v20 = a1->m_gameObject; if ( v20 ) { v20->m_duration = v19; } else if ( (unsigned int)sub_100720070(a1->m_gameObjects) ) { v33 = 0; do *(float *)(sub_1007200C0(a1->m_gameObjects, v33++) + 1452) = a1->m_moveTime; while ( v33 < (unsigned int)sub_100720070(a1->m_gameObjects) ); } m_moveTime_low = (__m128)LODWORD(a1->m_moveTime); m_moveTime_low.f32[0] = m_moveTime_low.f32[0] / 10.0; v35 = _mm_cmpge_ss(m_moveTime_low, (__m128)0x3F800000u); LODWORD(v26) = v35.i32[0] & 0x3F800000 | _mm_andnot_ps(v35, _mm_and_ps(_mm_cmplt_ss((__m128)0LL, m_moveTime_low), (__m128)0x3F800000u)).u32[0]; v27 = m_moveTime_low.f32[0]; if ( m_moveTime_low.f32[0] <= 0.0 ) v27 = v26; m_degreesSlider = a1->m_moveTimeSlider; if ( m_moveTime_low.f32[0] < 1.0 ) goto LABEL_58; goto LABEL_59; case 4u: CCTextInputNode::getString(&v40); if ( (v40 & 1) != 0 ) { v9 = v42; v5 = atoi(v42); operator delete(v9); } else { v5 = atoi(v41); } v10 = 0; if ( v5 > 0 ) v10 = v5; v11 = 9999; if ( v10 < 9999 ) v11 = v10; a1->m_centerGroupID = v11; v12 = a1->m_gameObject; if ( v12 ) { EffectGameObject::setTargetID2(v12, v11); } else if ( (unsigned int)sub_100720070(a1->m_gameObjects) ) { v29 = 0; do { v30 = (EffectGameObject *)sub_1007200C0(a1->m_gameObjects, v29); EffectGameObject::setTargetID2(v30, a1->m_centerGroupID); ++v29; } while ( v29 < (unsigned int)sub_100720070(a1->m_gameObjects) ); } return; default: return; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source