//
// GJGroundLayer::createLine from 0x1005eaf70 to 0x1005eb121 (433 bytes)
//
// 1 xrefs:
// > GJGroundLayer::init @ 0x1005eab02
//
// 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; // rdi
int v4; // ecx
int v5; // edx
cocos2d::CCString *v6; // rax
const char *CString; // rax
cocos2d::CCSprite *v8; // rax
cocos2d::CCSprite *v9; // r14
cocos2d::CCSprite *v10; // r14
char v11; // [rsp+0h] [rbp-30h]
float v12[2]; // [rsp+4h] [rbp-2Ch] BYREF
float v13; // [rsp+Ch] [rbp-24h] BYREF
float v14; // [rsp+14h] [rbp-1Ch]
double v15; // 0:xmm0_8.8
m_lineSprite = a1->m_lineSprite;
if ( m_lineSprite )
{
((void (__fastcall *)(cocos2d::CCSprite *))m_lineSprite->removeFromParent)(m_lineSprite);
a1->m_lineSprite = nullptr;
}
v4 = 1;
if ( a2 >= 2 )
v4 = a2;
v5 = 3;
if ( v4 < 3 )
v5 = v4;
v14 = flt_1008219C0[a2 >= 2];
a1->m_lineType = v5;
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v15 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v13);
v6 = (cocos2d::CCString *)sub_1007AB580("floorLine_%02d_001.png", v11);
CString = cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCSprite::createWithSpriteFrameName(CString);
a1->m_lineSprite = v8;
((void (__fastcall *)(GJGroundLayer *, cocos2d::CCSprite *, __int64, double))a1->addChild_0)(a1, v8, 5, v15);
v9 = a1->m_lineSprite;
sub_10028CBE0(v12, v13 * 0.5, v14);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v9->setPosition)(v9, v12);
v10 = a1->m_lineSprite;
sub_10028CBE0(v12, 0.5, 1.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v10->setAnchorPoint)(v10, v12);
((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)(v13 + 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);
}
}