// // ColorSelectPopup::textChanged from 0x10072ae40 to 0x10072b298 (1112 bytes) // // 2 xrefs: // > sub_10072B3C0 @ 0x10072b3cc // > @ 0x10098adf8 // // 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 ColorSelectPopup::textChanged(ColorSelectPopup *a1, CCTextInputNode *a2) { double v2; // xmm0_8 int v4; // r15d char *v5; // r12 int v6; // eax GLubyte v7; // r15 int v8; // eax int m_copyColorID; // eax int m_colorID; // eax __int16 v11; // ax char *v12; // r14 int v13; // ecx int v14; // eax size_t v15; // r15 int v16; // eax char *v17; // r14 int v18; // ecx int v19; // eax int v20; // eax EffectGameObject *m_gameObject; // rcx char *v22; // r14 cocos2d::CCString *v23; // rax float v24; // xmm0_4 EffectGameObject *v25; // rax __m128 m_fadeTime_low; // xmm1 __m128 v27; // xmm0 float v28; // xmm0_4 float v29; // xmm3_4 cocos2d::CCArray *m_gameObjects; // rdi unsigned int v31; // r14d cocos2d::CCArray *v32; // rdi unsigned int v33; // r14d char v34; // [rsp+0h] [rbp-60h] void *v35[4]; // [rsp+8h] [rbp-58h] BYREF char __s[16]; // [rsp+28h] [rbp-38h] BYREF char *v37; // [rsp+38h] [rbp-28h] if ( !a1->m_disableTextDelegate ) { switch ( ((unsigned int (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) ) { case 3u: CCTextInputNode::getString(__s, (__int64)a2, v2); if ( (__s[0] & 1) != 0 ) { v17 = v37; a1->m_colorID = atoi(v37); operator delete(v17); m_colorID = a1->m_colorID; } else { m_colorID = atoi(&__s[1]); a1->m_colorID = m_colorID; } v18 = 0; if ( m_colorID > 0 ) v18 = m_colorID; v19 = 999; if ( v18 < 999 ) v19 = v18; v20 = (v19 == 0) + v19; a1->m_colorID = v20; m_gameObject = a1->m_gameObject; if ( m_gameObject ) { m_gameObject->m_targetColor = v20; } else { m_gameObjects = a1->m_gameObjects; if ( m_gameObjects && (unsigned int)sub_100720070((__int64)m_gameObjects) ) { v31 = 0; do *(_DWORD *)(sub_1007200C0((__int64)a1->m_gameObjects, v31++) + 1024) = a1->m_colorID; while ( v31 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) ); } } SetupTriggerPopup::updateEditorLabel(a1); return; case 4u: CCTextInputNode::getString(__s, (__int64)a2, v2); if ( (__s[0] & 1) != 0 ) { v12 = v37; a1->m_copyColorID = atoi(v37); operator delete(v12); m_copyColorID = a1->m_copyColorID; } else { m_copyColorID = atoi(&__s[1]); a1->m_copyColorID = m_copyColorID; } v13 = 0; if ( m_copyColorID > 0 ) v13 = m_copyColorID; v14 = 999; if ( v13 < 999 ) v14 = v13; a1->m_copyColorID = v14; ColorSelectPopup::updateCopyColor(a1); return; case 5u: CCTextInputNode::getString(__s, (__int64)a2, v2); if ( (__s[0] & 1) != 0 ) { v22 = v37; v35[3] = COERCE_VOID_(atof(v37)); operator delete(v22); } else { atof(&__s[1]); } v23 = (cocos2d::CCString *)sub_1007AB580("%.02f", v34); v24 = cocos2d::CCString::floatValue(v23); a1->m_fadeTime = v24; v25 = a1->m_gameObject; if ( v25 ) { v25->m_duration = v24; } else { v32 = a1->m_gameObjects; if ( v32 && (unsigned int)sub_100720070((__int64)v32) ) { v33 = 0; do *(float *)(sub_1007200C0((__int64)a1->m_gameObjects, v33++) + 1452) = a1->m_fadeTime; while ( v33 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) ); } } m_fadeTime_low = (__m128)LODWORD(a1->m_fadeTime); m_fadeTime_low.f32[0] = m_fadeTime_low.f32[0] / 10.0; v27 = _mm_cmpge_ss(m_fadeTime_low, (__m128)0x3F800000u); LODWORD(v28) = v27.i32[0] & 0x3F800000 | _mm_andnot_ps(v27, _mm_and_ps(_mm_cmplt_ss((__m128)0LL, m_fadeTime_low), (__m128)0x3F800000u)).u32[0]; v29 = m_fadeTime_low.f32[0]; if ( m_fadeTime_low.f32[0] <= 0.0 ) v29 = v28; if ( m_fadeTime_low.f32[0] < 1.0 ) v28 = v29; Slider::setValue(a1->m_fadeTimeSlider, v28); return; case 8u: case 9u: case 0xAu: CCTextInputNode::getString(__s, (__int64)a2, v2); if ( (__s[0] & 1) != 0 ) { v5 = v37; v4 = atoi(v37); operator delete(v5); } else { v4 = atoi(&__s[1]); } v6 = 0; if ( v4 > 0 ) v6 = v4; v7 = -1; if ( v6 < 255 ) v7 = v6; v8 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2); switch ( v8 ) { case 10: a1->m_currentColor.b = v7; break; case 9: a1->m_currentColor.g = v7; break; case 8: a1->m_currentColor.r = v7; break; } v11 = *(_WORD *)&a1->m_currentColor.r; __s[2] = a1->m_currentColor.b; *(_WORD *)__s = v11; goto LABEL_26; case 0xBu: CCTextInputNode::getString(__s, (__int64)a1->m_hexInput, v2); if ( (__s[0] & 1) != 0 ) { v15 = strlen(v37); operator delete(v37); if ( v15 != 6 ) return; } else if ( strlen(&__s[1]) != 6 ) { return; } CCTextInputNode::getString(v35, (__int64)a1->m_hexInput, v2); v16 = ColorSelectPopup::hexToColor((unsigned __int8 *)v35); a1->m_currentColor = (cocos2d::ccColor3B)v16; if ( ((__int64)v35[0] & 1) != 0 ) { operator delete(v35[2]); v16 = *(unsigned __int16 *)&a1->m_currentColor.r | (a1->m_currentColor.b << 16); } *(_WORD *)__s = v16; __s[2] = BYTE2(v16); LABEL_26: ((void (__fastcall *)(cocos2d::extension::CCControlColourPicker *, char *))a1->m_colorPicker->setColorValue)( a1->m_colorPicker, __s); break; default: return; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source