// // cocos2d::CCMenu::itemForTouch from 0xd63c10 to 0xd63e30 (544 bytes) // // 3 xrefs: // > cocos2d::CCMenu::itemForTouch @ 0xd63e58 // > cocos2d::CCMenu::itemForTouch @ 0xd63e80 // > @ 0x4c900 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:07:52 +0000 // float *__fastcall cocos2d::CCMenu::itemForTouch(cocos2d::CCMenu *this, cocos2d::CCTouch *a2, unsigned __int8 a3) { int v4; // w28 cocos2d::CCArray *v5; // x0 __int64 v6; // x0 unsigned int *v7; // x1 const void **v8; // x20 __int64 v9; // x0 char *v10; // x22 const void *v11; // x0 float *v12; // x0 float *v13; // x19 float v15; // s0 double v16; // d6 double v17; // d2 double v18; // d1 float v19; // s0 __int64 v20; // [xsp+98h] [xbp+98h] BYREF __int64 v21; // [xsp+A0h] [xbp+A0h] BYREF float v22; // [xsp+A8h] [xbp+A8h] BYREF float v23; // [xsp+ACh] [xbp+ACh] float v24; // [xsp+B0h] [xbp+B0h] float v25; // [xsp+B4h] [xbp+B4h] v4 = a3; cocos2d::CCTouch::getLocation(&v20, a2); v5 = *((cocos2d::CCArray **)this + 26); if ( !v5 ) return nullptr; if ( !(unsigned int)cocos2d::CCArray::count(v5) ) return nullptr; v6 = *((_QWORD *)this + 26); if ( !v6 ) return nullptr; v7 = *(unsigned int **)(v6 + 56); if ( !*v7 ) return nullptr; v8 = *((const void ***)v7 + 2); v9 = 8LL * *v7 - 8; v10 = (char *)v8 + v9; if ( v8 > (const void **)((char *)v8 + v9) ) return nullptr; v11 = *v8; if ( !*v8 ) return nullptr; while ( 1 ) { v12 = (float *)_dynamic_cast( v11, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCMenuItem, 0); v13 = v12; if ( !v12 || !(*(unsigned __int8 (__fastcall **)(float *))(*(_QWORD *)v12 + 352LL))(v12) || !(*(unsigned __int8 (__fastcall **)(float *))(*(_QWORD *)v13 + 1048LL))(v13) ) { goto LABEL_9; } cocos2d::CCNode::convertToNodeSpace(&v21, (cocos2d::CCNode *)v13, (const cocos2d::CCPoint *)&v20); cocos2d::CCMenuItem::rect((cocos2d::CCMenuItem *)v13); cocos2d::CCPoint::operator=(&v22, flt_15603D0); if ( v4 ) { v15 = v13[93]; if ( v15 != 1.0 && v15 < 1.2 ) { v16 = 0.200000048; v15 = 1.2; LABEL_17: v17 = v22 - v24 * v16 * 0.5; v18 = v23 - v25 * v16 * 0.5; v24 = v15 * v24; v25 = v15 * v25; *(float *)&v17 = v17; v19 = v18; v22 = *(float *)&v17; v23 = v19; goto LABEL_18; } if ( v15 > 1.0 ) { v16 = v15 - 1.0; goto LABEL_17; } } LABEL_18: if ( (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)&v22, (const cocos2d::CCPoint *)&v21) ) return v13; LABEL_9: if ( v10 >= (char *)++v8 ) { v11 = *v8; if ( *v8 ) continue; } return nullptr; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source