//
// LevelCell::loadCustomLevelCell from 0x331c20 to 0x3336f8 (6872 bytes)
//
// 1 xrefs:
// > LevelCell::loadFromLevel @ 0x333750
//
// 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 LevelCell::loadCustomLevelCell(LevelCell *a1)
{
GJGameLevel *m_level; // r6
float v3; // s17
cocos2d::CCLabelBMFont *v4; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCLabelBMFont *v6; // r11
void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r5
float m_height; // s15
void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCLabelBMFont *v10; // r0
float v11; // r1
float v12; // r2
GameLevelManager *v13; // r0
GJGameLevel *SavedDailyLevel; // r0
GJGameLevel *v15; // r1
_BOOL4 v16; // r8
char *v17; // r3
GJGameLevel *v18; // r3
ButtonSprite *v19; // r8
float v20; // s18
const char *v21; // r1
GameStatsManager *v22; // r0
CCMenuItemSpriteExtra *v23; // r0
float v24; // r1
float m_width; // s17
float *v26; // r0
CCMenuItemSpriteExtra *m_button; // r6
void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v29; // r7
ButtonSprite *v30; // r0
ButtonSprite *v31; // r6
CCMenuItemSpriteExtra *v32; // r6
const cocos2d::CCPoint *v33; // r9
ButtonSprite *v34; // r0
ButtonSprite *v35; // r6
CCMenuItemSpriteExtra *v36; // r5
void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
const cocos2d::CCPoint *v38; // r10
ButtonSprite *v39; // r0
ButtonSprite *v40; // r6
CCMenuItemSpriteExtra *v41; // r6
const cocos2d::CCPoint *v42; // r10
ButtonSprite *v43; // r0
CCMenuItemSpriteExtra *v44; // r5
cocos2d::CCMenu *m_mainMenu; // r10
void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
GameLevelManager *v47; // r0
int v48; // r9
float v49; // s16
float v50; // s14
float v51; // r2
float v52; // r1
float width; // s17
float v54; // s17
float v55; // s16
float v56; // s15
CCMenuItemSpriteExtra *v57; // r6
void (__fastcall *v58)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // r3
float *v61; // r0
float v62; // r7
float v63; // s16
float *v64; // r0
MusicDownloadManager *v65; // r0
SongInfoObject *SongInfoObject; // r0
SongInfoObject *v67; // r5
int m_nongType; // r3
const char *v69; // r0
cocos2d::CCSprite *v70; // r6
float v71; // s15
float v72; // s14
cocos2d::CCSprite_vtbl *v73; // r3
cocos2d::CCLabelBMFont *v74; // r9
void (__fastcall *v75)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCLabelBMFont_vtbl *v76; // r3
void (__fastcall *v77)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r3
void (__fastcall *v78)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
int AverageDifficulty; // r0
GJGameLevel *v80; // r3
const char *v81; // r6
cocos2d::CCString *v82; // r0
cocos2d::CCNode *v83; // r5
void (__fastcall *v84)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v85; // r10
GJGameLevel *v86; // r2
_BOOL4 v87; // r3
float v88; // s14
int v89; // r0
GJDifficultySprite *v90; // r6
GameStatsManager *v91; // r0
const char *v92; // r0
cocos2d::CCSprite *v93; // r7
void (__fastcall *v94)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCString *v95; // r0
cocos2d::CCLabelBMFont *v96; // r6
void (__fastcall *v97)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
int v98; // r10
void (__fastcall *v99)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
cocos2d::CCSprite *v100; // r7
GameStatsManager *v101; // r0
GameStatsManager *v102; // r0
cocos2d::CCString *v103; // r0
char *CString; // r0
cocos2d::CCLabelBMFont *v105; // r6
void (__fastcall *v106)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
float v107; // s16
float v108; // r0
int v109; // r10
void (__fastcall *v110)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
GJGameLevel *v111; // r3
float x; // s15
float v113; // s16
float v114; // s16
float v115; // r7
int v116; // s15
int v117; // s15
float v118; // s18
int v119; // r10
GJGameLevel *v120; // r0
int m_coins; // r3
cocos2d::CCSprite *v122; // r8
void (__fastcall *v123)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCSprite *v124; // r7
void (__fastcall *v125)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
int v126; // r10
cocos2d::CCSprite *v127; // r6
int v128; // r10
float v129; // s16
float v130; // s15
GJGameLevel *v131; // r3
cocos2d::CCLabelBMFont *v132; // r5
void (__fastcall *v133)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10
int v134; // r10
void (__fastcall *v135)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
float v136; // s17
float v137; // s18
float v138; // s15
int v139; // r0
cocos2d::CCLabelBMFont *v140; // r5
void (__fastcall *v141)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9
void (__fastcall *v142)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
int v143; // r10
int v144; // r7
void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r8
cocos2d::CCSpriteFrameCache *v146; // r0
const char *v147; // r1
cocos2d::CCSpriteFrame *v148; // r0
void (__fastcall *v149)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
float v150; // s17
float v151; // s18
float v152; // s15
int v153; // r0
cocos2d::CCLabelBMFont *v154; // r8
void (__fastcall *v155)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7
void (__fastcall *v156)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
int v157; // r9
cocos2d::CCSprite *v158; // r9
float v159; // s17
float v160; // s18
float v161; // s15
int v162; // r0
GameStatsManager *v163; // r0
unsigned int BaseCurrencyForLevel; // r0
GameStatsManager *v165; // r0
const char *AwardedCurrencyForLevel; // r0
cocos2d::CCString *v167; // r0
char *v168; // r0
cocos2d::CCLabelBMFont *v169; // r8
int v170; // r9
void (__fastcall *v171)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
void (__fastcall *v172)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
int v173; // r9
float v174; // s16
float v175; // s17
float v176; // s16
int v177; // r0
const char *NormalPercent; // r1
cocos2d::CCSprite *v179; // r0
cocos2d::CCNode *v180; // r6
void (__fastcall *v181)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
float v182; // r1
cocos2d::CCString *v183; // r0
cocos2d::CCLabelBMFont *v184; // r5
int v185; // r1
void (__fastcall *v186)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r6
void (__fastcall *v187)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
float v188; // r1
float v189; // s16
float v190; // s17
float v191; // s18
float v192; // r0
cocos2d::CCSprite *v193; // r5
void (__fastcall *v194)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6
cocos2d::CCSprite *v195; // r5
void (__fastcall *v196)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6
float v197; // s16
char *CoinKey; // r0
GameStatsManager *v199; // r0
GameStatsManager *v200; // r0
cocos2d::CCSprite *v201; // r6
cocos2d::CCPoint *v202; // r1
float v203; // s20
float v204; // s17
float v205; // r0
void (__fastcall *v206)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r3
char v207; // r2
void (__fastcall *v208)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // r2
cocos2d::CCLabelBMFont *v209; // [sp+10h] [bp-B4h]
cocos2d::CCLabelBMFont *v210; // [sp+10h] [bp-B4h]
bool v211; // [sp+10h] [bp-B4h]
cocos2d::CCLabelBMFont *v212; // [sp+10h] [bp-B4h]
cocos2d::CCLabelBMFont *v213; // [sp+10h] [bp-B4h]
_BOOL4 v214; // [sp+14h] [bp-B0h]
cocos2d::CCPoint *v215; // [sp+14h] [bp-B0h]
cocos2d::CCPoint *v216; // [sp+14h] [bp-B0h]
_BOOL4 hasPendingUserCoin; // [sp+14h] [bp-B0h]
GJGameLevel *v218; // [sp+18h] [bp-ACh]
int m_levelLength; // [sp+20h] [bp-A4h]
void (__fastcall *v220)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+20h] [bp-A4h]
int BaseDiamonds; // [sp+20h] [bp-A4h]
float v222; // [sp+20h] [bp-A4h]
void (__fastcall *v223)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+20h] [bp-A4h]
char *v224; // [sp+24h] [bp-A0h]
_BOOL4 hasCompletedStarLevel; // [sp+24h] [bp-A0h]
char *AwardedDiamondsForLevel; // [sp+24h] [bp-A0h]
char *v227; // [sp+24h] [bp-A0h]
char *v228; // [sp+24h] [bp-A0h]
char *v229; // [sp+24h] [bp-A0h]
char *v230; // [sp+24h] [bp-A0h]
void (__fastcall *v231)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-9Ch]
void (__fastcall *v232)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+28h] [bp-9Ch]
float v233; // [sp+28h] [bp-9Ch]
int random; // [sp+28h] [bp-9Ch]
char *v235; // [sp+28h] [bp-9Ch]
_BOOL4 hasCompletedLevel; // [sp+2Ch] [bp-98h]
int seed; // [sp+30h] [bp-94h]
void (__fastcall *v238)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+30h] [bp-94h]
void (__fastcall *v239)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // [sp+30h] [bp-94h]
void (__fastcall *v240)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+30h] [bp-94h]
cocos2d::CCSprite *v241; // [sp+34h] [bp-90h]
ButtonSprite *v242; // [sp+38h] [bp-8Ch] BYREF
char v243[4]; // [sp+3Ch] [bp-88h] BYREF
char v244[4]; // [sp+40h] [bp-84h] BYREF
cocos2d::CCLabelBMFont *v245; // [sp+44h] [bp-80h] BYREF
char v246[4]; // [sp+48h] [bp-7Ch] BYREF
cocos2d::CCLabelBMFont *v247; // [sp+4Ch] [bp-78h] BYREF
cocos2d::CCLabelBMFont *v248; // [sp+50h] [bp-74h] BYREF
cocos2d::CCPoint v249; // [sp+54h] [bp-70h] BYREF
cocos2d::CCPoint v250; // [sp+5Ch] [bp-68h] BYREF
cocos2d::CCPoint v251; // [sp+64h] [bp-60h] BYREF
cocos2d::CCPoint v252; // [sp+6Ch] [bp-58h] BYREF
cocos2d::CCPoint v253; // [sp+74h] [bp-50h] BYREF
cocos2d::CCPoint v254; // [sp+7Ch] [bp-48h] BYREF
cocos2d::CCPoint v255; // [sp+84h] [bp-40h] BYREF
void (*v256)(LevelCell *, cocos2d::CCObject *); // [sp+8Ch] [bp-38h]
int v257; // [sp+90h] [bp-34h]
void (*v258)(LevelCell *, cocos2d::CCObject *); // [sp+94h] [bp-30h]
int v259; // [sp+98h] [bp-2Ch]
void (*v260)(LevelCell *, cocos2d::CCObject *); // [sp+9Ch] [bp-28h]
int v261; // [sp+A0h] [bp-24h]
void (*v262)(LevelCell *, cocos2d::CCObject *); // [sp+A4h] [bp-20h]
int v263; // [sp+A8h] [bp-1Ch]
cocos2d::CCPoint v264; // [sp+ACh] [bp-18h] BYREF
cocos2d::CCPoint v265; // [sp+B4h] [bp-10h] BYREF
m_level = a1->m_level;
v214 = m_level->m_dailyID.random - m_level->m_dailyID.seed > 0;
m_levelLength = m_level->m_levelLength;
if ( a1->m_compactView )
{
GameToolbox::intToString((GameToolbox *)&v264, m_level->m_listPosition);
v4 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v4);
cocos2d::CCLabelBMFont::limitLabelWidth(v4, 20.0, 0.45, 0.0);
setPosition = v4->setPosition;
cocos2d::CCPoint::CCPoint(&v265, 16.0, a1->m_height * 0.5);
setPosition(v4, &v265);
v3 = 15.0;
sub_774008(&v264);
}
else
{
v3 = 0.0;
}
sub_775C20(&v265, &a1->m_level->m_levelName);
v6 = cocos2d::CCLabelBMFont::create();
sub_774008(&v265);
a1->m_mainLayer->addChild(a1->m_mainLayer, v6);
setAnchorPoint = v6->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v265, 0.0, 0.5);
setAnchorPoint(v6, &v265);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v6->setScale)(v6, 1065353216);
m_height = a1->m_height;
v9 = v6->setPosition;
if ( a1->m_compactView )
{
cocos2d::CCPoint::CCPoint(&v265, v3 + 50.0, (float)(m_height * 0.5) + 16.0);
v9(v6, &v265);
v11 = 120.0;
v10 = v6;
v12 = 0.5;
}
else
{
cocos2d::CCPoint::CCPoint(&v265, 50.0, (float)(m_height * 0.5) + 30.0);
v9(v6, &v265);
v10 = v6;
v11 = 190.0;
v12 = 0.8;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v10, v11, v12, 0.0);
v242 = (ButtonSprite *)&unk_ACDDA8;
v13 = GameLevelManager::sharedState();
if ( v214 )
SavedDailyLevel = GameLevelManager::getSavedDailyLevel(
v13,
a1->m_level->m_dailyID.random - a1->m_level->m_dailyID.seed);
else
SavedDailyLevel = (GJGameLevel *)GameLevelManager::getSavedLevel(
v13,
a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed);
v15 = a1->m_level;
v218 = SavedDailyLevel;
if ( v15->m_levelType == Editor
|| ((sub_775C20(v243, &v15->m_levelString),
sub_776584((int)v244, (char *)&unk_939830),
!sub_32DBB0((int)v243, (int)v244))
? (v16 = 1)
: !v218
? (v16 = 0)
: v218->m_levelNotDownloaded
? (v16 = 0)
: (v16 = v218->m_levelVersion == a1->m_level->m_levelVersion),
sub_774008(v244),
sub_774008(v243),
v16) )
{
sub_7753D4((int)&v242, "View");
v17 = "GJ_button_01.png";
}
else
{
v18 = a1->m_level;
if ( v18->m_gameVersion <= 22 )
{
if ( !v218 || v218->m_levelNotDownloaded || v218->m_levelVersion >= v18->m_levelVersion )
{
sub_7753D4((int)&v242, "Get It");
v17 = "GJ_button_02.png";
}
else
{
sub_7753D4((int)&v242, "Update");
v17 = "GJ_button_03.png";
}
}
else
{
sub_7753D4((int)&v242, "NA");
v17 = "GJ_button_04.png";
}
}
if ( v214 )
{
v19 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
((void (__fastcall *)(ButtonSprite *, int))v19->setScale)(v19, 1060320051);
v20 = 18.0;
hasCompletedLevel = a1->m_level->m_orbCompletion.random - a1->m_level->m_orbCompletion.seed > 99;
}
else
{
if ( a1->m_compactView )
v21 = (const char *)&word_28;
else
v21 = (const char *)&word_32;
v19 = ButtonSprite::create(v242, v21, 0, 0.6, 1, "bigFont.fnt", v17, (const char *)0x41F00000, *(float *)&v209);
v22 = GameStatsManager::sharedState();
v20 = 0.0;
hasCompletedLevel = GameStatsManager::hasCompletedLevel(v22, a1->m_level);
}
v257 = 0;
v256 = LevelCell::onClick;
v23 = CCMenuItemSpriteExtra::create(
v19,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1));
a1->m_button = v23;
if ( v214 )
{
v24 = 1.0;
}
else if ( a1->m_level->m_localOrSaved )
{
v24 = 1.0;
}
else
{
v24 = 1.4;
}
CCMenuItemSpriteExtra::setSizeMult(v23, v24);
a1->m_button->setTag(a1->m_button, 0);
a1->m_mainMenu->addChild(a1->m_mainMenu, a1->m_button);
m_width = a1->m_width;
v26 = (float *)v19->getContentSize(v19);
cocos2d::CCPoint::CCPoint(&v265, (float)((float)(m_width - (float)(*v26 * 0.5)) - 9.0) + v20, a1->m_height * 0.5);
cocos2d::CCPoint::operator=(&a1->m_point, &v265);
m_button = a1->m_button;
v28 = m_button->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v265, a1->m_mainMenu, &a1->m_point);
v28(m_button, &v265);
if ( a1->m_listType == Level4 )
{
v30 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_flipYBtn_001.png");
v31 = ButtonSprite::create(
v30,
(cocos2d::CCSprite *)((char *)&dword_1C + 2),
0,
30.0,
1.0,
1,
"GJ_button_05.png",
nullptr,
(bool)v209);
((void (__fastcall *)(ButtonSprite *, int))v31->setScale)(v31, 1058642330);
v258 = LevelCell::onClick;
v259 = 0;
v32 = CCMenuItemSpriteExtra::create(
v31,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1));
v32->setTag(v32, 3);
a1->m_mainMenu->addChild(a1->m_mainMenu, v32);
v210 = (cocos2d::CCLabelBMFont *)v32->setPosition;
v33 = a1->m_button->getPosition(a1->m_button);
cocos2d::CCPoint::CCPoint(&v264, 16.0, -8.0);
cocos2d::CCPoint::operator+(&v265, v33, &v264);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v210)(v32, &v265);
v34 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png");
v35 = ButtonSprite::create(
v34,
(cocos2d::CCSprite *)((char *)&dword_1C + 2),
0,
30.0,
1.0,
1,
"GJ_button_06.png",
nullptr,
(bool)v210);
((void (__fastcall *)(ButtonSprite *, int))v35->setScale)(v35, 1058642330);
v260 = LevelCell::onClick;
v261 = 0;
v36 = CCMenuItemSpriteExtra::create(
v35,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1));
v36->setTag(v36, 2);
a1->m_mainMenu->addChild(a1->m_mainMenu, v36);
v37 = v36->setPosition;
v38 = a1->m_button->getPosition(a1->m_button);
cocos2d::CCPoint::CCPoint(&v264, -12.0, -8.0);
cocos2d::CCPoint::operator+(&v265, v38, &v264);
v37(v36, &v265);
v39 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
v40 = ButtonSprite::create(
v39,
(cocos2d::CCSprite *)((char *)&dword_1C + 2),
0,
30.0,
1.0,
1,
"GJ_button_01.png",
nullptr,
v211);
((void (__fastcall *)(ButtonSprite *, int))v40->setScale)(v40, 1058642330);
v263 = 0;
v262 = LevelCell::onClick;
v41 = CCMenuItemSpriteExtra::create(
v40,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1));
v41->setTag(v41, 1);
a1->m_mainMenu->addChild(a1->m_mainMenu, v41);
v212 = (cocos2d::CCLabelBMFont *)v41->setPosition;
v42 = a1->m_button->getPosition(a1->m_button);
cocos2d::CCPoint::CCPoint(&v264, -40.0, -8.0);
cocos2d::CCPoint::operator+(&v265, v42, &v264);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v212)(v41, &v265);
v43 = ButtonSprite::create(
(ButtonSprite *)"Delete",
(const char *)&word_28,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_06.png",
(const char *)0x41F00000,
*(float *)&v212);
LODWORD(v264.x) = LevelCell::onClick;
v264.y = 0.0;
v44 = CCMenuItemSpriteExtra::create(
v43,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1));
v44->setTag(v44, 4);
a1->m_mainMenu->addChild(a1->m_mainMenu, v44);
m_mainMenu = a1->m_mainMenu;
v46 = v44->setPosition;
cocos2d::CCPoint::CCPoint(&v254, -v20, 0.0);
cocos2d::CCPoint::operator+(&v255, &a1->m_point, &v254);
cocos2d::CCNode::convertToNodeSpace(&v265, m_mainMenu, &v255);
v46(v44, &v265);
LevelCell::updateCellMode(a1, a1->m_cellMode);
}
v29 = a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed;
if ( v29 <= 0 )
{
v47 = GameLevelManager::sharedState();
v29 = GameLevelManager::accountIDForUserID(v47, a1->m_level->m_userID.random - a1->m_level->m_userID.seed);
}
v245 = (cocos2d::CCLabelBMFont *)&unk_ACDDA8;
if ( !a1->m_compactView )
sub_774544((int)&v245, "By ");
sub_775C20(v246, &a1->m_level->m_creatorName);
sub_77441C(&v245, v246);
sub_774008(v246);
v213 = cocos2d::CCLabelBMFont::create();
cocos2d::CCPoint::CCPoint(&v249);
if ( a1->m_compactView )
{
cocos2d::CCLabelBMFont::limitLabelWidth(v213, 80.0, 0.45, 0.0);
v48 = (int)v6->getPosition(v6);
width = v6->getContentSize(v6)->width;
v54 = width * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v6->getScale)(v6));
v55 = v213->getContentSize(v213)->width * 0.5;
v56 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v213->getScale)(v213));
v51 = 0.0;
v52 = (float)(v54 + (float)(v55 * v56)) + 5.0;
}
else
{
cocos2d::CCLabelBMFont::limitLabelWidth(v213, 140.0, 0.7, 0.0);
v48 = (int)v6->getPosition(v6);
v49 = v213->getContentSize(v213)->width * 0.5;
v50 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v213->getScale)(v213));
v51 = -22.0;
v52 = (float)(v49 * v50) + 2.0;
}
cocos2d::CCPoint::CCPoint(&v255, v52, v51);
cocos2d::CCPoint::operator+(&v265, v48, &v255);
cocos2d::CCPoint::operator=(&v249, &v265);
v265.y = 0.0;
LODWORD(v265.x) = LevelCell::onViewProfile;
v57 = CCMenuItemSpriteExtra::create(
v213,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onViewProfile, (unsigned int)a1));
a1->m_mainMenu->addChild(a1->m_mainMenu, v57);
v58 = v57->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v255, a1->m_mainMenu, &v249);
v58(v57, &v255);
if ( !v29 )
{
setColor = v213->setColor;
LOWORD(v255.x) = -166;
BYTE2(v255.x) = -1;
setColor(v213, (const cocos2d::ccColor3B *)&v255);
v57->setEnabled(v57, 0);
}
cocos2d::CCPoint::CCPoint(&v250);
getPosition = v6->getPosition;
if ( a1->m_compactView )
{
v64 = (float *)getPosition(v6);
cocos2d::CCPoint::CCPoint(&v255, *v64 + 1.0, (float)(a1->m_height * 0.5) - 1.0);
cocos2d::CCPoint::operator=(&v250, &v255);
v63 = 150.0;
v62 = 0.36;
}
else
{
v61 = (float *)getPosition(v6);
cocos2d::CCPoint::CCPoint(&v255, *v61 + 2.0, (float)(a1->m_height * 0.5) - 12.0);
cocos2d::CCPoint::operator=(&v250, &v255);
v62 = 0.45;
v63 = 195.0;
}
v65 = MusicDownloadManager::sharedState();
SongInfoObject = MusicDownloadManager::getSongInfoObject(v65, a1->m_level->m_songID);
v67 = SongInfoObject;
if ( SongInfoObject )
{
m_nongType = SongInfoObject->m_nongType;
if ( m_nongType > 0 )
{
if ( m_nongType == 2 )
v69 = "chompo_small_001.png";
else
v69 = "ncs_small_001.png";
v70 = cocos2d::CCSprite::createWithSpriteFrameName(v69);
a1->m_mainLayer->addChild(a1->m_mainLayer, v70);
cocos2d::CCPoint::CCPoint(&v255, 14.0, -1.0);
cocos2d::CCPoint::operator+(&v254, &v250, &v255);
if ( v67->m_nongType == 2 )
{
v254.x = v254.x + 3.0;
v254.y = v254.y - 0.5;
v71 = v250.x + 40.0;
v72 = 20.0;
}
else
{
v71 = v250.x + 34.0;
v72 = 15.0;
}
v73 = v70->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v250.x = v71;
v63 = v63 - v72;
v73->setPosition(v70, &v254);
}
}
GJGameLevel::getSongName((GJGameLevel *)&v247);
v74 = cocos2d::CCLabelBMFont::create();
sub_774008(&v247);
a1->m_mainLayer->addChild(a1->m_mainLayer, v74);
v75 = v74->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v75(v74, &v255);
v74->setPosition(v74, &v250);
cocos2d::CCLabelBMFont::limitLabelWidth(v74, v63, v62, 0.0);
v76 = v74->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( a1->m_level->m_songID > 0 )
{
v78 = v76->setColor;
LOWORD(v255.x) = -32001;
BYTE2(v255.x) = -1;
v78(v74, (const cocos2d::ccColor3B *)&v255);
}
else
{
v77 = v76->setColor;
LOWORD(v255.x) = -11736;
BYTE2(v255.x) = -1;
v77(v74, (const cocos2d::ccColor3B *)&v255);
}
AverageDifficulty = GJGameLevel::getAverageDifficulty(a1->m_level);
v80 = a1->m_level;
v81 = (const char *)AverageDifficulty;
if ( v80->m_demon.random - v80->m_demon.seed == 1 )
v81 = (const char *)GJGameLevel::demonIconForDifficulty((DemonDifficultyType)v80->m_demonDifficulty);
v82 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"difficulty_%02d_btn_001.png",
v81);
cocos2d::CCString::getCString(v82);
v83 = cocos2d::CCNode::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v83, 2);
v83->setContentSize(v83, &stru_AC5C34);
v84 = v83->setPosition;
cocos2d::CCPoint::CCPoint(&v255, 26.0, a1->m_height * 0.5);
v84(v83, &v255);
if ( a1->m_compactView )
{
((void (__fastcall *)(cocos2d::CCNode *, int))v83->setScale)(v83, 1060320051);
v224 = (char *)v83->setPosition;
v85 = (int)v83->getPosition(v83);
cocos2d::CCPoint::CCPoint(&v254, 18.0, 1.0);
cocos2d::CCPoint::operator+(&v255, v85, &v254);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *))v224)(v83, &v255);
}
cocos2d::CCPoint::CCPoint(&v251, 0.0, 0.0);
v86 = a1->m_level;
v87 = v86->m_coins > 0 && !a1->m_compactView;
if ( v86->m_stars.random - v86->m_stars.seed <= 0 )
{
if ( !v87 )
goto LABEL_66;
goto LABEL_155;
}
if ( !v87 )
{
LABEL_155:
v88 = 5.0;
goto LABEL_156;
}
v88 = 14.0;
LABEL_156:
v251.y = v251.y + v88;
LABEL_66:
if ( v214 )
v251.y = v251.y + 10.0;
if ( v86->m_autoLevel )
v89 = -1;
else
v89 = (int)v81;
v90 = GJDifficultySprite::create(v89, Short);
GJDifficultySprite::updateFeatureStateFromLevel(v90, a1->m_level);
v83->addChild_0(v83, v90, 3);
v90->setPosition(v90, &v251);
v91 = GameStatsManager::sharedState();
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v91, a1->m_level);
if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed > 0 )
{
v92 = m_levelLength == 5 ? "moon_small01_001.png" : "star_small01_001.png";
v93 = cocos2d::CCSprite::createWithSpriteFrameName(v92);
v83->addChild(v83, v93);
v94 = v93->setPosition;
cocos2d::CCPoint::CCPoint(&v254, 8.0, -30.0);
cocos2d::CCPoint::operator+(&v255, &v251, &v254);
v94(v93, &v255);
v95 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(a1->m_level->m_stars.random - a1->m_level->m_stars.seed));
cocos2d::CCString::getCString(v95);
v96 = cocos2d::CCLabelBMFont::create();
v83->addChild(v83, v96);
v97 = v96->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 1.0, 0.5);
v97(v96, &v255);
v220 = v96->setPosition;
v98 = (int)v93->getPosition(v93);
cocos2d::CCPoint::CCPoint(&v254, -8.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v98, &v254);
v220(v96, &v255);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v96->setScale)(v96, 1053609165);
if ( hasCompletedStarLevel )
{
v99 = v96->setColor;
LOWORD(v255.x) = -1;
BYTE2(v255.x) = 50;
v99(v96, (const cocos2d::ccColor3B *)&v255);
}
}
if ( v214 )
{
v100 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png");
v83->addChild(v83, v100);
LODWORD(v253.x) = &unk_ACDDA8;
v101 = GameStatsManager::sharedState();
BaseDiamonds = GameStatsManager::getBaseDiamonds(v101, a1->m_level->m_stars.random - a1->m_level->m_stars.seed);
v102 = GameStatsManager::sharedState();
AwardedDiamondsForLevel = (char *)GameStatsManager::getAwardedDiamondsForLevel(v102, a1->m_level);
v103 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
AwardedDiamondsForLevel,
BaseDiamonds);
CString = (char *)cocos2d::CCString::getCString(v103);
sub_7753D4((int)&v253, CString);
v105 = cocos2d::CCLabelBMFont::create();
v83->addChild(v83, v105);
v106 = v105->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 1.0, 0.5);
v106(v105, &v255);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v105->setScale)(v105, 1051931443);
v107 = v105->getContentSize(v105)->width;
v108 = v105->getScale(v105);
v231 = v100->setPosition;
cocos2d::CCPoint::CCPoint(&v254, (float)((float)(v107 * v108) * 0.5) + 2.0, -44.5);
cocos2d::CCPoint::operator+(&v255, &v251, &v254);
v231(v100, &v255);
v232 = v105->setPosition;
v109 = (int)v100->getPosition(v100);
cocos2d::CCPoint::CCPoint(&v254, -8.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v109, &v254);
v232(v105, &v255);
if ( AwardedDiamondsForLevel == (char *)BaseDiamonds )
{
v110 = v105->setColor;
LOWORD(v255.x) = -156;
BYTE2(v255.x) = -1;
v110(v105, (const cocos2d::ccColor3B *)&v255);
}
sub_774008(&v253);
}
v111 = a1->m_level;
if ( v111->m_coins > 0 )
{
if ( v214 )
{
v118 = -60.0;
}
else
{
v118 = -31.5;
if ( v111->m_stars.random - v111->m_stars.seed > 0 )
v118 = -45.5;
}
v119 = 0;
random = v111->m_coinsVerified.random;
seed = v111->m_coinsVerified.seed;
while ( 1 )
{
v120 = a1->m_level;
m_coins = v120->m_coins;
if ( v119 >= m_coins || v119 == 3 )
break;
if ( v119 == 1 )
{
v197 = 5.0;
if ( m_coins != 2 )
v197 = 0.0;
}
else
{
if ( v119 == 2 )
{
v197 = 10.0;
goto LABEL_165;
}
if ( !v119 )
{
if ( m_coins == 2 )
{
v197 = -5.0;
goto LABEL_165;
}
if ( m_coins > 2 )
{
v197 = -10.0;
goto LABEL_165;
}
}
v197 = 0.0;
}
LABEL_165:
CoinKey = (char *)GJGameLevel::getCoinKey(v120, ++v119);
sub_776584((int)&v253, CoinKey);
v199 = GameStatsManager::sharedState();
if ( GameStatsManager::hasUserCoin(v199, (const char *)LODWORD(v253.x)) )
{
hasPendingUserCoin = 1;
}
else
{
v200 = GameStatsManager::sharedState();
hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v200, (const char *)LODWORD(v253.x));
}
v201 = cocos2d::CCSprite::createWithSpriteFrameName("usercoin_small01_001.png");
if ( a1->m_compactView )
{
a1->m_mainLayer->addChild(a1->m_mainLayer, v201);
((void (__fastcall *)(cocos2d::CCSprite *, int))v201->setScale)(v201, 1060320051);
v223 = v201->setPosition;
v230 = (char *)v74->getPosition(v74);
v203 = v74->getContentSize(v74)->width;
v204 = (float)(v203 * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v74->getScale)(v74))) + 18.0;
v205 = v201->getScale(v201);
cocos2d::CCPoint::CCPoint(&v254, v204 + (float)(v197 * v205), 0.0);
v202 = (cocos2d::CCPoint *)v230;
}
else
{
v83->addChild(v83, v201);
v223 = v201->setPosition;
cocos2d::CCPoint::CCPoint(&v254, v197, v118);
v202 = &v251;
}
cocos2d::CCPoint::operator+(&v255, v202, &v254);
v223(v201, &v255);
if ( random == seed )
{
v206 = v201->setColor;
if ( hasPendingUserCoin )
{
LOWORD(v255.x) = -20481;
v207 = 75;
}
else
{
LOWORD(v255.x) = 29093;
v207 = 48;
}
BYTE2(v255.x) = v207;
v206(v201, (const cocos2d::ccColor3B *)&v255);
}
else if ( !hasPendingUserCoin )
{
v208 = v201->setColor;
LOWORD(v255.x) = -23131;
BYTE2(v255.x) = -91;
v208(v201, (const cocos2d::ccColor3B *)&v255);
}
sub_774008(&v253);
}
}
x = v6->getPosition(v6)->x;
v113 = 9.0;
if ( a1->m_compactView )
v113 = 6.0;
v114 = x + v113;
if ( a1->m_compactView )
v115 = 8.5;
else
v115 = 14.0;
v116 = 1117782016;
if ( a1->m_compactView )
v116 = 1114636288;
v233 = *(float *)&v116;
v117 = 1058642330;
if ( a1->m_compactView )
v117 = 1053609165;
v227 = (char *)v117;
v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
a1->m_mainLayer->addChild(a1->m_mainLayer, v122);
v123 = v122->setPosition;
cocos2d::CCPoint::CCPoint(&v255, v114, v115);
v123(v122, &v255);
((void (__fastcall *)(cocos2d::CCSprite *, int))v122->setScale)(v122, v117);
v124 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png");
a1->m_mainLayer->addChild(a1->m_mainLayer, v124);
v125 = v124->setPosition;
v126 = (int)v122->getPosition(v122);
cocos2d::CCPoint::CCPoint(&v254, v233, 0.0);
cocos2d::CCPoint::operator+(&v255, v126, &v254);
v125(v124, &v255);
((void (__fastcall *)(cocos2d::CCSprite *, int))v124->setScale)(v124, v117);
v127 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png");
a1->m_mainLayer->addChild(a1->m_mainLayer, v127);
v215 = (cocos2d::CCPoint *)v127->setPosition;
v128 = (int)v124->getPosition(v124);
cocos2d::CCPoint::CCPoint(&v254, v233, 0.0);
cocos2d::CCPoint::operator+(&v255, v128, &v254);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v215)(v127, &v255);
((void (__fastcall *)(cocos2d::CCSprite *, int))v127->setScale)(v127, v117);
v129 = 25.0;
v130 = 0.4;
v131 = a1->m_level;
if ( a1->m_compactView )
v130 = 0.3;
v222 = v130;
if ( v131->m_stars.random - v131->m_stars.seed > 0 )
v129 = 18.0;
if ( a1->m_compactView )
v129 = v129 * 0.8;
GJGameLevel::lengthKeyToString((GJGameLevel *)&v248, v131->m_levelLength);
v132 = cocos2d::CCLabelBMFont::create();
sub_774008(&v248);
a1->m_mainLayer->addChild(a1->m_mainLayer, v132);
v133 = v132->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v133(v132, &v255);
v216 = (cocos2d::CCPoint *)v132->setPosition;
v134 = (int)v122->getPosition(v122);
cocos2d::CCPoint::CCPoint(&v254, 10.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v134, &v254);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))v216)(v132, &v255);
v132->setScale(v132, COERCE_FLOAT(LODWORD(v130)));
cocos2d::CCLabelBMFont::limitLabelWidth(v132, 50.0, v130, 0.0);
v135 = v124->setPosition;
v136 = v132->getPosition(v132)->x;
v137 = v132->getContentSize(v132)->width;
v138 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v132->getScale)(v132));
v139 = (int)v124->getPosition(v124);
cocos2d::CCPoint::CCPoint(&v255, (float)(v136 + (float)(v137 * v138)) + v129, *(float *)(v139 + 4));
v135(v124, &v255);
GameToolbox::intToShortString((GameToolbox *)&v254, a1->m_level->m_downloads);
v140 = cocos2d::CCLabelBMFont::create();
sub_774008(&v254);
a1->m_mainLayer->addChild(a1->m_mainLayer, v140);
v141 = v140->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v141(v140, &v255);
v142 = v140->setPosition;
v143 = (int)v124->getPosition(v124);
cocos2d::CCPoint::CCPoint(&v254, 9.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v143, &v254);
v142(v140, &v255);
v140->setScale(v140, COERCE_FLOAT(LODWORD(v222)));
cocos2d::CCLabelBMFont::limitLabelWidth(v140, 45.0, v222, 0.0);
v144 = a1->m_level->m_likes - a1->m_level->m_dislikes;
setDisplayFrame = v127->setDisplayFrame;
v146 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( v144 < 0 )
v147 = "GJ_dislikesIcon_001.png";
else
v147 = "GJ_likesIcon_001.png";
v148 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v146, v147);
setDisplayFrame(v127, v148);
v149 = v127->setPosition;
v150 = v140->getPosition(v140)->x;
v151 = v140->getContentSize(v140)->width;
v152 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v140->getScale)(v140));
v153 = (int)v127->getPosition(v127);
cocos2d::CCPoint::CCPoint(&v255, (float)(v150 + (float)(v151 * v152)) + v129, *(float *)(v153 + 4));
v149(v127, &v255);
GameToolbox::intToShortString((GameToolbox *)&v255, v144);
v154 = cocos2d::CCLabelBMFont::create();
sub_774008(&v255);
a1->m_mainLayer->addChild(a1->m_mainLayer, v154);
v155 = v154->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v155(v154, &v255);
v156 = v154->setPosition;
v157 = (int)v127->getPosition(v127);
cocos2d::CCPoint::CCPoint(&v254, 10.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v157, &v254);
v156(v154, &v255);
v154->setScale(v154, COERCE_FLOAT(LODWORD(v222)));
cocos2d::CCLabelBMFont::limitLabelWidth(v154, 45.0, v222, 0.0);
if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed > 1 )
{
v158 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
a1->m_mainLayer->addChild(a1->m_mainLayer, v158);
v238 = v158->setPosition;
v241 = (cocos2d::CCSprite *)v127->getPosition(v127);
cocos2d::CCPoint::CCPoint(&v254, v233, 0.0);
cocos2d::CCPoint::operator+(&v255, v241, &v254);
v238(v158, &v255);
((void (__fastcall *)(cocos2d::CCSprite *, char *))v158->setScale)(v158, v227);
v228 = (char *)v158->setPosition;
v159 = v154->getPosition(v154)->x;
v160 = v154->getContentSize(v154)->width;
v161 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v154->getScale)(v154));
v162 = (int)v158->getPosition(v158);
cocos2d::CCPoint::CCPoint(&v255, (float)(v159 + (float)(v160 * v161)) + v129, *(float *)(v162 + 4));
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v228)(v158, &v255);
v163 = GameStatsManager::sharedState();
BaseCurrencyForLevel = GameStatsManager::getBaseCurrencyForLevel(v163, a1->m_level);
v229 = (char *)((int)vcvts_n_f32_s32(BaseCurrencyForLevel, 2u) + BaseCurrencyForLevel);
v165 = GameStatsManager::sharedState();
AwardedCurrencyForLevel = (const char *)GameStatsManager::getAwardedCurrencyForLevel(v165, a1->m_level);
v235 = (char *)AwardedCurrencyForLevel;
LODWORD(v253.x) = &unk_ACDDA8;
if ( (int)v229 <= (int)AwardedCurrencyForLevel )
v167 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
v229,
AwardedCurrencyForLevel);
else
v167 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
AwardedCurrencyForLevel,
v229);
v168 = (char *)cocos2d::CCString::getCString(v167);
sub_7753D4((int)&v253, v168);
v169 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v169);
v239 = v169->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v239(v169, &v255);
v240 = v169->setPosition;
v170 = (int)v158->getPosition(v158);
cocos2d::CCPoint::CCPoint(&v254, 10.0, 0.0);
cocos2d::CCPoint::operator+(&v255, v170, &v254);
v240(v169, &v255);
v169->setScale(v169, COERCE_FLOAT(LODWORD(v222)));
if ( v229 == v235 )
{
v171 = v169->setColor;
LOWORD(v255.x) = -156;
BYTE2(v255.x) = -1;
v171(v169, (const cocos2d::ccColor3B *)&v255);
}
cocos2d::CCLabelBMFont::limitLabelWidth(v169, 45.0, v222, 0.0);
sub_774008(&v253);
}
v172 = v127->setPosition;
v173 = (int)v127->getPosition(v127);
cocos2d::CCPoint::CCPoint(&v254, 0.0, 1.0);
cocos2d::CCPoint::operator+(&v255, v173, &v254);
v172(v127, &v255);
v174 = v6->getPosition(v6)->x;
v175 = v6->getContentSize(v6)->width;
v176 = v174 + (float)(v175 * COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v6->getScale)(v6)));
v177 = (int)v6->getPosition(v6);
cocos2d::CCPoint::CCPoint(&v252, v176 + 10.0, *(float *)(v177 + 4) - 1.0);
if ( a1->m_compactView )
{
cocos2d::CCPoint::CCPoint(&v255, 16.0, 10.0);
cocos2d::CCPoint::operator=(&v252, &v255);
}
if ( hasCompletedLevel )
{
v179 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
v180 = v179;
if ( !a1->m_compactView )
{
v181 = v179->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v181((cocos2d::CCSprite *)v180, &v255);
}
a1->m_mainLayer->addChild(a1->m_mainLayer, v180);
v180->setPosition(v180, &v252);
if ( a1->m_compactView )
v182 = 0.5;
else
v182 = 0.8;
v180->setScale(v180, COERCE_FLOAT(LODWORD(v182)));
}
else if ( v218 )
{
NormalPercent = (const char *)GJGameLevel::getNormalPercent(v218);
if ( NormalPercent )
{
v183 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", NormalPercent);
cocos2d::CCString::getCString(v183);
v184 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v184, 10);
if ( a1->m_compactView )
v185 = 1053609165;
else
v185 = 1058642330;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v184->setScale)(v184, v185);
if ( !a1->m_compactView )
{
v186 = v184->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v186(v184, &v255);
}
v187 = v184->setPosition;
if ( a1->m_compactView )
v188 = 1.0;
else
v188 = 0.0;
cocos2d::CCPoint::CCPoint(&v254, v188, 0.0);
cocos2d::CCPoint::operator+(&v255, &v252, &v254);
v187(v184, &v255);
}
}
v189 = 1.0;
v190 = v249.x;
if ( a1->m_compactView )
v189 = 0.8;
v191 = *(float *)((int (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v213->getContentSize)(
v213,
NormalPercent)
* 0.5;
v192 = v213->getScale(v213);
cocos2d::CCPoint::CCPoint(&v253, (float)(v190 + (float)(v191 * v192)) + (float)(v189 * 6.0), v249.y - 1.0);
if ( a1->m_level->m_originalLevel.random != a1->m_level->m_originalLevel.seed )
{
v193 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png");
v194 = v193->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v194(v193, &v255);
a1->m_mainLayer->addChild(a1->m_mainLayer, v193);
v193->setPosition(v193, &v253);
v193->setScale(v193, COERCE_FLOAT(LODWORD(v189)));
cocos2d::CCPoint::CCPoint(&v254, 15.0, 0.0);
cocos2d::CCPoint::operator+(&v255, &v253, &v254);
cocos2d::CCPoint::operator=(&v253, &v255);
}
if ( a1->m_level->m_objectCount.random - a1->m_level->m_objectCount.seed > 40000 )
{
v195 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png");
v196 = v195->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v255, 0.0, 0.5);
v196(v195, &v255);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v195, 10);
v195->setPosition(v195, &v253);
v195->setScale(v195, COERCE_FLOAT(LODWORD(v189)));
cocos2d::CCPoint::CCPoint(&v254, v189 * 18.0, 0.0);
cocos2d::CCPoint::operator+(&v255, &v253, &v254);
cocos2d::CCPoint::operator=(&v253, &v255);
}
sub_774008(&v245);
sub_774008(&v242);
}