//
// LevelInfoLayer::onLevelOptions from 0x1002c28f0 to 0x1002c29ab (187 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x1002bf1b9
//
// 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::onLevelOptions(LevelInfoLayer *a1, cocos2d::CCObject *longStorage)
{
double v2; // xmm0_8
GJGameLevel *m_level; // rax
std::string *p_m_levelString; // rax
GameLevelOptionsLayer *v5; // rax
__int64 v6; // rbx
__int128 v7; // [rsp-38h] [rbp-38h] BYREF
char *v8; // [rsp-28h] [rbp-28h]
if ( !a1->m_isBusy )
{
m_level = a1->m_level;
if ( m_level->m_levelType != SearchResult )
{
if ( (m_level->m_levelString.m_data.m_short.sizex2 & 1) != 0 )
{
longStorage = (cocos2d::CCObject *)m_level->m_levelString.m_data.m_long.longStorage;
sub_100006B70(&v7, longStorage, m_level->m_levelString.m_data.m_long.size, v2);
}
else
{
p_m_levelString = &m_level->m_levelString;
v8 = p_m_levelString->m_data.m_long.longStorage;
v7 = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2;
}
if ( (v7 & 1) != 0 )
{
v6 = *((_QWORD *)&v7 + 1);
operator delete(v8);
if ( !v6 )
return;
}
else if ( !((unsigned __int8)v7 >> 1) )
{
return;
}
v5 = GameLevelOptionsLayer::create(a1->m_level);
((void (__fastcall *)(GameLevelOptionsLayer *, cocos2d::CCObject *))v5->show)(v5, longStorage);
}
}
}