//
// LevelCell::loadCustomLevelCell from 0x10024f4e0 to 0x100251d06 (10278 bytes)
//
// 1 xrefs:
// > LevelCell::loadFromLevel @ 0x1002447f5
//
// 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 LevelCell::loadCustomLevelCell(LevelCell *a1)
{
__int64 v1; // xmm0_8
GJGameLevel *m_level; // rax
float v3; // r13d
int random; // r15d
int seed; // r12d
bool m_compactView; // r14
const char *data; // rdi
cocos2d::CCLabelBMFont *v8; // rbx
const char *v9; // rdi
int v10; // r13d
LevelCell *v11; // r15
cocos2d::CCLabelBMFont_vtbl *v12; // rax
float v13; // xmm0_4
int v14; // r12d
int v15; // r13d
GameLevelManager *v16; // rax
GameLevelManager *v17; // rax
cocos2d::CCObject_vtbl *v18; // rax
bool v19; // bl
const char *v20; // r9
cocos2d::CCSprite *v21; // rax
cocos2d::CCObject *v22; // r14
ButtonSprite *v23; // rbx
__int128 v24; // xmm0
const char *v25; // rdi
int v26; // esi
GameStatsManager *v27; // rax
CCMenuItemSpriteExtra *v28; // rax
int v29; // xmm0_4
LevelCell *v30; // r14
float *v31; // rax
cocos2d::CCPoint *p_m_point; // r15
CCMenuItemSpriteExtra *m_button; // rbx
LevelCell *v34; // rbx
cocos2d::CCSprite *v35; // rax
ButtonSprite *v36; // rbx
CCMenuItemSpriteExtra *v37; // rbx
__int64 v38; // r14
cocos2d::CCSprite *v39; // rax
ButtonSprite *v40; // rbx
CCMenuItemSpriteExtra *v41; // rbx
__int64 v42; // r14
cocos2d::CCSprite *v43; // rax
ButtonSprite *v44; // rbx
CCMenuItemSpriteExtra *v45; // rbx
__int64 v46; // r14
ButtonSprite *v47; // rax
LevelCell *v48; // r14
CCMenuItemSpriteExtra *v49; // rbx
const cocos2d::CCPoint *m_mainMenu; // r14
bool v51; // r14
GameLevelManager *v52; // rax
cocos2d::CCObject_vtbl *v53; // rax
const std::string::value_type *v54; // rsi
std::string::size_type size; // rdx
const char *v56; // rdi
cocos2d::CCLabelBMFont *v57; // r15
__int64 v58; // rbx
float v59; // xmm0_4
double v60; // xmm0_8
float v61; // xmm0_4
CCMenuItemSpriteExtra *v62; // rbx
float *v63; // rax
int v64; // xmm0_4
float *v65; // rax
MusicDownloadManager *v66; // rax
SongInfoObject *SongInfoObject; // rax
SongInfoObject *v68; // r14
int m_nongType; // eax
const char *v70; // rdi
cocos2d::CCSprite *v71; // rbx
float v72; // xmm0_4
int v73; // xmm1_4
const char *v74; // rdi
cocos2d::CCLabelBMFont *v75; // r15
int AverageDifficulty; // ebx
cocos2d::CCObject_vtbl *v77; // rax
cocos2d::CCString *v78; // rax
cocos2d::CCNode *v79; // r14
__int64 v80; // r14
__int64 v81; // r14
cocos2d::CCObject_vtbl *v82; // rax
bool v83; // cl
bool v84; // dl
float v85; // xmm0_4
GJDifficultySprite *v86; // rbx
GameStatsManager *v87; // rax
LevelCell *v88; // r14
bool hasCompletedStarLevel; // bl
const char *v90; // rdi
cocos2d::CCSprite *v91; // r14
cocos2d::CCString *v92; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v94; // r15
__int64 v95; // r14
cocos2d::CCSprite *v96; // r14
GameStatsManager *v97; // rax
int BaseDiamonds; // ebx
GameStatsManager *v99; // rax
int AwardedDiamondsForLevel; // r13d
cocos2d::CCString *v101; // rax
const char *v102; // rax
const char *v103; // rdi
cocos2d::CCObject_vtbl *v104; // rdi
int encodeWithCoder; // eax
int v106; // xmm0_4
cocos2d::CCLabelBMFont *v107; // r15
float v108; // xmm0_4
__int64 v109; // r14
int v110; // r13d
__int64 v111; // xmm0_8
const char *CoinKey; // r14
size_t v113; // rax
std::string::size_type v114; // r15
char *v115; // r12
__int64 v116; // rbx
size_t v117; // rbx
GameStatsManager *v118; // rax
const char *v119; // rsi
bool hasPendingUserCoin; // r14
GameStatsManager *v121; // rax
const char *v122; // rsi
cocos2d::CCSprite *v123; // r15
cocos2d::CCLabelBMFont *v124; // rbx
__int64 v125; // r12
float v126; // xmm0_4
int v127; // eax
float *v128; // rax
bool v129; // zf
float v130; // xmm1_4
int v131; // xmm0_4
cocos2d::CCSprite *v132; // rbx
cocos2d::CCSprite *v133; // r13
__int64 v134; // r14
const char *v135; // r12
cocos2d::CCSprite *v136; // r15
__int64 v137; // r14
unsigned int *v138; // rax
int v139; // ecx
bool v140; // zf
float v141; // xmm0_4
const char *v142; // rdi
cocos2d::CCLabelBMFont *v143; // r14
__int64 v144; // rbx
__int64 v145; // rax
const char *v146; // rdi
cocos2d::CCLabelBMFont *v147; // rbx
__int64 v148; // r14
int v149; // r14d
cocos2d::CCSpriteFrameCache *v150; // rax
cocos2d::CCSpriteFrame *v151; // rax
__int64 v152; // rax
const char *v153; // rdi
cocos2d::CCLabelBMFont *v154; // r14
__int64 v155; // rbx
cocos2d::CCSprite *v156; // rbx
__int64 v157; // r12
__int64 v158; // rax
GameStatsManager *v159; // rax
int BaseCurrencyForLevel; // r13d
GameStatsManager *v161; // rax
int AwardedCurrencyForLevel; // r14d
int v163; // r12d
cocos2d::CCString *v164; // rax
const char *v165; // rax
const char *v166; // rdi
cocos2d::CCLabelBMFont *v167; // r13
__int64 v168; // rbx
__int64 v169; // rbx
cocos2d::CCLabelBMFont *v170; // rbx
__int64 v171; // rax
cocos2d::CCSprite *v172; // rbx
cocos2d::CCString *v173; // rax
const char *v174; // rax
cocos2d::CCLabelBMFont *v175; // rbx
__int64 v176; // xmm0_8
bool v177; // al
cocos2d::CCLabelBMFont *v178; // rbx
float v179; // xmm0_4
cocos2d::CCObject_vtbl *v180; // rax
cocos2d::CCSprite *v181; // rbx
cocos2d::CCSprite *v182; // rbx
cocos2d::CCObject_vtbl *v183; // rax
char v184[8]; // [rsp+0h] [rbp-110h] BYREF
GJGameLevel *SavedLevel; // [rsp+8h] [rbp-108h]
float v186; // [rsp+14h] [rbp-FCh]
_DWORD v187[2]; // [rsp+18h] [rbp-F8h] BYREF
cocos2d::CCLabelBMFont *v188; // [rsp+20h] [rbp-F0h]
cocos2d::CCLabelBMFont *v189; // [rsp+28h] [rbp-E8h]
std::string v190; // [rsp+30h] [rbp-E0h] BYREF
std::string m_levelName; // [rsp+50h] [rbp-C0h] BYREF
float v192; // [rsp+68h] [rbp-A8h] BYREF
float v193; // [rsp+70h] [rbp-A0h]
_BYTE v194[4]; // [rsp+74h] [rbp-9Ch] BYREF
float v195; // [rsp+78h] [rbp-98h]
float v196; // [rsp+7Ch] [rbp-94h]
__int128 v197; // [rsp+80h] [rbp-90h]
float v198; // [rsp+94h] [rbp-7Ch]
cocos2d::CCLabelBMFont *v199; // [rsp+98h] [rbp-78h]
_BYTE v200[11]; // [rsp+A0h] [rbp-70h] BYREF
bool hasCompletedLevel; // [rsp+ABh] [rbp-65h]
float v202; // [rsp+ACh] [rbp-64h]
std::string __s; // [rsp+B0h] [rbp-60h] BYREF
__int16 v204; // [rsp+D0h] [rbp-40h] BYREF
char v205; // [rsp+D2h] [rbp-3Eh]
LevelCell *v206; // [rsp+D8h] [rbp-38h]
float m_width; // [rsp+E4h] [rbp-2Ch]
double v208; // 0:xmm0_8.8
double v209; // 0:xmm0_8.8
double v210; // 0:xmm0_8.8
m_level = a1->m_level;
v3 = *(float *)&m_level->m_levelLength;
random = m_level->m_dailyID.random;
seed = m_level->m_dailyID.seed;
v206 = a1;
m_compactView = a1->m_compactView;
if ( m_compactView )
{
GameToolbox::intToString(&m_levelName, (unsigned int)m_level->m_listPosition);
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) != 0 )
data = m_levelName.__r_.__value_.__l.__data_;
else
data = m_levelName.__r_.__value_.__s.__data_;
v8 = cocos2d::CCLabelBMFont::create_3(data, "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v8);
cocos2d::CCLabelBMFont::limitLabelWidth(v8, 20.0, 0.44999999, 0.0);
v1 = 1098907648;
sub_10028CBE0(&v190, 16.0, v206->m_height * 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v8->setPosition)(v8, &v190);
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) != 0 )
operator delete(m_levelName.__r_.__value_.__l.__data_);
m_level = v206->m_level;
}
if ( (m_level->m_levelName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&m_levelName,
m_level->m_levelName.m_data.m_long.longStorage,
m_level->m_levelName.m_data.m_long.size,
*(double *)&v1);
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_10;
}
else
{
m_levelName = (std::string)m_level->m_levelName;
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_10:
v9 = m_levelName.__r_.__value_.__s.__data_;
goto LABEL_13;
}
}
v9 = m_levelName.__r_.__value_.__l.__data_;
LABEL_13:
v202 = v3;
LODWORD(v197) = seed;
v188 = cocos2d::CCLabelBMFont::create_3(v9, "bigFont.fnt");
v10 = random;
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) != 0 )
operator delete(m_levelName.__r_.__value_.__l.__data_);
v11 = v206;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v188);
sub_10028CBE0(&m_levelName, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v188->setAnchorPoint)(v188, &m_levelName);
v12 = v188->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
m_width = 1.0;
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v12->setScale)(v188);
if ( v11->m_compactView )
{
if ( m_compactView )
v13 = 65.0;
else
v13 = 50.0;
v14 = v10;
sub_10028CBE0(&m_levelName, v13, (float)(v206->m_height * 0.5) + 16.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v188->setPosition)(v188, &m_levelName);
cocos2d::CCLabelBMFont::limitLabelWidth(v188, 120.0, 0.5, 0.0);
}
else
{
sub_10028CBE0(&m_levelName, 50.0, (float)(v11->m_height * 0.5) + 30.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v188->setPosition)(v188, &m_levelName);
cocos2d::CCLabelBMFont::limitLabelWidth(v188, 190.0, 0.80000001, 0.0);
v14 = v10;
}
v15 = v197;
memset(&m_levelName, 0, sizeof(m_levelName));
if ( v14 <= (int)v197 )
{
v17 = GameLevelManager::sharedState();
SavedLevel = GameLevelManager::getSavedLevel(v17, v206->m_level->m_levelID.random - v206->m_level->m_levelID.seed);
}
else
{
v16 = GameLevelManager::sharedState();
SavedLevel = GameLevelManager::getSavedDailyLevel(
v16,
v206->m_level->m_dailyID.random - v206->m_level->m_dailyID.seed);
}
v18 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( HIDWORD(v18[12].getTag) == 2 )
goto LABEL_39;
if ( ((__int64)v18[4].setTag & 1) != 0 )
sub_100006B70(&v190, v18[5].~CCObject, (unsigned __int64)v18[5].copyWithZone, 0.0);
else
v190 = *(std::string *)&v18[4].setTag;
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 )
{
v19 = 1;
if ( v190.__r_.__value_.__l.__size_ )
goto LABEL_37;
}
else
{
v19 = 1;
if ( *(_BYTE *)&v190.__r_.__value_.__l.0 >> 1 )
goto LABEL_37;
}
if ( !SavedLevel )
{
v19 = 0;
LABEL_37:
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_234;
goto LABEL_38;
}
if ( !SavedLevel->m_levelNotDownloaded )
{
v19 = SavedLevel->m_levelVersion == v206->m_level->m_levelVersion;
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_234;
LABEL_38:
if ( !v19 )
goto LABEL_235;
LABEL_39:
std::string::assign(&m_levelName, "View");
v20 = "GJ_button_01.png";
goto LABEL_40;
}
v19 = 0;
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_38;
LABEL_234:
operator delete(v190.__r_.__value_.__l.__data_);
if ( v19 )
goto LABEL_39;
LABEL_235:
v183 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( SHIDWORD(v183[8].acceptVisitor) < 23 )
{
if ( !SavedLevel
|| SavedLevel->m_levelNotDownloaded
|| SavedLevel->m_levelVersion >= SLODWORD(v183[8].acceptVisitor) )
{
std::string::assign(&m_levelName, "Get It");
v20 = "GJ_button_02.png";
}
else
{
std::string::assign(&m_levelName, "Update");
v20 = "GJ_button_03.png";
}
}
else
{
std::string::assign(&m_levelName, "NA");
v20 = "GJ_button_04.png";
}
LABEL_40:
if ( v14 <= v15 )
{
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) != 0 )
v25 = m_levelName.__r_.__value_.__l.__data_;
else
v25 = m_levelName.__r_.__value_.__s.__data_;
v22 = v206;
v26 = 50;
if ( v206->m_compactView )
v26 = 40;
v23 = ButtonSprite::create_1(v25, v26, 0, 0.60000002, 1, "bigFont.fnt", v20, 30.0);
v27 = GameStatsManager::sharedState();
hasCompletedLevel = GameStatsManager::hasCompletedLevel(v27, (GJGameLevel *)v22[10].__vftable);
v24 = 0;
}
else
{
v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
v22 = v206;
v23 = (ButtonSprite *)v21;
((void (__fastcall *)(cocos2d::CCSprite *, float))v21->setScale)(v21, 0.69999999);
hasCompletedLevel = HIDWORD(v22[10].__vftable[9].isEqual) - LODWORD(v22[10].__vftable[9].acceptVisitor) >= 100;
v24 = 0x41900000u;
}
v197 = v24;
v28 = CCMenuItemSpriteExtra::create(v23, nullptr, v22, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onClick);
*(_QWORD *)&v22[9].m_uOrderOfArrival = v28;
if ( v14 <= v15 )
{
if ( v206->m_level->m_localOrSaved )
*(float *)&v29 = 1.0;
else
*(float *)&v29 = 1.4;
m_width = *(float *)&v29;
}
CCMenuItemSpriteExtra::setSizeMult(v28, m_width);
v30 = v206;
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v206->m_button->setTag)(v206->m_button, 0);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v30->m_mainMenu->addChild)(
v30->m_mainMenu,
v30->m_button);
m_width = v30->m_width;
v31 = (float *)((__int64 (__fastcall *)(ButtonSprite *))v23->getContentSize)(v23);
sub_10028CBE0(&v190, (float)((float)(m_width - (float)(*v31 * 0.5)) + -9.0) + *(float *)&v197, 0.5 * v30->m_height);
p_m_point = &v30->m_point;
sub_10028CC90();
m_button = v30->m_button;
*(cocos2d::CCPoint *)&v208 = cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)&v190,
(const cocos2d::CCPoint *)v30->m_mainMenu);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))m_button->setPosition)(m_button, &v190, v208);
v34 = v206;
if ( v206->m_listType == Level4 )
{
v35 = cocos2d::CCSprite::createWithSpriteFrameName("edit_flipYBtn_001.png");
v36 = ButtonSprite::create(v35, 30, 0, 30.0, 1.0, 1, "GJ_button_05.png", 0);
((void (__fastcall *)(ButtonSprite *, float))v36->setScale)(v36, 0.60000002);
v37 = CCMenuItemSpriteExtra::create(
v36,
nullptr,
v206,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onClick);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v37->setTag)(v37, 3);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v206->m_mainMenu->addChild)(v206->m_mainMenu, v37);
v38 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v206->m_button->getPosition)(v206->m_button);
sub_10028CBE0(&__s, 16.0, -8.0);
sub_10028CCE0(&v190, v38);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *))v37->setPosition)(v37, &v190);
v39 = cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png");
v40 = ButtonSprite::create(v39, 30, 0, 30.0, 1.0, 1, "GJ_button_06.png", 0);
((void (__fastcall *)(ButtonSprite *, float))v40->setScale)(v40, 0.60000002);
v41 = CCMenuItemSpriteExtra::create(
v40,
nullptr,
v206,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onClick);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v41->setTag)(v41, 2);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v206->m_mainMenu->addChild)(v206->m_mainMenu, v41);
v42 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v206->m_button->getPosition)(v206->m_button);
sub_10028CBE0(&__s, -12.0, -8.0);
sub_10028CCE0(&v190, v42);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *))v41->setPosition)(v41, &v190);
v43 = cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
v44 = ButtonSprite::create(v43, 30, 0, 30.0, 1.0, 1, "GJ_button_01.png", 0);
((void (__fastcall *)(ButtonSprite *, float))v44->setScale)(v44, 0.60000002);
v45 = CCMenuItemSpriteExtra::create(
v44,
nullptr,
v206,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onClick);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v45->setTag)(v45, 1);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v206->m_mainMenu->addChild)(v206->m_mainMenu, v45);
v46 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v206->m_button->getPosition)(v206->m_button);
sub_10028CBE0(&__s, -40.0, -8.0);
sub_10028CCE0(&v190, v46);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *))v45->setPosition)(v45, &v190);
v47 = ButtonSprite::create_1("Delete", 40, 0, 0.60000002, 1, "bigFont.fnt", "GJ_button_06.png", 30.0);
v48 = v206;
v49 = CCMenuItemSpriteExtra::create(
v47,
nullptr,
v206,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onClick);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v49->setTag)(v49, 4);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v48->m_mainMenu->addChild)(v48->m_mainMenu, v49);
m_mainMenu = (const cocos2d::CCPoint *)v48->m_mainMenu;
sub_10028CBE0(v187, -*(float *)&v197, 0.0);
sub_10028CCE0(&__s, p_m_point);
*(cocos2d::CCPoint *)&v209 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v190, m_mainMenu);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v49->setPosition)(v49, &v190, v209);
v34 = v206;
LevelCell::updateCellMode(v206, v206->m_cellMode);
}
if ( v34->m_level->m_accountID.random <= v34->m_level->m_accountID.seed )
{
v52 = GameLevelManager::sharedState();
v51 = GameLevelManager::accountIDForUserID(v52, v206->m_level->m_userID.random - v206->m_level->m_userID.seed) == 0;
}
else
{
v51 = 0;
}
memset(&v190, 0, sizeof(v190));
if ( !v206->m_compactView )
std::string::append(&v190, "By ");
v53 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( ((__int64)v53[5].~CCObject_0 & 1) != 0 )
sub_100006B70(&__s, v53[5].acceptVisitor, (unsigned __int64)v53[5].isEqual, 0.0);
else
__s = *(std::string *)&v53[5].~CCObject_0;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
{
v54 = __s.__r_.__value_.__l.__data_;
size = __s.__r_.__value_.__l.__size_;
}
else
{
size = *(_BYTE *)&__s.__r_.__value_.__l.0 >> 1;
v54 = __s.__r_.__value_.__s.__data_;
}
std::string::append(&v190, v54, size);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 )
v56 = v190.__r_.__value_.__l.__data_;
else
v56 = v190.__r_.__value_.__s.__data_;
v189 = cocos2d::CCLabelBMFont::create_3(v56, "goldFont.fnt");
sub_10028CC30(v187);
if ( v206->m_compactView )
{
cocos2d::CCLabelBMFont::limitLabelWidth(v189, 80.0, 0.44999999, 0.0);
v57 = v188;
v58 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
m_width = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v57->getContentSize)(v57);
LODWORD(v197) = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getScale)(v188);
LODWORD(v199) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v189->getContentSize)(v189);
v59 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v189->getScale)(v189);
sub_10028CBE0(
&v192,
(float)((float)(m_width * *(float *)&v197) + (float)((float)(*(float *)&v199 * 0.5) * v59)) + 5.0,
0.0);
}
else
{
cocos2d::CCLabelBMFont::limitLabelWidth(v189, 140.0, 0.69999999, 0.0);
v58 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
m_width = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v189->getContentSize)(v189);
v61 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v189->getScale)(v189);
sub_10028CBE0(&v192, (float)((float)(m_width * 0.5) * v61) + 2.0, -22.0);
}
sub_10028CCE0(&__s, v58);
v60 = sub_10028CC90();
v62 = CCMenuItemSpriteExtra::create(
v189,
nullptr,
v206,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelCell::onViewProfile);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *, double))v206->m_mainMenu->addChild)(
v206->m_mainMenu,
v62,
v60);
*(cocos2d::CCPoint *)&v210 = cocos2d::CCNode::convertToNodeSpace(
(cocos2d::CCNode *)&__s,
(const cocos2d::CCPoint *)v206->m_mainMenu);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v62->setPosition)(v62, &__s, v210);
if ( v51 )
{
__s.__r_.__value_.__s.__data_[1] = -1;
*(_WORD *)&__s.__r_.__value_.__l.0 = -166;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v189->setColor)(v189, &__s);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v62->setEnabled)(v62, 0);
}
sub_10028CC30(&v192);
if ( v206->m_compactView )
{
v63 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
sub_10028CBE0(&__s, *v63 + 1.0, (float)(v206->m_height * 0.5) + -1.0);
sub_10028CC90();
m_width = 150.0;
v64 = 1052266988;
}
else
{
v65 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
sub_10028CBE0(&__s, *v65 + 2.0, (float)(v206->m_height * 0.5) + -12.0);
sub_10028CC90();
m_width = 195.0;
v64 = 1055286886;
}
LODWORD(v197) = v64;
v66 = MusicDownloadManager::sharedState();
SongInfoObject = MusicDownloadManager::getSongInfoObject(v66, v206->m_level->m_songID);
v68 = SongInfoObject;
if ( SongInfoObject )
{
m_nongType = SongInfoObject->m_nongType;
if ( m_nongType > 0 )
{
v70 = "ncs_small_001.png";
if ( m_nongType == 2 )
v70 = "chompo_small_001.png";
v71 = cocos2d::CCSprite::createWithSpriteFrameName(v70);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v71);
sub_10028CBE0(v194, 14.0, -1.0);
sub_10028CCE0(&__s, &v192);
if ( v68->m_nongType == 2 )
{
_mm_storel_ps((double *)&__s, _mm_add_ps((__m128)__s.__r_.__value_.__r.__words[0], (__m128)xmmword_100818030));
v72 = v192 + 40.0;
v73 = -1046478848;
}
else
{
v72 = v192 + 34.0;
v73 = -1049624576;
}
LODWORD(v199) = v73;
v192 = v72;
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v71->setPosition)(v71, &__s);
m_width = m_width + *(float *)&v199;
}
}
GJGameLevel::getSongName(&__s);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v74 = __s.__r_.__value_.__l.__data_;
else
v74 = __s.__r_.__value_.__s.__data_;
v75 = cocos2d::CCLabelBMFont::create_3(v74, "bigFont.fnt");
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v75);
sub_10028CBE0(&__s, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v75->setAnchorPoint)(v75, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float *))v75->setPosition)(v75, &v192);
cocos2d::CCLabelBMFont::limitLabelWidth(v75, m_width, *(float *)&v197, 0.0);
if ( v206->m_level->m_songID <= 0 )
{
__s.__r_.__value_.__s.__data_[1] = -1;
*(_WORD *)&__s.__r_.__value_.__l.0 = -11736;
}
else
{
__s.__r_.__value_.__s.__data_[1] = -1;
*(_WORD *)&__s.__r_.__value_.__l.0 = -32001;
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v75->setColor)(v75, &__s);
AverageDifficulty = GJGameLevel::getAverageDifficulty(v206->m_level);
v77 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( LODWORD(v77[10].~CCObject_0) - HIDWORD(v77[10].~CCObject_0) == 1 )
AverageDifficulty = GJGameLevel::demonIconForDifficulty(SHIDWORD(v77[10].isEqual));
v78 = (cocos2d::CCString *)sub_1007AB580("difficulty_%02d_btn_001.png", v184[0]);
cocos2d::CCString::getCString(v78);
v79 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCNode *, __int64))v206->m_mainLayer->addChild_0)(
v206->m_mainLayer,
v79,
2);
((void (__fastcall *)(cocos2d::CCNode *, void *))v79->setContentSize)(v79, &unk_10099F570);
*(_QWORD *)&v197 = v79;
sub_10028CBE0(&__s, 26.0, v206->m_height * 0.5);
(*(void (__fastcall **)(_QWORD, std::string *))(*(_QWORD *)v197 + 184LL))(v197, &__s);
if ( v206->m_compactView )
{
v80 = v197;
(*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)v197 + 160LL))(v197, 0.69999999);
v81 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v80 + 192LL))(v80);
sub_10028CBE0(v194, 18.0, 1.0);
sub_10028CCE0(&__s, v81);
(*(void (__fastcall **)(_QWORD, std::string *))(*(_QWORD *)v197 + 184LL))(v197, &__s);
}
sub_10028CBE0(v194, 0.0, 0.0);
v82 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( SLODWORD(v82[10].encodeWithCoder) <= 0 )
{
v84 = SLODWORD(v82[10].acceptVisitor) > SHIDWORD(v82[10].acceptVisitor);
v83 = 0;
}
else
{
v83 = !v206->m_compactView;
v84 = SLODWORD(v82[10].acceptVisitor) > SHIDWORD(v82[10].acceptVisitor);
if ( v83 && v84 )
{
v85 = 14.0;
goto LABEL_105;
}
}
if ( !v83 && !v84 )
goto LABEL_106;
v85 = 5.0;
LABEL_105:
v195 = v85 + v195;
LABEL_106:
if ( v14 > v15 )
v195 = v195 + 10.0;
if ( BYTE4(v82[10].update) )
AverageDifficulty = -1;
v86 = GJDifficultySprite::create(AverageDifficulty, Short);
GJDifficultySprite::updateFeatureStateFromLevel(v86, v206->m_level);
(*(void (__fastcall **)(_QWORD, GJDifficultySprite *, __int64))(*(_QWORD *)v197 + 448LL))(v197, v86, 3);
((void (__fastcall *)(GJDifficultySprite *, _BYTE *))v86->setPosition)(v86, v194);
v199 = v75;
v87 = GameStatsManager::sharedState();
v88 = v206;
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v87, v206->m_level);
if ( v88->m_level->m_stars.random > v88->m_level->m_stars.seed )
{
v90 = "star_small01_001.png";
if ( LODWORD(v202) == 5 )
v90 = "moon_small01_001.png";
v91 = cocos2d::CCSprite::createWithSpriteFrameName(v90);
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *))(*(_QWORD *)v197 + 440LL))(v197, v91);
sub_10028CBE0(&v204, 8.0, -30.0);
sub_10028CCE0(&__s, v194);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v91->setPosition)(v91, &__s);
v92 = (cocos2d::CCString *)sub_1007AB580("%i", v184[0]);
CString = cocos2d::CCString::getCString(v92);
v94 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(*(_QWORD *)v197 + 440LL))(v197, v94);
sub_10028CBE0(&__s, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v94->setAnchorPoint)(v94, &__s);
v95 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v91->getPosition)(v91);
sub_10028CBE0(&v204, -8.0, 0.0);
sub_10028CCE0(&__s, v95);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v94->setPosition)(v94, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v94->setScale)(v94, 0.40000001);
if ( hasCompletedStarLevel )
{
__s.__r_.__value_.__s.__data_[1] = 50;
*(_WORD *)&__s.__r_.__value_.__l.0 = -1;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v94->setColor)(v94, &__s);
}
}
if ( v14 <= v15 )
{
v104 = (cocos2d::CCObject_vtbl *)v206->m_level;
encodeWithCoder = (int)v104[10].encodeWithCoder;
if ( encodeWithCoder > 0 )
{
v106 = *(_DWORD *)&aFffO[4 * (SLODWORD(v104[10].acceptVisitor) > SHIDWORD(v104[10].acceptVisitor)) + 8];
LABEL_127:
v186 = *(float *)&v106;
v202 = *((float *)&v104[10].encodeWithCoder + 1);
v198 = *(float *)&v104[10].canEncode;
v110 = 0;
while ( 1 )
{
v111 = 1092616192;
m_width = 10.0;
if ( v110 == 2 )
goto LABEL_135;
if ( v110 == 1 )
{
v111 = 1084227584;
m_width = 5.0;
if ( encodeWithCoder != 2 )
goto LABEL_134;
}
else
{
v111 = 3231711232LL;
m_width = -5.0;
if ( encodeWithCoder != 2 )
{
v111 = 3240099840LL;
m_width = -10.0;
if ( (unsigned int)encodeWithCoder <= 2 )
{
LABEL_134:
v111 = 0;
m_width = 0.0;
}
}
}
LABEL_135:
CoinKey = GJGameLevel::getCoinKey((GJGameLevel *)v104, ++v110);
v113 = strlen(CoinKey);
if ( v113 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(*(double *)&v111);
v114 = v113;
if ( v113 >= 0x17 )
{
v117 = (v113 | 7) + 1;
if ( (v113 | 7) == 0x17 )
v117 = 26;
v115 = (char *)operator new(v117);
__s.__r_.__value_.__r.__words[2] = (std::string::size_type)v115;
__s.__r_.__value_.__r.__words[0] = v117 | 1;
__s.__r_.__value_.__l.__size_ = v114;
v116 = v197;
}
else
{
__s.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v113);
v115 = __s.__r_.__value_.__s.__data_;
v116 = v197;
if ( !v113 )
goto LABEL_143;
}
memmove(v115, CoinKey, v114);
LABEL_143:
v115[v114] = 0;
v118 = GameStatsManager::sharedState();
v119 = __s.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v119 = __s.__r_.__value_.__l.__data_;
hasPendingUserCoin = 1;
if ( !GameStatsManager::hasUserCoin(v118, v119) )
{
v121 = GameStatsManager::sharedState();
v122 = __s.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v122 = __s.__r_.__value_.__l.__data_;
hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v121, v122);
}
v123 = cocos2d::CCSprite::createWithSpriteFrameName("usercoin_small01_001.png");
if ( v206->m_compactView )
{
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v123);
((void (__fastcall *)(cocos2d::CCSprite *, float))v123->setScale)(v123, 0.69999999);
v124 = v199;
v125 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v199->getPosition)(v199);
v196 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v124->getContentSize)(v124);
v193 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v199->getScale)(v199);
v126 = ((float (__fastcall *)(cocos2d::CCSprite *))v123->getScale)(v123);
sub_10028CBE0(v200, (float)(m_width * v126) + (float)((float)(v196 * v193) + 18.0), 0.0);
sub_10028CCE0(&v204, v125);
}
else
{
(*(void (__fastcall **)(__int64, cocos2d::CCSprite *))(*(_QWORD *)v116 + 440LL))(v116, v123);
sub_10028CBE0(v200, m_width, v186);
sub_10028CCE0(&v204, v194);
}
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v123->setPosition)(v123, &v204);
if ( LODWORD(v202) == LODWORD(v198) )
{
v127 = 3174821;
if ( hasPendingUserCoin )
v127 = 4960255;
v204 = v127;
v205 = BYTE2(v127);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v123->setColor)(v123, &v204);
}
else if ( !hasPendingUserCoin )
{
v205 = -91;
v204 = -23131;
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v123->setColor)(v123, &v204);
}
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
if ( (unsigned int)(v110 - 1) <= 1 )
{
v104 = (cocos2d::CCObject_vtbl *)v206->m_level;
encodeWithCoder = (int)v104[10].encodeWithCoder;
if ( v110 < encodeWithCoder )
continue;
}
break;
}
}
}
else
{
v96 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png");
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *))(*(_QWORD *)v197 + 440LL))(v197, v96);
memset(&__s, 0, sizeof(__s));
v97 = GameStatsManager::sharedState();
BaseDiamonds = GameStatsManager::getBaseDiamonds(v97, v206->m_level->m_stars.random - v206->m_level->m_stars.seed);
v99 = GameStatsManager::sharedState();
AwardedDiamondsForLevel = GameStatsManager::getAwardedDiamondsForLevel(v99, v206->m_level);
v101 = (cocos2d::CCString *)sub_1007AB580("%i/%i", v184[0]);
v102 = cocos2d::CCString::getCString(v101);
std::string::assign(&__s, v102);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v103 = __s.__r_.__value_.__l.__data_;
else
v103 = __s.__r_.__value_.__s.__data_;
v107 = cocos2d::CCLabelBMFont::create_3(v103, "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *))(*(_QWORD *)v197 + 440LL))(v197, v107);
sub_10028CBE0(&v204, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v107->setAnchorPoint)(v107, &v204);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v107->setScale)(v107, 0.34999999);
m_width = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v107->getContentSize)(v107);
v108 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v107->getScale)(v107);
sub_10028CBE0(v200, (float)((float)(m_width * v108) * 0.5) + 2.0, -44.5);
sub_10028CCE0(&v204, v194);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v96->setPosition)(v96, &v204);
v109 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v96->getPosition)(v96);
sub_10028CBE0(v200, -8.0, 0.0);
sub_10028CCE0(&v204, v109);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v107->setPosition)(v107, &v204);
if ( AwardedDiamondsForLevel == BaseDiamonds )
{
v205 = -1;
v204 = -156;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v107->setColor)(v107, &v204);
}
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
v104 = (cocos2d::CCObject_vtbl *)v206->m_level;
encodeWithCoder = (int)v104[10].encodeWithCoder;
if ( encodeWithCoder > 0 )
{
v106 = -1032847360;
goto LABEL_127;
}
}
v128 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
v129 = !v206->m_compactView;
if ( v206->m_compactView )
{
v130 = 6.0;
LODWORD(v199) = 1114636288;
if ( v129 )
{
LABEL_169:
v202 = 14.0;
if ( v129 )
goto LABEL_170;
LABEL_166:
v131 = 1053609165;
goto LABEL_171;
}
}
else
{
v130 = 9.0;
LODWORD(v199) = 1117782016;
if ( v129 )
goto LABEL_169;
}
v202 = 8.5;
if ( !v129 )
goto LABEL_166;
LABEL_170:
v131 = 1058642330;
LABEL_171:
LODWORD(v197) = v131;
m_width = v130 + *v128;
v132 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v132);
sub_10028CBE0(&__s, m_width, v202);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v132->setPosition)(v132, &__s);
((void (__fastcall *)(cocos2d::CCSprite *, float))v132->setScale)(v132, *(float *)&v197);
v133 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v133);
v134 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v132->getPosition)(v132);
sub_10028CBE0(&v204, *(float *)&v199, 0.0);
sub_10028CCE0(&__s, v134);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v133->setPosition)(v133, &__s);
((void (__fastcall *)(cocos2d::CCSprite *, float))v133->setScale)(v133, *(float *)&v197);
v135 = "GJ_likesIcon_001.png";
v136 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v136);
v137 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v133->getPosition)(v133);
sub_10028CBE0(&v204, *(float *)&v199, 0.0);
sub_10028CCE0(&__s, v137);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v136->setPosition)(v136, &__s);
((void (__fastcall *)(cocos2d::CCSprite *, float))v136->setScale)(v136, *(float *)&v197);
v138 = (unsigned int *)v206->m_level;
v139 = 25;
if ( (int)v138[208] > (int)v138[209] )
v139 = 18;
v140 = !v206->m_compactView;
if ( v206->m_compactView )
{
m_width = 0.30000001;
v141 = (float)v139;
if ( v140 )
goto LABEL_178;
goto LABEL_177;
}
m_width = 0.40000001;
v141 = (float)v139;
if ( !v140 )
LABEL_177:
v141 = v141 * 0.80000001;
LABEL_178:
v202 = v141;
GJGameLevel::lengthKeyToString(&__s, v138[196]);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v142 = __s.__r_.__value_.__l.__data_;
else
v142 = __s.__r_.__value_.__s.__data_;
v143 = cocos2d::CCLabelBMFont::create_3(v142, "bigFont.fnt");
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v143);
sub_10028CBE0(&__s, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v143->setAnchorPoint)(v143, &__s);
v144 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v132->getPosition)(v132);
sub_10028CBE0(&v204, 10.0, 0.0);
sub_10028CCE0(&__s, v144);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v143->setPosition)(v143, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v143->setScale)(v143, m_width);
cocos2d::CCLabelBMFont::limitLabelWidth(v143, 50.0, m_width, 0.0);
v198 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v143->getPosition)(v143);
v196 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v143->getContentSize)(v143);
v193 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v143->getScale)(v143);
v145 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v133->getPosition)(v133);
sub_10028CBE0(&__s, (float)((float)(v196 * v193) + v198) + v202, *(float *)(v145 + 4));
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v133->setPosition)(v133, &__s);
GameToolbox::intToShortString(&__s, (unsigned int)v206->m_level->m_downloads);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v146 = __s.__r_.__value_.__l.__data_;
else
v146 = __s.__r_.__value_.__s.__data_;
v147 = cocos2d::CCLabelBMFont::create_3(v146, "bigFont.fnt");
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v147);
sub_10028CBE0(&__s, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v147->setAnchorPoint)(v147, &__s);
v148 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v133->getPosition)(v133);
sub_10028CBE0(&v204, 9.0, 0.0);
sub_10028CCE0(&__s, v148);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v147->setPosition)(v147, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v147->setScale)(v147, m_width);
cocos2d::CCLabelBMFont::limitLabelWidth(v147, 45.0, m_width, 0.0);
v149 = v206->m_level->m_likes - v206->m_level->m_dislikes;
v150 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( v149 < 0 )
v135 = "GJ_dislikesIcon_001.png";
v151 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v150, v135);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v136->setDisplayFrame)(v136, v151);
v198 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v147->getPosition)(v147);
v196 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v147->getContentSize)(v147);
v193 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v147->getScale)(v147);
v152 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v136->getPosition)(v136);
sub_10028CBE0(&__s, (float)((float)(v196 * v193) + v198) + v202, *(float *)(v152 + 4));
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v136->setPosition)(v136, &__s);
GameToolbox::intToShortString(&__s, (unsigned int)v149);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v153 = __s.__r_.__value_.__l.__data_;
else
v153 = __s.__r_.__value_.__s.__data_;
v154 = cocos2d::CCLabelBMFont::create_3(v153, "bigFont.fnt");
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v154);
v198 = 0.5;
sub_10028CBE0(&__s, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v154->setAnchorPoint)(v154, &__s);
v155 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v136->getPosition)(v136);
sub_10028CBE0(&v204, 10.0, 0.0);
sub_10028CCE0(&__s, v155);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v154->setPosition)(v154, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v154->setScale)(v154, m_width);
cocos2d::CCLabelBMFont::limitLabelWidth(v154, 45.0, m_width, 0.0);
if ( v206->m_level->m_stars.random - v206->m_level->m_stars.seed >= 2 )
{
v156 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v156);
v157 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v136->getPosition)(v136);
sub_10028CBE0(&v204, *(float *)&v199, 0.0);
sub_10028CCE0(&__s, v157);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v156->setPosition)(v156, &__s);
((void (__fastcall *)(cocos2d::CCSprite *, float))v156->setScale)(v156, *(float *)&v197);
LODWORD(v197) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v154->getPosition)(v154);
LODWORD(v199) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v154->getContentSize)(v154);
v196 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v154->getScale)(v154);
v158 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v156->getPosition)(v156);
sub_10028CBE0(&__s, v202 + (float)((float)(*(float *)&v199 * v196) + *(float *)&v197), *(float *)(v158 + 4));
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v156->setPosition)(v156, &__s);
v159 = GameStatsManager::sharedState();
BaseCurrencyForLevel = GameStatsManager::getBaseCurrencyForLevel(v159, v206->m_level);
v161 = GameStatsManager::sharedState();
AwardedCurrencyForLevel = GameStatsManager::getAwardedCurrencyForLevel(v161, v206->m_level);
v163 = BaseCurrencyForLevel + (int)(float)((float)BaseCurrencyForLevel * 0.25);
memset(&__s, 0, sizeof(__s));
if ( v163 <= AwardedCurrencyForLevel )
v164 = (cocos2d::CCString *)sub_1007AB580("%i", v184[0]);
else
v164 = (cocos2d::CCString *)sub_1007AB580("%i/%i", v184[0]);
v165 = cocos2d::CCString::getCString(v164);
std::string::assign(&__s, v165);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
v166 = __s.__r_.__value_.__l.__data_;
else
v166 = __s.__r_.__value_.__s.__data_;
v167 = cocos2d::CCLabelBMFont::create_3(v166, "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v206->m_mainLayer->addChild)(
v206->m_mainLayer,
v167);
sub_10028CBE0(&v204, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v167->setAnchorPoint)(v167, &v204);
v168 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v156->getPosition)(v156);
sub_10028CBE0(v200, 10.0, 0.0);
sub_10028CCE0(&v204, v168);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v167->setPosition)(v167, &v204);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v167->setScale)(v167, m_width);
if ( v163 == AwardedCurrencyForLevel )
{
v205 = -1;
v204 = -156;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v167->setColor)(v167, &v204);
}
cocos2d::CCLabelBMFont::limitLabelWidth(v167, 45.0, m_width, 0.0);
if ( (*(_BYTE *)&__s.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__s.__r_.__value_.__l.__data_);
}
v169 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v136->getPosition)(v136);
m_width = 1.0;
sub_10028CBE0(&v204, 0.0, 1.0);
sub_10028CCE0(&__s, v169);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v136->setPosition)(v136, &__s);
v170 = v188;
LODWORD(v197) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v188->getPosition)(v188);
LODWORD(v199) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v170->getContentSize)(v170);
v202 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v170->getScale)(v170);
v171 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v170->getPosition)(v170);
sub_10028CBE0(&__s, (float)((float)(*(float *)&v199 * v202) + *(float *)&v197) + 10.0, *(float *)(v171 + 4) + -1.0);
if ( v206->m_compactView )
{
sub_10028CBE0(&v204, 16.0, 10.0);
sub_10028CC90();
}
if ( hasCompletedLevel )
{
v172 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
if ( !v206->m_compactView )
{
sub_10028CBE0(&v204, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v172->setAnchorPoint)(v172, &v204);
}
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v172);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v172->setPosition)(v172, &__s);
if ( !v206->m_compactView )
v198 = 0.80000001;
((void (__fastcall *)(cocos2d::CCSprite *, float))v172->setScale)(v172, v198);
}
else if ( SavedLevel && GJGameLevel::getNormalPercent(SavedLevel) )
{
v173 = (cocos2d::CCString *)sub_1007AB580("%i%%", v184[0]);
v174 = cocos2d::CCString::getCString(v173);
v175 = cocos2d::CCLabelBMFont::create_3(v174, "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v206->m_mainLayer->addChild_0)(
v206->m_mainLayer,
v175,
10);
if ( v206->m_compactView )
v176 = 1053609165;
else
v176 = 1058642330;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double))v175->setScale)(v175, *(double *)&v176);
v177 = v206->m_compactView;
if ( !v177 )
{
sub_10028CBE0(&v204, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v175->setAnchorPoint)(v175, &v204);
v177 = v206->m_compactView;
}
sub_10028CBE0(v200, (float)v177, 0.0);
sub_10028CCE0(&v204, &__s);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v175->setPosition)(v175, &v204);
}
if ( v206->m_compactView )
m_width = 0.80000001;
LODWORD(v197) = v187[0];
v178 = v189;
LODWORD(v199) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v189->getContentSize)(v189);
v179 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v178->getScale)(v178);
sub_10028CBE0(
&v204,
(float)(6.0 * m_width) + (float)((float)((float)(*(float *)&v199 * 0.5) * v179) + *(float *)&v197),
*(float *)&v187[1] + -1.0);
v180 = (cocos2d::CCObject_vtbl *)v206->m_level;
if ( LODWORD(v180[10].setTag) != HIDWORD(v180[10].setTag) )
{
v181 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png");
sub_10028CBE0(v200, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v181->setAnchorPoint)(v181, v200);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v206->m_mainLayer->addChild)(v206->m_mainLayer, v181);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v181->setPosition)(v181, &v204);
((void (__fastcall *)(cocos2d::CCSprite *, float))v181->setScale)(v181, m_width);
sub_10028CBE0(v184, 15.0, 0.0);
sub_10028CCE0(v200, &v204);
sub_10028CC90();
v180 = (cocos2d::CCObject_vtbl *)v206->m_level;
}
if ( HIDWORD(v180[7].encodeWithCoder) - LODWORD(v180[7].canEncode) >= 40001 )
{
v182 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png");
sub_10028CBE0(v200, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v182->setAnchorPoint)(v182, v200);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v206->m_mainLayer->addChild_0)(
v206->m_mainLayer,
v182,
10);
((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v182->setPosition)(v182, &v204);
((void (__fastcall *)(cocos2d::CCSprite *, float))v182->setScale)(v182, m_width);
sub_10028CBE0(v184, m_width * 18.0, 0.0);
sub_10028CCE0(v200, &v204);
sub_10028CC90();
}
if ( (*(_BYTE *)&v190.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v190.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&m_levelName.__r_.__value_.__s.0 & 1) != 0 )
operator delete(m_levelName.__r_.__value_.__l.__data_);
}