//
// cocos2d::CCLabelAtlas::initWithString from 0x5cb2b0 to 0x5cb46c (444 bytes)
//
// 1 xrefs:
// > cocos2d::CCLabelAtlas::create @ 0x5cb4e2
//
// 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
//
bool cocos2d::CCLabelAtlas::initWithString(cocos2d::CCLabelAtlas *a1, const char *a2, const char *a3)
{
cocos2d::CCFileUtils *v5; // r0
int v6; // r0
int *v7; // r0
CCContentManager *v8; // r0
cocos2d::CCDictionary *v9; // r8
cocos2d::CCString *v10; // r0
cocos2d::CCString *v11; // r0
cocos2d::CCString *v12; // r0
int v13; // s17
cocos2d::CCDirector *v14; // r0
float v15; // s19
cocos2d::CCString *v16; // r0
int v17; // s16
cocos2d::CCDirector *v18; // r0
float v19; // s18
cocos2d::CCString *v20; // r0
unsigned int v21; // r7
const char *v22; // r0
char *CString; // [sp+8h] [bp-24h]
cocos2d::CCString *v25; // [sp+8h] [bp-24h]
_BYTE v27[4]; // [sp+14h] [bp-18h] BYREF
int v28; // [sp+18h] [bp-14h] BYREF
_BYTE v29[4]; // [sp+1Ch] [bp-10h] BYREF
const char *v30; // [sp+20h] [bp-Ch] BYREF
v5 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(_BYTE *, cocos2d::CCFileUtils *, const char *, _DWORD))v5->createCCArrayWithContentsOfFile)(
v27,
v5,
a3,
0);
v6 = sub_774B44((int)v27, "/");
sub_776158(&v30, v27, 0, v6);
v7 = (int *)sub_774544((int)&v30, "/");
v28 = *v7;
*v7 = (int)&unk_ACDDA8;
sub_774008(&v30);
v8 = CCContentManager::sharedManager();
v9 = CCContentManager::addDict(v8, a3, 0);
sub_776584((int)&v30, "version");
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((int)v9, &v30);
cocos2d::CCString::intValue(v10);
sub_774008(&v30);
sub_776584((int)&v30, "textureFilename");
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((int)v9, &v30);
CString = (char *)cocos2d::CCString::getCString(v11);
sub_775C20(v29);
sub_774544((int)v29, CString);
sub_774008(&v30);
v25 = (cocos2d::CCString *)cocos2d::CCString::create();
sub_776584((int)&v30, "itemWidth");
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((int)v9, &v30);
v13 = cocos2d::CCString::intValue(v12);
v14 = cocos2d::CCDirector::sharedDirector();
v15 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v14));
sub_774008(&v30);
sub_776584((int)&v30, "itemHeight");
v16 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((int)v9, &v30);
v17 = cocos2d::CCString::intValue(v16);
v18 = cocos2d::CCDirector::sharedDirector();
v19 = COERCE_FLOAT(cocos2d::CCDirector::getContentScaleFactor(v18));
sub_774008(&v30);
sub_776584((int)&v30, "firstChar");
v20 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey((int)v9, &v30);
v21 = cocos2d::CCString::intValue(v20);
sub_774008(&v30);
v22 = cocos2d::CCString::getCString(v25);
cocos2d::CCLabelAtlas::initWithString(
a1,
a2,
v22,
(unsigned int)(float)((float)v13 / v15),
(unsigned int)(float)((float)v17 / v19),
v21);
sub_774008(v29);
sub_774008(&v28);
sub_774008(v27);
return 1;
}