// // CCSpriteWithHue::updateColorMatrix from 0x1400489a0 to 0x140048c89 (745 bytes) // // 6 xrefs: // > CCSpriteWithHue::updateColor @ 0x140048997 // > GJShopLayer::init @ 0x1402aa3a7 // > GJShopLayer::init @ 0x1402aa7ad // > RewardUnlockLayer::init @ 0x1403ce2d9 // > SecretLayer5::updateTweenActionInt @ 0x1403f5788 // > @ 0x1406c4bd8 // // 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 CCSpriteWithHue::updateColorMatrix(CCSpriteWithHue *a1) { std::array, 3> *p_m_colorMatrix; // rsi float m_hue; // xmm12_4 float v4; // xmm9_4 float *v5; // rbx float v6; // xmm8_4 float v7; // xmm3_4 float v8; // xmm9_4 float v9; // xmm7_4 float v10; // xmm6_4 float v11; // xmm0_4 __int64 v12; // rax float v13; // xmm2_4 float v14; // xmm1_4 float v15; // xmm0_4 float v16; // [rsp+28h] [rbp-49h] BYREF float v17; // [rsp+2Ch] [rbp-45h] float v18; // [rsp+30h] [rbp-41h] float v19; // [rsp+34h] [rbp-3Dh] __int64 v20; // [rsp+38h] [rbp-39h] float v21; // [rsp+40h] [rbp-31h] float v22; // [rsp+44h] [rbp-2Dh] float v23; // [rsp+48h] [rbp-29h] p_m_colorMatrix = &a1->m_colorMatrix; m_hue = a1->m_hue; if ( 2.0 < 0.0 ) v4 = sqrtf(2.0); else v4 = fsqrt(2.0); v5 = &a1->m_colorMatrix._Elems[0]._Elems[2]; p_m_colorMatrix->_Elems[0]._Elems[0] = 1.0; a1->m_colorMatrix._Elems[0]._Elems[1] = 0.0; a1->m_colorMatrix._Elems[0]._Elems[2] = 0.0; a1->m_colorMatrix._Elems[1]._Elems[0] = 0.0; a1->m_colorMatrix._Elems[2]._Elems[0] = 0.0; v6 = 1.0 / v4; a1->m_colorMatrix._Elems[1]._Elems[1] = v6; a1->m_colorMatrix._Elems[1]._Elems[2] = v6; a1->m_colorMatrix._Elems[2]._Elems[1] = -v6; a1->m_colorMatrix._Elems[2]._Elems[2] = v6; if ( 0.0 > 3.0 ) v7 = sqrtf(3.0); else v7 = fsqrt(3.0); v17 = 0.0; v19 = 0.0; v20 = 1065353216; v22 = 0.0; v8 = v4 / v7; v16 = v8; v23 = v8; v21 = -1.0 / v7; v9 = -v21; v18 = -v21; sub_140048E80(&v16, p_m_colorMatrix, p_m_colorMatrix); v10 = sinf(m_hue); v11 = cosf(m_hue); v17 = v10; v16 = v11; v19 = -v10; *(float *)&v20 = v11; v18 = 0.0; v21 = 0.0; v23 = 1.0; sub_140048E80(&v16, p_m_colorMatrix, p_m_colorMatrix); v16 = v8; v21 = v9; v18 = -v9; v23 = v8; v17 = 0.0; v19 = 0.0; LODWORD(v20) = 1065353216; sub_140048E80(&v16, p_m_colorMatrix, p_m_colorMatrix); *((float *)&v20 + 1) = -v6; *(float *)&v20 = v6; v22 = -(float)-v6; v23 = v6; v16 = 1.0; v18 = 0.0; v21 = 0.0; sub_140048E80(&v16, p_m_colorMatrix, p_m_colorMatrix); v12 = 3; v13 = (float)a1->_displayedOpacity / 255.0; do { v5 += 3; v14 = v13 * *(v5 - 4); *(v5 - 5) = v13 * *(v5 - 5); v15 = v13 * *(v5 - 3); *(v5 - 4) = v14; *(v5 - 3) = v15; --v12; } while ( v12 ); }