//
// GJBaseGameLayer::syncBGTextures from 0x140344f00 to 0x140344fa0 (160 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x1403fefcf
// > LevelEditorLayer::onStopPlaytest @ 0x14040013b
// > PlayLayer::resetLevel @ 0x140519b47
// > ??> @ 0x14091fe80
//
// This function is hookable on this platform (idp: pc, 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:30:41 +0000
//
void __fastcall GJBaseGameLayer::syncBGTextures(__int64 a1)
{
int v2; // eax
int v3; // edx
int v4; // eax
unsigned int v5; // edx
__int64 v6; // rcx
int v7; // eax
int *v8; // rcx
int v9; // edx
v2 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 4320) + 56LL))(*(_QWORD *)(a1 + 4320));
v3 = *(_DWORD *)(a1 + 2132);
if ( v2 != v3 )
GJBaseGameLayer::createBackground(a1, v3);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 4336) + 56LL))(*(_QWORD *)(a1 + 4336));
v5 = *(_DWORD *)(a1 + 2136);
if ( v4 != v5 )
GJBaseGameLayer::createGroundLayer(a1, v5, *(_DWORD *)(*(_QWORD *)(a1 + 3528) + 432LL));
v6 = *(_QWORD *)(a1 + 4352);
if ( v6 )
{
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 56LL))(v6);
v8 = (int *)(a1 + 2140);
v9 = *(_DWORD *)(a1 + 2140);
if ( v7 != v9 )
{
LABEL_11:
GJBaseGameLayer::createMiddleground(a1, v9);
return;
}
}
else
{
v8 = (int *)(a1 + 2140);
}
if ( !*(_QWORD *)(a1 + 4352) )
{
v9 = *v8;
if ( *v8 > 0 )
goto LABEL_11;
}
}