//
// GameManager::loadBackgroundAsync from 0x7168b4 to 0x71694c (152 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::swapBackground @ 0x99a5dc
// > ??> @ 0x930d0
//
// 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:16 +0000
//
__int64 __fastcall GameManager::loadBackgroundAsync(__int64 this, int a2)
{
unsigned int v2; // w19
int v3; // w20
cocos2d::CCString *v4; // x0
char *CString; // x0
if ( a2 <= 0 )
{
v2 = 1;
}
else if ( a2 > 59 )
{
v2 = 59;
}
else
{
v2 = a2;
}
if ( !*(_BYTE *)(this + 1000) && v2 != *(_DWORD *)(this + 980) )
{
*(_BYTE *)(this + 1000) = (unsigned __int8)&dword_0 + 1;
v3 = cocos2d::CCTextureCache::sharedTextureCache((cocos2d::CCTextureCache *)((char *)&dword_0 + 1));
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"game_bg_%02d_001.png",
(const char *)v2);
CString = (char *)cocos2d::CCString::getCString(v4);
return cocos2d::CCTextureCache::addImageAsync(v3, CString);
}
return this;
}