//
// LevelInfoLayer::shouldDownloadLevel from 0x1000293e0 to 0x100029488 (168 bytes)
//
// 3 xrefs:
// > LevelInfoLayer::onPlay @ 0x100026594
// > LevelInfoLayer::onUpdate @ 0x100028360
// > LevelInfoLayer::onClone @ 0x10002a9ec
//
// 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
//
bool __fastcall LevelInfoLayer::shouldDownloadLevel(LevelInfoLayer *a1)
{
GJGameLevel *m_level; // x8
bool v2; // w19
std::string *p_m_levelString; // x8
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v6; // [xsp+1Fh] [xbp-31h]
void *__dst[2]; // [xsp+20h] [xbp-30h] BYREF
char *longStorage; // [xsp+30h] [xbp-20h]
m_level = a1->m_level;
if ( m_level->m_levelType == SearchResult )
return 1;
if ( m_level->m_levelString.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(
__dst,
(void *)m_level->m_levelString.m_data.m_long.capacitym1,
m_level->m_levelString.m_data.m_long.size);
}
else
{
p_m_levelString = &m_level->m_levelString;
*(_OWORD *)__dst = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2;
longStorage = p_m_levelString->m_data.m_long.longStorage;
}
sub_100009900(__p, "");
v2 = sub_1000045BC(__dst, __p);
if ( v6 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(longStorage) < 0 )
operator delete(__dst[0]);
return v2;
}