//
// ShareLevelSettingsLayer::onClose from 0x140491e20 to 0x140491e9b (123 bytes)
//
// 3 xrefs:
// > ShareLevelSettingsLayer::keyBackClicked @ 0x140491ea9
// > ShareLevelSettingsLayer::init @ 0x14049142f
// > ??> @ 0x1406dc0ec
//
// 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 ShareLevelSettingsLayer::onClose(ShareLevelSettingsLayer *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // rdi
float v4; // xmm0_4
_BOOL8 v5; // rdx
m_level = a1->m_level;
if ( m_level->m_password.random - m_level->m_password.seed == -1 )
{
v4 = (float)((float)rand() / 32767.0) * 1000.0;
m_level->m_password.seed = (int)v4;
m_level->m_password.random = (int)v4 + 1;
}
a1->setKeypadEnabled(a1, 0);
LOBYTE(v5) = 1;
a1->removeFromParentAndCleanup(a1, v5);
}