//
// GJBaseGameLayer::createGroundLayer from 0x100114910 to 0x1001149f4 (228 bytes)
//
// 5 xrefs:
// > PlayLayer::setupHasCompleted @ 0x1000adf50
// > LevelEditorLayer::init @ 0x1000dbf13
// > GJBaseGameLayer::asyncGLoaded @ 0x1001148fb
// > GJBaseGameLayer::syncBGTextures @ 0x100158fa3
// > LevelSettingsLayer::selectArtClosed @ 0x10026f511
//
// 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 __fastcall GJBaseGameLayer::createGroundLayer(GJBaseGameLayer *a1, int a2, int a3)
{
GJGroundLayer *m_groundLayer; // rdi
unsigned int v6; // r12d
GJGroundLayer *v7; // rax
GJGroundLayer *v8; // rax
m_groundLayer = a1->m_groundLayer;
if ( m_groundLayer )
{
((void (__fastcall *)(GJGroundLayer *))m_groundLayer->removeFromParent)(m_groundLayer);
a1->m_groundLayer = nullptr;
((void (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->removeFromParent)(a1->m_groundLayer2);
a1->m_groundLayer2 = nullptr;
}
v6 = 22;
if ( a2 < 22 )
v6 = a2;
v7 = GJGroundLayer::create(v6, a3);
a1->m_groundLayer = v7;
((void (__fastcall *)(GJGroundLayer *, _QWORD))v7->setTag)(v7, v6);
((void (__fastcall *)(cocos2d::CCNode *, GJGroundLayer *, __int64))a1->m_objectParent->addChild_0)(
a1->m_objectParent,
a1->m_groundLayer,
40);
v8 = GJGroundLayer::create(v6, a3);
a1->m_groundLayer2 = v8;
((void (__fastcall *)(cocos2d::CCNode *, GJGroundLayer *, __int64))a1->m_objectParent->addChild_0)(
a1->m_objectParent,
v8,
40);
((void (__fastcall *)(GJGroundLayer *, float))a1->m_groundLayer2->setScaleY)(a1->m_groundLayer2, -1.0);
}