//
// cocos2d::CCLabelTTF::_prepareTextDefinition from 0x7d6288 to 0x7d6408 (384 bytes)
//
// 2 xrefs:
// > cocos2d::CCLabelTTF::updateTexture @ 0x7d6436
// > cocos2d::CCLabelTTF::getTextDefinition @ 0x7d686c
//
// 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:39 +0000
//
cocos2d::CCLabelTTF *__fastcall cocos2d::CCLabelTTF::_prepareTextDefinition(cocos2d::CCLabelTTF *this, int a2, int a3)
{
float v6; // r0
float v7; // s16
cocos2d::CCDirector *v8; // r0
cocos2d::CCLabelTTF *v9; // r3
int v10; // r2
const void *v11; // r1
size_t v12; // r2
float v13; // s17
cocos2d::CCDirector *v14; // r0
float v15; // r0
float v16; // s16
float v17; // s17
cocos2d::CCDirector *v18; // r0
float v19; // r0
float *v20; // r0
float *v21; // r1
float v22; // r0
float v23; // s16
cocos2d::CCDirector *v24; // r0
float v25; // s17
cocos2d::CCDirector *v26; // r0
float v27; // r0
float v28; // s16
float v29; // s17
cocos2d::CCDirector *v30; // r0
float v31; // r0
float *v32; // r0
float *v33; // r1
int v34; // r3
float v36[2]; // [sp+4h] [bp-10h] BYREF
v6 = COERCE_FLOAT(cocos2d::_ccFontDefinition::_ccFontDefinition(this));
v7 = *(float *)(a2 + 532);
if ( a3 )
{
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v6));
v6 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v8));
v7 = v7 * v6;
}
*((_DWORD *)this + 3) = (int)v7;
v9 = *(cocos2d::CCLabelTTF **)(a2 + 528);
if ( this != v9 )
{
v10 = *(unsigned __int8 *)v9;
if ( (v10 & 1) != 0 )
{
v11 = *((const void **)v9 + 2);
v12 = *((_DWORD *)v9 + 1);
}
else
{
v11 = (char *)v9 + 1;
v12 = v10 >> 1;
}
v6 = COERCE_FLOAT(std::string::assign(this, v11, v12));
}
*((_DWORD *)this + 4) = *(_DWORD *)(a2 + 520);
*((_DWORD *)this + 5) = *(_DWORD *)(a2 + 524);
if ( a3 )
{
v13 = *(float *)(a2 + 512);
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v6));
v15 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v14));
v16 = *(float *)(a2 + 516);
v17 = v13 * v15;
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v15));
v19 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v18));
cocos2d::CCSize::CCSize(v36, v17, v16 * v19);
v20 = (float *)((char *)this + 24);
v21 = v36;
}
else
{
v21 = (float *)(a2 + 512);
v20 = (float *)((char *)this + 24);
}
v22 = COERCE_FLOAT(cocos2d::CCSize::operator=(v20, v21));
if ( *(_BYTE *)(a2 + 568) )
{
*((_BYTE *)this + 56) = 1;
*(_WORD *)((char *)this + 57) = *(_WORD *)(a2 + 569);
*((_BYTE *)this + 59) = *(_BYTE *)(a2 + 571);
v23 = *(float *)(a2 + 572);
if ( a3 )
{
v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v22));
v22 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v24));
v23 = v23 * v22;
}
*((float *)this + 15) = v23;
}
else
{
*((_BYTE *)this + 56) = 0;
}
if ( *(_BYTE *)(a2 + 548) )
{
*((_BYTE *)this + 36) = 1;
*((_DWORD *)this + 12) = *(_DWORD *)(a2 + 564);
*((_DWORD *)this + 13) = *(_DWORD *)(a2 + 560);
if ( a3 )
{
v25 = *(float *)(a2 + 552);
v26 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v22));
v27 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v26));
v28 = *(float *)(a2 + 556);
v29 = v25 * v27;
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v27));
v31 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v30));
cocos2d::CCSize::CCSize(v36, v29, v28 * v31);
v32 = (float *)((char *)this + 40);
v33 = v36;
}
else
{
v33 = (float *)(a2 + 552);
v32 = (float *)((char *)this + 40);
}
cocos2d::CCSize::operator=(v32, v33);
}
else
{
*((_BYTE *)this + 36) = 0;
}
v34 = *(_DWORD *)(a2 + 576);
*((_WORD *)this + 16) = v34;
*((_BYTE *)this + 34) = BYTE2(v34);
return this;
}