//
// TextArea::update from 0x2f4110 to 0x2f4252 (322 bytes)
//
// 0 xrefs:
//
// 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
//
void TextArea::update(TextArea *a1, float a2)
{
cocos2d::CCDictionary *m_shakeCharacters; // r3
cocos2d::CCDictElement *m_pElements; // r4
cocos2d::CCDictElement *next; // r6
cocos2d::CCArray *m_pObject; // r10
int v7; // r0
int v8; // r4
float m_shakeElapsed; // s15
int v10; // r0
float v11; // s16
int v12; // r0
cocos2d::ccArray *data; // r2
cocos2d::CCObject **arr; // r4
cocos2d::CCObject **v15; // r10
int v16; // r11
int v17; // t1
cocos2d::CCDictElement *v18; // r3
void (__fastcall *v19)(int, _BYTE *); // [sp+4h] [bp-20h]
cocos2d::CCPoint v20; // [sp+Ch] [bp-18h] BYREF
_BYTE v21[8]; // [sp+14h] [bp-10h] BYREF
m_shakeCharacters = a1->m_shakeCharacters;
a1->m_shakeElapsed = a1->m_shakeElapsed + a2;
if ( m_shakeCharacters )
{
m_pElements = m_shakeCharacters->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( m_pElements )
{
m_pObject = (cocos2d::CCArray *)m_pElements->m_pObject;
v7 = cocos2d::CCArray::objectAtIndex(m_pObject, 0);
v8 = v7;
if ( v7 )
{
m_shakeElapsed = a1->m_shakeElapsed;
if ( m_shakeElapsed > *(float *)(v7 + 536) )
{
*(float *)(v7 + 536) = m_shakeElapsed + *(float *)(v7 + 528);
v10 = rand();
v11 = (float)((float)((float)((float)v10 * 4.6566e-10) + (float)((float)v10 * 4.6566e-10)) - 1.0)
* *(float *)(v8 + 532);
v12 = rand();
cocos2d::CCPoint::CCPoint(
&v20,
v11 * 0.5,
(float)((float)((float)((float)((float)v12 * 4.6566e-10) + (float)((float)v12 * 4.6566e-10)) - 1.0)
* *(float *)(v8 + 532))
* 0.5);
if ( m_pObject )
{
data = m_pObject->data;
if ( data->num )
{
arr = data->arr;
v15 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v15 )
{
v17 = (int)*arr++;
v16 = v17;
if ( !v17 )
break;
v19 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::operator+(v21, v16 + 544, &v20);
v19(v16, v21);
}
}
}
}
}
if ( next )
v18 = (cocos2d::CCDictElement *)next->hh.next;
else
v18 = nullptr;
m_pElements = next;
next = v18;
}
}
}