//
// TextArea::fadeInCharacters from 0x1400778c0 to 0x140077d11 (1105 bytes)
//
// 6 xrefs:
// > DialogLayer::displayDialogObject @ 0x1400d3dbe
// > SecretLayer5::fadeInSubmitMessage @ 0x1403f533e
// > SecretLayer5::fadeOutMessage @ 0x1403f53c6
// > ??> @ 0x1406676c8
// > ??> @ 0x140667718
// > ??> @ 0x1406c6594
//
// 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 TextArea::fadeInCharacters(TextArea *a1, float a2, float a3, bool a4, TextFadeInStyle a5)
{
float v5; // xmm3_4
cocos2d::CCDictionary *m_shakeCharacters; // rcx
float v8; // xmm12_4
char v9; // bl
int v10; // ebp
float v12; // xmm8_4
cocos2d::CCDictionary *v14; // rax
int v15; // esi
cocos2d::ccArray *data; // rcx
__int64 num; // rax
__int64 v18; // r14
float v19; // ebx
__int64 v20; // rdi
cocos2d::CCObject *v21; // rcx
__int64 v22; // rax
float v23; // xmm7_4
unsigned int *v24; // r14
__int64 v25; // rax
cocos2d::CCNode **v26; // r14
cocos2d::CCNode **v27; // r12
cocos2d::CCNode *v28; // rdi
float v29; // xmm6_4
void *v30; // rax
void *v31; // rbx
struct cocos2d::CCDelayTime *v32; // rax
struct cocos2d::CCSequence *v33; // rax
cocos2d::ccColor3B *v34; // r8
float v35; // xmm1_4
float v36; // xmm0_4
struct cocos2d::CCScaleTo *v37; // rax
struct cocos2d::CCEaseInOut *v38; // rbx
struct cocos2d::CCDelayTime *v39; // rax
struct cocos2d::CCSequence *v40; // rax
cocos2d::ccColor3B *v41; // r8
int v42; // esi
__int64 v43; // rax
__int64 v44; // rcx
cocos2d::CCArray *v45; // rbx
struct cocos2d::CCDelayTime *v46; // rbx
__int64 v47; // rax
struct cocos2d::CCSequence *v48; // rax
cocos2d::ccColor3B *v49; // r8
float v51; // [rsp+20h] [rbp-E8h]
int v52; // [rsp+24h] [rbp-E4h]
__int64 v53; // [rsp+28h] [rbp-E0h]
__int64 v54; // [rsp+30h] [rbp-D8h]
cocos2d::ccArray *v55; // [rsp+38h] [rbp-D0h]
char v56; // [rsp+110h] [rbp+8h]
m_shakeCharacters = a1->m_shakeCharacters;
v8 = 0.0;
v9 = 0;
v10 = 0;
v12 = 0.0;
v56 = 0;
if ( m_shakeCharacters )
{
cocos2d::CCObject::release(m_shakeCharacters);
a1->m_shakeCharacters = nullptr;
}
v14 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create();
a1->m_shakeCharacters = v14;
cocos2d::CCObject::retain(v14);
v15 = 0;
v52 = 0;
data = a1->m_label->getChildren(a1->m_label)->data;
v55 = data;
num = (int)data->num;
v53 = num;
v18 = num;
if ( (int)num > 0 )
{
LODWORD(v19) = num - 1;
v20 = 0;
v54 = 0;
LODWORD(v51) = num - 1;
do
{
v21 = data->arr[v20];
v22 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v21->__vftable[6].update)(v21);
v23 = 0.0;
if ( v22 )
{
v24 = *(unsigned int **)(v22 + 56);
v25 = *v24;
if ( (_DWORD)v25 )
{
v26 = *((cocos2d::CCNode ***)v24 + 2);
v27 = &v26[v25 - 1];
if ( v26 <= v27 )
{
do
{
v28 = *v26;
if ( !*v26 )
break;
if ( !a4 )
{
cocos2d::CCNode::stopAllActions(*v26);
v28[1].encodeWithCoder(v28 + 1, nullptr);
v12 = v12 + *(float *)&v28[1].m_nUpdateScriptHandler;
}
v23 = a2;
if ( v28[1].m_bReorderChildDirty )
v23 = *(float *)&v28[1].m_nScriptHandler;
v29 = (float)((float)v10 * a3) + v12;
if ( a4 )
v30 = cocos2d::CCFadeOut::create(v23);
else
v30 = cocos2d::CCFadeIn::create(v23);
v31 = v30;
v32 = cocos2d::CCDelayTime::create(v29);
v33 = cocos2d::CCSequence::create(v32, v31, 0);
cocos2d::CCNode::runAction((CCLightFlash *)v28, (cocos2d::CCPoint)v33, v34, v5, v51);
if ( a5 == Scale )
{
v35 = 1.4;
if ( a4 )
{
v36 = v23;
}
else
{
((void (__fastcall *)(cocos2d::CCNode *))v28->setScale_0)(v28);
v35 = 1.0;
v36 = v23 * 0.5;
}
v37 = cocos2d::CCScaleTo::create(v36, v35);
v38 = cocos2d::CCEaseInOut::create(v37, 2.0);
v39 = cocos2d::CCDelayTime::create(v29);
v40 = cocos2d::CCSequence::create(v39, v38, 0);
cocos2d::CCNode::runAction((CCLightFlash *)v28, (cocos2d::CCPoint)v40, v41, v5, v51);
}
v42 = v10 + 1;
if ( v28[1].m_bReorderChildDirty )
v42 = v10;
if ( *(int *)&v28[1].m_bUseChildIndex > 0 )
{
v43 = (__int64)v28->getPosition_0(v28);
cocos2d::CCPoint::operator=(&v28[1].m_bUnkBool2 + 3, v43);
v45 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(
a1->m_shakeCharacters,
*(int *)&v28[1].m_bUseChildIndex);
if ( !v45 )
{
v45 = (cocos2d::CCArray *)cocos2d::CCArray::create(v44);
cocos2d::CCDictionary::setObject(a1->m_shakeCharacters, v45, *(int *)&v28[1].m_bUseChildIndex);
}
cocos2d::CCArray::addObject(v45, v28);
v56 = 1;
}
++v26;
v10 = v42;
}
while ( v26 <= v27 );
v20 = v54;
v15 = v52;
v19 = v51;
}
}
v18 = v53;
}
if ( v15 == LODWORD(v19) )
{
v8 = (float)((float)((float)v10 * a3) + v23) + v12;
v46 = cocos2d::CCDelayTime::create(v8);
v47 = cocos2d::CCCallFunc::create(a1, TextArea::finishFade);
v48 = cocos2d::CCSequence::create(v46, v47, 0);
cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v48, v49, v5, v51);
v19 = v51;
}
data = v55;
++v15;
++v20;
v52 = v15;
v54 = v20;
}
while ( v20 < v18 );
v9 = v56;
}
cocos2d::CCNode::unscheduleUpdate(a1);
if ( v9 )
cocos2d::CCNode::scheduleUpdate(a1);
else
cocos2d::CCNode::unscheduleUpdate(a1);
return v8;
}