//
// cocos2d::CCTextFieldTTF::draw from 0x10027cb60 to 0x10027cbfa (154 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008f05f0
//
// 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 __fastcall cocos2d::CCTextFieldTTF::draw(cocos2d::CCTextFieldTTF *a1)
{
__int64 v1; // rax
cocos2d::CCTextFieldDelegate *m_pDelegate; // rdi
std::string *m_pInputText; // rcx
unsigned int sizex2; // eax
__int64 v6; // rax
int v7; // [rsp+0h] [rbp-Ch] BYREF
v7 = HIDWORD(v1);
m_pDelegate = a1->m_pDelegate;
if ( !m_pDelegate
|| !((unsigned __int8 (__fastcall *)(cocos2d::CCTextFieldDelegate *, cocos2d::CCTextFieldTTF *))m_pDelegate->onDraw)(
m_pDelegate,
a1) )
{
m_pInputText = a1->m_pInputText;
sizex2 = m_pInputText->m_data.m_short.sizex2;
if ( (sizex2 & 1) != 0 )
{
if ( m_pInputText->m_data.m_long.size )
goto LABEL_5;
}
else if ( sizex2 >> 1 )
{
LABEL_5:
cocos2d::CCSprite::draw(a1);
return;
}
v6 = ((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))a1->getColor)(a1);
LOWORD(v7) = *(_WORD *)v6;
BYTE2(v7) = *(_BYTE *)(v6 + 2);
((void (__fastcall *)(cocos2d::CCTextFieldTTF *, cocos2d::ccColor3B *))a1->setColor)(a1, &a1->m_ColorSpaceHolder);
cocos2d::CCSprite::draw(a1);
((void (__fastcall *)(cocos2d::CCTextFieldTTF *, int *))a1->setColor)(a1, &v7);
}
}