//
// GJBaseGameLayer::syncBGTextures from 0x5964ac to 0x59651e (114 bytes)
//
// 3 xrefs:
// > PlayLayer::resetLevel @ 0x412ae0
// > LevelEditorLayer::onStopPlaytest @ 0x4629ac
// > LevelEditorLayer::onPlaytest @ 0x46847c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:09 +0000
//
GJBaseGameLayer *__fastcall GJBaseGameLayer::syncBGTextures(GJBaseGameLayer *this)
{
int v2; // r0
const char *v3; // r1
int v4; // r0
GJGroundLayer *v5; // r1
GJBaseGameLayer *result; // r0
v2 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 612) + 32))(*((_DWORD *)this + 612));
v3 = *((const char **)this + 344);
if ( (const char *)v2 != v3 )
GJBaseGameLayer::createBackground(this, v3);
v4 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 614) + 32))(*((_DWORD *)this + 614));
v5 = *((GJGroundLayer **)this + 345);
if ( (GJGroundLayer *)v4 != v5 )
GJBaseGameLayer::createGroundLayer(this, v5, *(_DWORD *)(*((_DWORD *)this + 521) + 344));
result = *((GJBaseGameLayer **)this + 616);
if ( result )
{
result = (GJBaseGameLayer *)(*(int (__fastcall **)(GJBaseGameLayer *))(*(_DWORD *)result + 32))(result);
if ( result != *((GJBaseGameLayer **)this + 346) )
return GJBaseGameLayer::createMiddleground(this, *((GJMGLayer **)this + 346));
}
if ( !*((_DWORD *)this + 616) && *((int *)this + 346) > 0 )
return GJBaseGameLayer::createMiddleground(this, *((GJMGLayer **)this + 346));
return result;
}