//
// GJBaseGameLayer::swapBackground from 0x99a58c to 0x99a5f4 (104 bytes)
//
// 2 xrefs:
// > ArtTriggerGameObject::triggerObject @ 0x86ffc0
// > ??> @ 0xbbbe8
//
// 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:58:04 +0000
//
__int64 __fastcall GJBaseGameLayer::swapBackground(__int64 this, int a2)
{
GJBaseGameLayer *v3; // x19
GameManager *v4; // x0
__int64 v5; // x0
*(_DWORD *)(this + 1900) = a2;
if ( !*(_BYTE *)(this + 12605) )
{
v3 = (GJBaseGameLayer *)this;
v4 = (GameManager *)*(unsigned int *)(GameManager::sharedState((GameManager *)this) + 980);
if ( a2 == (_DWORD)v4 )
{
return GJBaseGameLayer::asyncBGLoaded(v3, a2);
}
else
{
v5 = GameManager::sharedState(v4);
return GameManager::loadBackgroundAsync(v5, a2);
}
}
return this;
}