//
// HardStreak::createDuplicate from 0x456b80 to 0x456c5c (220 bytes)
//
// 1 xrefs:
// > PlayerObject::createFadeOutDartStreak @ 0x33deb8
//
// 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 *HardStreak::createDuplicate(HardStreak *a1)
{
HardStreak *v2; // r4
int v3; // r2
bool v4; // r3
void (__fastcall *setOpacity)(cocos2d::CCNodeRGBA *__hidden, GLubyte); // r7
int v6; // r0
void (__fastcall *setColor)(cocos2d::CCNodeRGBA *__hidden, const cocos2d::ccColor3B *); // r7
const cocos2d::ccColor3B *v8; // r0
cocos2d::CCArray *m_pointArray; // r3
cocos2d::ccArray *data; // r3
cocos2d::CCObject **arr; // r7
cocos2d::CCObject **v13; // r5
int v14; // r1
int v15; // t1
cocos2d::CCPoint v16; // r1
cocos2d::CCPoint v17; // [sp+4h] [bp-Ch] BYREF
v2 = HardStreak::create();
cocos2d::CCDrawNode::getBlendFunc((cocos2d::ccBlendFunc *)&v17, a1);
cocos2d::CCDrawNode::setBlendFunc(v2, (const cocos2d::ccBlendFunc *)&v17);
cocos2d::CCPoint::CCPoint(&v17, &a1->m_currentPoint);
cocos2d::CCPoint::operator=((PlayerObject *)&v2->m_currentPoint, COERCE_FLOAT(&v17), v3, v4);
v2->m_waveSize = a1->m_waveSize;
v2->m_pulseSize = a1->m_pulseSize;
v2->m_isSolid = a1->m_isSolid;
v2->m_isFlipped = a1->m_isFlipped;
setOpacity = v2->setOpacity;
v6 = ((int (__fastcall *)(HardStreak *))a1->getOpacity)(a1);
setOpacity(v2, v6);
setColor = v2->setColor;
v8 = a1->getColor(a1);
setColor(v2, v8);
m_pointArray = a1->m_pointArray;
if ( m_pointArray )
{
data = m_pointArray->data;
if ( data->num )
{
arr = data->arr;
v13 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v13 )
{
v15 = (int)*arr++;
v14 = v15;
if ( !v15 )
break;
cocos2d::CCPoint::CCPoint(&v17, (const cocos2d::CCPoint *)(v14 + 52));
LODWORD(v16.x) = &v17;
HardStreak::addPoint(v2, v16);
}
}
}
return v2;
}