//
// CreateGuidelinesLayer::keyDown from 0x14009b820 to 0x14009b8af (143 bytes)
//
// 5 xrefs:
// > ??> @ 0x140542008
// > ??> @ 0x140542a30
// > ??> @ 0x140669eac
// > ??> @ 0x140669ebc
// > ??> @ 0x1406c74e8
//
// 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 CreateGuidelinesLayer::keyDown(CreateGuidelinesLayer *a1, cocos2d::enumKeyCodes a2, double a3)
{
int *p_m_nTouchPriority; // rbx
__int64 v4; // rax
cocos2d::CCTouchDispatcher *v5; // rax
__int64 v6; // rdx
__int64 v7; // r8
void (__fastcall ***v8)(_QWORD, char *, __int64); // rcx
if ( a2 == KEY_Up || a2 == KEY_Space )
{
(*(void (__fastcall **)(int *))(*(_QWORD *)&a1[-1].m_nTouchPriority + 1064LL))(&a1[-1].m_nTouchPriority);
}
else if ( a2 == CONTROLLER_X )
{
p_m_nTouchPriority = &a1[-1].m_nTouchPriority;
v4 = cocos2d::CCDirector::sharedDirector(a1);
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 144LL))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, (struct cocos2d::CCObject *)p_m_nTouchPriority);
v8 = *((void (__fastcall ****)(_QWORD, char *, __int64))p_m_nTouchPriority + 69);
if ( v8 )
{
LOBYTE(v7) = 1;
(**v8)(v8, (char *)p_m_nTouchPriority, v7);
}
LOBYTE(v6) = 1;
(*(void (__fastcall **)(int *, __int64))(*(_QWORD *)p_m_nTouchPriority + 504LL))(p_m_nTouchPriority, v6);
}
else
{
cocos2d::CCLayer::keyDown(a1, a2, a3);
}
}