//
// cocos2d::CCSpawn::initWithTwoActions from 0x10018ad14 to 0x10018add0 (188 bytes)
//
// 2 xrefs:
// > cocos2d::CCSpawn::createWithTwoActions @ 0x10018ace0
// > cocos2d::CCSpawn::copyWithZone @ 0x10018af08
//
// 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
//
bool __fastcall cocos2d::CCSpawn::initWithTwoActions(
cocos2d::CCSpawn *a1,
cocos2d::CCFiniteTimeAction *a2,
cocos2d::CCFiniteTimeAction *a3)
{
float m_fDuration; // s0
float v5; // s1
float v6; // s2
cocos2d::CCDelayTime *v8; // x0
cocos2d::CCFiniteTimeAction *v9; // x20
cocos2d::CCDelayTime *v10; // x0
m_fDuration = a2->m_fDuration;
v5 = a3->m_fDuration;
if ( m_fDuration >= v5 )
v6 = a2->m_fDuration;
else
v6 = a3->m_fDuration;
if ( v6 == 0.0 )
v6 = 0.00000011921;
a1->m_fDuration = v6;
a1->m_elapsed = 0.0;
a1->m_bFirstTick = 1;
a1[1].__vftable = (cocos2d::CCSpawn_vtbl *)a2;
*(_QWORD *)&a1[1].m_uID = a3;
if ( m_fDuration <= v5 )
{
v9 = a2;
if ( m_fDuration < v5 )
{
v10 = cocos2d::CCDelayTime::create(v5 - m_fDuration);
v9 = cocos2d::CCSequence::createWithTwoActions(v9, v10);
a1[1].__vftable = (cocos2d::CCSpawn_vtbl *)v9;
}
}
else
{
v8 = cocos2d::CCDelayTime::create(m_fDuration - v5);
*(_QWORD *)&a1[1].m_uID = cocos2d::CCSequence::createWithTwoActions(a3, v8);
v9 = (cocos2d::CCFiniteTimeAction *)a1[1].__vftable;
}
cocos2d::CCObject::retain(v9);
cocos2d::CCObject::retain(*(cocos2d::CCObject **)&a1[1].m_uID);
return 1;
}