//
// cocos2d::CCTextFieldTTF::setPlaceHolder from 0x1001cbbd4 to 0x1001cbc88 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007ba090
//
// 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::setPlaceHolder(cocos2d::CCTextFieldTTF *a1, const char *a2)
{
std::string *m_pPlaceHolder; // x20
std::string *v5; // x0
std::string *capacitym1; // x20
std::string *m_pInputText; // x9
m_pPlaceHolder = a1->m_pPlaceHolder;
if ( m_pPlaceHolder )
{
if ( m_pPlaceHolder->m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)m_pPlaceHolder->m_data.m_long.capacitym1);
operator delete(m_pPlaceHolder);
a1->m_pPlaceHolder = nullptr;
}
v5 = (std::string *)operator new(0x18u);
capacitym1 = v5;
if ( a2 )
{
sub_100009900(v5, (char *)a2);
}
else
{
v5->m_data.m_long.capacitym1 = 0;
v5->m_data.m_long.size = 0;
v5->m_data.m_long.longStorage = nullptr;
}
a1->m_pPlaceHolder = capacitym1;
m_pInputText = a1->m_pInputText;
if ( (m_pInputText->m_data.m_short.shortStorage.__elems_[22] & 0x8000000000000000LL) != 0 )
{
if ( m_pInputText->m_data.m_long.size )
return;
}
else if ( m_pInputText->m_data.m_short.shortStorage.__elems_[22] )
{
return;
}
if ( capacitym1->m_data.m_short.shortStorage.__elems_[22] < 0 )
capacitym1 = (std::string *)capacitym1->m_data.m_long.capacitym1;
cocos2d::CCLabelTTF::setString(a1, (const char *)capacitym1);
}