//
// GJBaseGameLayer::swapBackground from 0x1002782ec to 0x10027835c (112 bytes)
//
// 1 xrefs:
// > ArtTriggerGameObject::triggerObject @ 0x10043e1e8
//
// 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 11:01:51 +0000
//
__int64 __fastcall GJBaseGameLayer::swapBackground(__int64 result, __int64 a2)
{
__int64 v3; // x20
__int64 v4; // x0
__int64 v5; // x0
*(_DWORD *)(result + 1900) = a2;
if ( (*(_BYTE *)(result + 12605) & 1) == 0 )
{
v3 = result;
v4 = GameManager::sharedState(result);
if ( *(_DWORD *)(v4 + 980) == (_DWORD)a2 )
{
GJBaseGameLayer::createBackground(v3, a2);
return GJBaseGameLayer::updateLevelColors(v3);
}
else
{
v5 = GameManager::sharedState(v4);
return sub_1003B524C(v5, a2);
}
}
return result;
}