//
// GJBaseGameLayer::syncBGTextures from 0x476f04 to 0x476f76 (114 bytes)
//
// 3 xrefs:
// > PlayLayer::resetLevel @ 0x31fe34
// > LevelEditorLayer::onStopPlaytest @ 0x369264
// > LevelEditorLayer::onPlaytest @ 0x36ec54
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::syncBGTextures(GJBaseGameLayer *a1)
{
int v2; // r0
int m_background; // r1
int v4; // r0
int m_ground; // r1
GJMGLayer *m_middleground; // r0
v2 = a1->m_background->getTag(a1->m_background);
m_background = a1->m_gameState.m_background;
if ( v2 != m_background )
GJBaseGameLayer::createBackground(a1, m_background);
v4 = a1->m_groundLayer->getTag(a1->m_groundLayer);
m_ground = a1->m_gameState.m_ground;
if ( v4 != m_ground )
GJBaseGameLayer::createGroundLayer(a1, m_ground, a1->m_levelSettings->m_groundLineIndex);
m_middleground = a1->m_middleground;
if ( m_middleground && m_middleground->getTag(m_middleground) != a1->m_gameState.m_middleground
|| !a1->m_middleground && a1->m_gameState.m_middleground > 0 )
{
GJBaseGameLayer::createMiddleground(a1, a1->m_gameState.m_middleground);
}
}