//
// cocos2d::CCMouseHandler::handlerWithDelegate from 0x180062bc0 to 0x180062c78 (184 bytes)
//
// 7 xrefs:
// > cocos2d::CCMouseDispatcher::addDelegate @ 0x180062ec6
// > cocos2d::CCMouseDispatcher::dispatchRightClick @ 0x180063038
// > cocos2d::CCMouseDispatcher::dispatchScrollMSG @ 0x1800631a8
// > cocos2d::CCMouseDispatcher::flushPendingDelegates @ 0x180063258
// > cocos2d::CCMouseDispatcher::forceAddDelegate @ 0x18006329c
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bd780
//
// This function is hookable on this platform (idp: pc, 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 11:21:51 +0000
//
struct cocos2d::CCMouseHandler *__fastcall cocos2d::CCMouseHandler::handlerWithDelegate(
struct cocos2d::CCMouseDelegate *a1)
{
cocos2d::CCObject *v2; // rax
cocos2d::CCObject *v3; // rbx
bool (__fastcall *v4)(cocos2d::CCMouseHandler *__hidden, struct cocos2d::CCMouseDelegate *); // r8
cocos2d::CCObject *v5; // rax
v2 = (cocos2d::CCObject *)sub_1800E4AC0(0x40u);
v3 = v2;
if ( v2 )
{
cocos2d::CCObject::CCObject(v2);
*(_QWORD *)v3 = &cocos2d::CCMouseHandler::`vftable';
}
else
{
v3 = nullptr;
}
if ( !v3 )
return v3;
v4 = *(bool (__fastcall **)(cocos2d::CCMouseHandler *__hidden, struct cocos2d::CCMouseDelegate *))(*(_QWORD *)v3 + 72LL);
if ( v4 == cocos2d::CCMouseHandler::initWithDelegate )
{
*((_QWORD *)v3 + 7) = a1;
v5 = (cocos2d::CCObject *)_RTDynamicCast(
a1,
0,
&cocos2d::CCMouseDelegate `RTTI Type Descriptor',
&cocos2d::CCObject `RTTI Type Descriptor',
0);
cocos2d::CCObject::retain(v5);
LABEL_8:
cocos2d::CCObject::autorelease(v3);
return v3;
}
if ( v4(v3, a1) )
goto LABEL_8;
cocos2d::CCObject::release(v3);
return nullptr;
}