//
// GJBaseGameLayer::createGroundLayer from 0x857360 to 0x857428 (200 bytes)
//
// 6 xrefs:
// > PlayLayer::setupHasCompleted @ 0x5dc444
// > LevelEditorLayer::init @ 0x67c9f0
// > GJBaseGameLayer::asyncGLoaded @ 0x8580d4
// > GJBaseGameLayer::syncBGTextures @ 0x866a40
// > LevelSettingsLayer::selectArtClosed @ 0xa34688
// > ??> @ 0x58998
//
// 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::createGroundLayer(GJBaseGameLayer *a1, int a2, int a3)
{
unsigned int v5; // w20
GJGroundLayer *v6; // x0
GJGroundLayer_vtbl *v7; // x2
GJGroundLayer *v8; // x0
int v9; // [xsp+38h] [xbp+38h]
if ( a1->m_groundLayer )
{
v9 = a2;
GJBaseGameLayer::removeGroundLayer(a1);
a2 = v9;
}
if ( a2 > 22 )
v5 = 22;
else
v5 = a2;
v6 = GJGroundLayer::create(v5, a3);
v7 = v6->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_groundLayer = v6;
v7->setTag(v6, v5);
a1->m_objectParent->addChild_0(a1->m_objectParent, a1->m_groundLayer, 40);
v8 = GJGroundLayer::create(v5, a3);
a1->m_groundLayer2 = v8;
a1->m_objectParent->addChild_0(a1->m_objectParent, v8, 40);
a1->m_groundLayer2->setScaleY(a1->m_groundLayer2, -1.0);
}