//
// LevelInfoLayer::onClone from 0x10002a9dc to 0x10002aab8 (220 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::FLAlert_Clicked @ 0x10002addc
//
// 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 __fastcall LevelInfoLayer::onClone(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
GJGameLevel *NewLevel; // x20
GJGameLevel *m_level; // x8
int random; // w9
int seed; // w10
int v8; // w19
float v9; // s0
cocos2d::CCDirector *v10; // x19
cocos2d::CCScene *v11; // x0
cocos2d::CCTransitionFade *v12; // x1
if ( !LevelInfoLayer::shouldDownloadLevel(a1) && !a1->m_isBusy )
{
((void (__fastcall *)(LevelInfoLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
a1->m_isBusy = 1;
GameManager::sharedState()->m_sceneEnum = 2;
v3 = GameLevelManager::sharedState();
NewLevel = GameLevelManager::createNewLevel(v3);
GJGameLevel::copyLevelInfo(NewLevel);
m_level = a1->m_level;
random = m_level->m_originalLevel.random;
seed = m_level->m_originalLevel.seed;
v8 = random - seed;
if ( random == seed )
v8 = m_level->m_levelID.random - m_level->m_levelID.seed;
NewLevel->m_originalLevel.value = v8;
v9 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
NewLevel->m_originalLevel.seed = (int)v9;
NewLevel->m_originalLevel.random = v8 + (int)v9;
v10 = cocos2d::CCDirector::sharedDirector();
v11 = EditLevelLayer::scene(NewLevel);
v12 = cocos2d::CCTransitionFade::create_1(0.5, v11);
cocos2d::CCDirector::replaceScene(v10, v12);
}
}