//
// GJGroundLayer::createLine from 0x10002be6c to 0x10002c008 (412 bytes)
//
// 1 xrefs:
// > GJGroundLayer::init @ 0x10002ba88
//
// 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 GJGroundLayer::createLine(GJGroundLayer *a1, int a2)
{
cocos2d::CCSprite *m_lineSprite; // x0
int v5; // w8
float v6; // s8
cocos2d::CCDirector *v7; // x0
int v8; // w8
cocos2d::CCString *v9; // x0
const char *CString; // x0
cocos2d::CCSprite *v11; // x0
__n128 v12; // q0
cocos2d::CCSprite *v13; // x20
__n128 v14; // q1
__n128 v15; // q0
cocos2d::CCSprite *v16; // x20
__n128 v17; // q1
int v18; // [xsp+10h] [xbp-30h] BYREF
float v19; // [xsp+18h] [xbp-28h]
m_lineSprite = a1->m_lineSprite;
if ( m_lineSprite )
{
((void (__fastcall *)(cocos2d::CCSprite *))m_lineSprite->removeFromParent)(m_lineSprite);
a1->m_lineSprite = nullptr;
}
if ( a2 <= 1 )
v5 = 1;
else
v5 = a2;
if ( a2 <= 1 )
v6 = 0.5;
else
v6 = 0.2;
if ( v5 >= 3 )
v5 = 3;
a1->m_lineType = v5;
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v7);
v8 = 1;
if ( a1->m_lineType != 1 )
v8 = 2;
v9 = (cocos2d::CCString *)sub_100268F4C("floorLine_%02d_001.png", v8);
CString = cocos2d::CCString::getCString(v9);
v11 = cocos2d::CCSprite::createWithSpriteFrameName(CString);
a1->m_lineSprite = v11;
v12 = ((__n128 (__fastcall *)(GJGroundLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v11, 5);
v13 = a1->m_lineSprite;
v12.n128_f32[0] = v19 * 0.5;
v14.n128_f32[0] = v6;
sub_100022980(v12, v14, &v18);
v15 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v13->setPosition)(v13, &v18);
v16 = a1->m_lineSprite;
v15.n128_u32[0] = 0.5;
v17.n128_u32[0] = 1.0;
sub_100022980(v15, v17, &v18);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v16->setAnchorPoint)(v16, &v18);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_lineSprite->setTag)(a1->m_lineSprite, 2);
if ( a1->m_blendLine )
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_lineSprite->setBlendFunc)(a1->m_lineSprite, 0x100000302LL);
if ( a1->m_lineType >= 2 )
{
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_lineSprite->setScaleX)(
a1->m_lineSprite,
(float)(v19 + 10.0) / a1->m_lineSprite->m_obRect.size.width);
if ( a1->m_lineType == 3 )
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_lineSprite->setScaleY)(a1->m_lineSprite, 2.0);
}
}