//
// HardStreak::createDuplicate from 0x826278 to 0x8263cc (340 bytes)
//
// 2 xrefs:
// > PlayerObject::createFadeOutDartStreak @ 0x623eac
// > ??> @ 0xad4d8
//
// 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; // x20
float v3; // s0
float v4; // s1
bool m_isSolid; // w3
GLubyte (__fastcall *getOpacity)(cocos2d::CCNodeRGBA *__hidden); // x1
void (__fastcall *setOpacity)(cocos2d::CCNodeRGBA *__hidden, GLubyte); // x22
float m_pulseSize; // w2
int v9; // w0
void (__fastcall *setColor)(cocos2d::CCNodeRGBA *__hidden, const cocos2d::ccColor3B *); // x22
const cocos2d::ccColor3B *v11; // x0
cocos2d::CCArray *m_pointArray; // x0
cocos2d::ccArray *data; // x0
const cocos2d::CCPoint **arr; // x19
const cocos2d::CCPoint **v15; // x22
const cocos2d::CCPoint *v16; // x1
cocos2d::ccBlendFunc BlendFunc; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v19; // 0:s0.4,4:s1.4
v2 = HardStreak::create();
BlendFunc = cocos2d::CCDrawNode::getBlendFunc(a1);
cocos2d::CCDrawNode::setBlendFunc(v2, &BlendFunc);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&BlendFunc, &a1->m_currentPoint);
cocos2d::CCPoint::operator=(&v2->m_currentPoint, v3, v4);
m_isSolid = a1->m_isSolid;
getOpacity = a1->getOpacity;
setOpacity = v2->setOpacity;
v2->m_waveSize = a1->m_waveSize;
m_pulseSize = a1->m_pulseSize;
v2->m_isSolid = m_isSolid;
v2->m_isFlipped = a1->m_isFlipped;
v2->m_pulseSize = m_pulseSize;
v9 = ((__int64 (__fastcall *)(HardStreak *))getOpacity)(a1);
setOpacity(v2, v9);
setColor = v2->setColor;
v11 = a1->getColor(a1);
setColor(v2, v11);
m_pointArray = a1->m_pointArray;
if ( m_pointArray )
{
data = m_pointArray->data;
if ( data->num )
{
arr = (const cocos2d::CCPoint **)data->arr;
v15 = &arr[data->num - 1];
while ( v15 >= arr )
{
if ( !*arr )
break;
v16 = *arr++ + 7;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&BlendFunc, v16);
HardStreak::addPoint(v2, v19);
}
}
}
return v2;
}