//
// GJBigSprite::unloadAll from 0x100269180 to 0x1002692b8 (312 bytes)
//
// 1 xrefs:
// > MapSelectLayer::onExit @ 0x100269140
//
// 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 GJBigSprite::unloadAll(GJBigSprite *a1)
{
__int128 v1; // xmm0
unsigned __int64 v3; // r14
__int64 v4; // rax
__int64 v5; // rdi
__int64 v6; // r12
__int64 v7; // r12
cocos2d::CCTextureCache *v8; // rax
const char *v9; // rsi
__int128 v10; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
a1->m_unloadingAll = 1;
if ( (unsigned int)sub_100720070(a1->m_spriteNodes) )
{
v3 = 0;
do
{
v4 = sub_1007200C0(a1->m_spriteNodes, (unsigned int)v3);
*(_BYTE *)(v4 + 368) = 0;
v5 = *(_QWORD *)(v4 + 344);
if ( v5 )
{
v6 = v4;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 520LL))(v5);
*(_QWORD *)(v6 + 344) = 0;
if ( (*(_BYTE *)(v6 + 320) & 1) != 0 )
{
sub_100006B70(&v10, *(const void **)(v6 + 336), *(_QWORD *)(v6 + 328), *(double *)&v1);
}
else
{
v7 = v6 + 320;
__p = *(void **)(v7 + 16);
v1 = *(_OWORD *)v7;
v10 = *(_OWORD *)v7;
}
v8 = cocos2d::CCTextureCache::sharedTextureCache();
v9 = (char *)&v10 + 1;
if ( (v10 & 1) != 0 )
v9 = (const char *)__p;
cocos2d::CCTextureCache::removeTextureForKey(v8, v9);
*(_QWORD *)&a1->m_spritesLoaded.__begin_[8 * (v3 >> 6)] &= __ROL8__(-2, v3);
if ( (v10 & 1) != 0 )
operator delete(__p);
}
++v3;
}
while ( v3 < (unsigned int)sub_100720070(a1->m_spriteNodes) );
}
}