//
// HardStreak::createDuplicate from 0x10005e274 to 0x10005e380 (268 bytes)
//
// 1 xrefs:
// > PlayerObject::createFadeOutDartStreak @ 0x100228f70
//
// 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
//
HardStreak *__fastcall HardStreak::createDuplicate(HardStreak *a1)
{
HardStreak *v2; // x19
__int64 v3; // x0
__int64 v4; // x0
cocos2d::CCArray *m_pointArray; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
unsigned __int64 arr; // x20
unsigned __int64 v9; // x21
cocos2d::ccBlendFunc BlendFunc; // [xsp+8h] [xbp-28h] BYREF
cocos2d::CCPoint v12; // 0:s0.4,4:s1.4
v2 = HardStreak::create();
BlendFunc = cocos2d::CCDrawNode::getBlendFunc(a1);
cocos2d::CCDrawNode::setBlendFunc(v2, &BlendFunc);
sub_1000229B8((__int64 *)&BlendFunc, (__int64 *)&a1->m_currentPoint);
sub_1000229D0(&v2->m_currentPoint, (double *)&BlendFunc);
*(_QWORD *)&v2->m_waveSize = *(_QWORD *)&a1->m_waveSize;
*(_WORD *)&v2->m_isSolid = *(_WORD *)&a1->m_isSolid;
v3 = ((__int64 (__fastcall *)(HardStreak *))a1->getOpacity)(a1);
((void (__fastcall *)(HardStreak *, __int64))v2->setOpacity)(v2, v3);
v4 = ((__int64 (__fastcall *)(HardStreak *))a1->getColor)(a1);
((void (__fastcall *)(HardStreak *, __int64))v2->setColor)(v2, v4);
m_pointArray = a1->m_pointArray;
if ( m_pointArray )
{
data = m_pointArray->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (unsigned __int64)data->arr;
v9 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
v12.x = sub_1000229B8((__int64 *)&BlendFunc, (__int64 *)(*(_QWORD *)arr + 56LL));
HardStreak::addPoint(v2, v12);
arr += 8LL;
}
while ( arr <= v9 );
}
}
return v2;
}