//
// cocos2d::CCMotionStreak::initWithFade from 0x7debfc to 0x7ded32 (310 bytes)
//
// 2 xrefs:
// > cocos2d::CCMotionStreak::create @ 0x7ded6a
// > cocos2d::CCMotionStreak::initWithFade @ 0x7dedbe
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:47 +0000
//
int __fastcall cocos2d::CCMotionStreak::initWithFade(
cocos2d::CCScheduler **a1,
float a2,
float a3,
float a4,
int a5,
int a6)
{
float v10; // s15
unsigned int v11; // s15
cocos2d::CCShaderCache *v12; // r0
cocos2d::CCScheduler *v13; // r3
void (__fastcall *v14)(cocos2d::CCScheduler **, int); // r5
cocos2d::CCShaderCache *v15; // r0
int v16; // r0
cocos2d::CCNode::setPosition((int)a1, flt_D2F4AC);
(*((void (__fastcall **)(cocos2d::CCScheduler **, float *))*a1 + 37))(a1, flt_D2F4AC);
(*((void (__fastcall **)(cocos2d::CCScheduler **, int))*a1 + 55))(a1, 1);
*((_BYTE *)a1 + 286) = 1;
*((_BYTE *)a1 + 285) = 0;
cocos2d::CCPoint::operator=((float *)a1 + 94, flt_D2F4AC);
*((_BYTE *)a1 + 284) = 1;
*((float *)a1 + 75) = a4;
if ( a3 == -1.0 )
v10 = a4 / 5.0;
else
v10 = a3;
*((float *)a1 + 77) = v10 * v10;
*((float *)a1 + 76) = 1.0 / a2;
a1[79] = nullptr;
v11 = (unsigned int)(float)((float)(unsigned int)((int)(float)(a2 * 60.0) + 2) * 5.0);
a1[78] = (cocos2d::CCScheduler *)v11;
a1[82] = (cocos2d::CCScheduler *)malloc(4 * v11);
a1[81] = (cocos2d::CCScheduler *)malloc(8 * v11);
a1[83] = (cocos2d::CCScheduler *)malloc(16 * v11);
a1[85] = (cocos2d::CCScheduler *)malloc(16 * v11);
v12 = (cocos2d::CCShaderCache *)malloc(8 * v11);
a1[73] = (cocos2d::CCScheduler *)(&stru_2FC + 6);
a1[74] = (cocos2d::CCScheduler *)(&stru_2FC + 7);
v13 = *a1;
a1[84] = v12;
v14 = *((void (__fastcall **)(cocos2d::CCScheduler **, int))v13 + 83);
v15 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache(v12);
v16 = cocos2d::CCShaderCache::programForKey(v15, "ShaderPositionTextureColor");
v14(a1, v16);
(*((void (__fastcall **)(cocos2d::CCScheduler **, int))*a1 + 127))(a1, a6);
(*((void (__fastcall **)(cocos2d::CCScheduler **, int))*a1 + 120))(a1, a5);
cocos2d::CCNode::scheduleUpdate(a1);
return 1;
}