//
// GameManager::finishedLoadingBGAsync from 0x714728 to 0x7147bc (148 bytes)
//
// 3 xrefs:
// > ??> @ 0xebf00
// > GameManager::loadBackgroundAsync @ 0x716930
// > ??> @ 0x15471f8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:52:15 +0000
//
__int64 __fastcall GameManager::finishedLoadingBGAsync(__int64 this, cocos2d::CCObject *a2)
{
GJBaseGameLayer *v2; // x21
__int64 v4; // x20
int v5; // w0
const char *v6; // x1
cocos2d::CCString *v7; // x0
cocos2d::CCTextureCache *v8; // x0
char *CString; // [xsp+38h] [xbp+38h]
*(_BYTE *)(this + 1000) = 0;
if ( a2 )
{
v2 = *(GJBaseGameLayer **)(this + 560);
v4 = this;
if ( v2 )
{
v5 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
GJBaseGameLayer::asyncBGLoaded(v2, v5);
}
v6 = (const char *)*(unsigned int *)(v4 + 980);
if ( (_DWORD)v6 )
{
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"game_bg_%02d_001.png", v6);
CString = (char *)cocos2d::CCString::getCString(v7);
v8 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache((cocos2d::CCTextureCache *)CString);
cocos2d::CCTextureCache::removeTextureForKey(v8, CString);
}
this = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(v4 + 980) = this;
}
return this;
}