//
// TextArea::fadeInCharacters from 0x1000f701c to 0x1000f7340 (804 bytes)
//
// 3 xrefs:
// > SecretLayer5::fadeInMessage @ 0x100075890
// > SecretLayer5::fadeOutMessage @ 0x10007590c
// > DialogLayer::displayDialogObject @ 0x100087000
//
// 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
//
float __fastcall TextArea::fadeInCharacters(TextArea *a1, float a2, float a3, bool a4, TextFadeInStyle a5)
{
_BOOL4 v6; // w21
cocos2d::CCDictionary *m_shakeCharacters; // x0
cocos2d::CCDictionary *v11; // x0
__int64 v12; // x28
int v13; // w22
float v14; // s10
float v15; // s15
__int64 v16; // x0
__int64 v17; // x0
unsigned int *v18; // x9
__int64 v19; // x8
__int64 *v20; // x9
__int64 v21; // x23
unsigned __int64 v22; // x27
__int64 *v23; // x26
float v24; // s12
cocos2d::CCDelayTime *v25; // x0
cocos2d::CCAction *v26; // x0
float v27; // s0
float v28; // s1
cocos2d::CCScaleTo *v29; // x24
cocos2d::CCDelayTime *v30; // x25
cocos2d::CCAction *v31; // x0
int v32; // w25
double *v33; // x0
cocos2d::CCObject *v34; // x24
__int64 v35; // t1
cocos2d::CCDelayTime *v36; // x23
cocos2d::CCAction *v37; // x0
__int64 v39; // [xsp+10h] [xbp-B0h]
__int64 v40; // [xsp+18h] [xbp-A8h]
unsigned int *v41; // [xsp+20h] [xbp-A0h]
char v42; // [xsp+2Ch] [xbp-94h]
cocos2d::SEL_CallFunc v43; // 0:x1.16
v6 = a4;
m_shakeCharacters = a1->m_shakeCharacters;
if ( m_shakeCharacters )
{
cocos2d::CCObject::release(m_shakeCharacters);
a1->m_shakeCharacters = nullptr;
}
v11 = cocos2d::CCDictionary::create();
a1->m_shakeCharacters = v11;
cocos2d::CCObject::retain(v11);
v41 = *(unsigned int **)(((__int64 (__fastcall *)(MultilineBitmapFont *))a1->m_label->getChildren)(a1->m_label) + 56);
if ( (int)*v41 <= 0 )
{
cocos2d::CCNode::unscheduleUpdate(a1);
v14 = 0.0;
LABEL_35:
cocos2d::CCNode::unscheduleUpdate(a1);
return v14;
}
v12 = 0;
v42 = 0;
v13 = 0;
v39 = *v41 - 1;
v14 = 0.0;
v15 = 0.0;
v40 = *v41;
do
{
v16 = *(_QWORD *)(*((_QWORD *)v41 + 2) + 8 * v12);
v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 472LL))(v16);
if ( v17
&& (v18 = *(unsigned int **)(v17 + 56), v19 = *v18, (_DWORD)v19)
&& (v20 = *((__int64 **)v18 + 2), (v21 = *v20) != 0) )
{
v22 = (unsigned __int64)&v20[v19 - 1];
v23 = v20 + 1;
do
{
if ( !v6 )
{
cocos2d::CCNode::stopAllActions((cocos2d::CCNode *)v21);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v21 + 896LL))(v21, 0);
v15 = v15 + *(float *)(v21 + 612);
}
v24 = a2;
if ( *(_BYTE *)(v21 + 604) == 1 )
v24 = *(float *)(v21 + 608);
if ( v6 )
cocos2d::CCFadeOut::create(v24);
else
cocos2d::CCFadeIn::create(v24);
v25 = cocos2d::CCDelayTime::create(v15 + (float)((float)v13 * a3));
v26 = (cocos2d::CCAction *)sub_10018A494(v25);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v21, v26);
if ( a5 == Scale )
{
if ( v6 )
{
v27 = v24;
v28 = 1.4;
}
else
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v21 + 160LL))(v21, 1.4);
v27 = v24 * 0.5;
v28 = 1.0;
}
v29 = cocos2d::CCScaleTo::create_1(v27, v28);
v30 = cocos2d::CCDelayTime::create(v15 + (float)((float)v13 * a3));
cocos2d::CCEaseInOut::create(v29, 2.0);
v31 = (cocos2d::CCAction *)sub_10018A494(v30);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v21, v31);
}
v32 = *(unsigned __int8 *)(v21 + 604);
if ( *(int *)(v21 + 628) >= 1 )
{
v33 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 192LL))(v21);
sub_1000229D0((_QWORD *)(v21 + 632), v33);
v34 = cocos2d::CCDictionary::objectForKey(a1->m_shakeCharacters, *(int *)(v21 + 628));
if ( !v34 )
{
v34 = (cocos2d::CCObject *)sub_10024A15C(0);
cocos2d::CCDictionary::setObject(a1->m_shakeCharacters, v34, *(int *)(v21 + 628));
}
sub_10024A2D0(v34, v21);
v42 = 1;
}
v13 += v32 ^ 1;
if ( (unsigned __int64)v23 > v22 )
break;
v35 = *v23++;
v21 = v35;
}
while ( v35 );
}
else
{
v24 = 0.0;
}
if ( v12 == v39 )
{
v14 = v15 + (float)(v24 + (float)((float)v13 * a3));
v36 = cocos2d::CCDelayTime::create(v14);
v43.ptr = (void (*)(void))TextArea::finishFade;
v43.adj = 0;
cocos2d::CCCallFunc::create(a1, v43);
v37 = (cocos2d::CCAction *)sub_10018A494(v36);
cocos2d::CCNode::runAction(a1, v37);
}
++v12;
}
while ( v12 != v40 );
cocos2d::CCNode::unscheduleUpdate(a1);
if ( (v42 & 1) == 0 )
goto LABEL_35;
cocos2d::CCNode::scheduleUpdate(a1);
return v14;
}