//
// RetryLevelLayer::keyDown from 0x1004f96e0 to 0x1004f976d (141 bytes)
//
// 2 xrefs:
// > sub_1004F9770 @ 0x1004f977c
// > ??> @ 0x1009583c8
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall RetryLevelLayer::keyDown(RetryLevelLayer *a1, cocos2d::enumKeyCodes a2, double a3)
{
GameManager *v3; // rax
GameManager *v4; // rax
if ( a2 <= (KEY_OEM3|KEY_Down|0x300) )
{
if ( a2 != KEY_Escape )
{
if ( a2 == KEY_Space )
goto LABEL_5;
goto LABEL_10;
}
LABEL_11:
RetryLevelLayer::onMenu(a1, *(cocos2d::CCObject **)&a2);
return;
}
if ( a2 != CONTROLLER_Start )
{
if ( a2 != CONTROLLER_B )
{
if ( a2 == CONTROLLER_A )
goto LABEL_5;
LABEL_10:
cocos2d::CCLayer::keyDown(a1, a2, a3);
return;
}
goto LABEL_11;
}
LABEL_5:
v3 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v3, "0024") )
PlatformToolbox::hideCursor();
v4 = GameManager::sharedState();
((void (__fastcall *)(PlayLayer *, double))v4->m_playLayer->resetLevel)(v4->m_playLayer, a3);
((void (__fastcall *)(RetryLevelLayer *))a1->removeMeAndCleanup)(a1);
}