//
// LevelCell::loadCustomLevelCell from 0x10010ca64 to 0x10010ed8c (9000 bytes)
//
// 1 xrefs:
// > LevelCell::loadFromLevel @ 0x100102c84
//
// 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)
{
GJGameLevel *m_level; // x8
int random; // w25
int seed; // w23
int m_levelLength; // w27
_BOOL4 m_compactView; // w19
std::string *p_p; // x0
cocos2d::CCLabelBMFont *v8; // x20
__n128 v9; // q1
__n128 v10; // q0
std::string *capacitym1; // x0
cocos2d::CCLabelBMFont *v12; // x20
__n128 v13; // q0
__n128 v14; // q1
__n128 v15; // q0
__n128 v16; // q1
float v17; // s0
float v18; // s1
GameLevelManager *v19; // x0
GJGameLevel *v20; // x8
_BOOL4 v21; // w19
const char *v22; // x5
ButtonSprite *v23; // x22
_BOOL4 hasCompletedLevel; // w19
float v25; // s9
std::string *v26; // x0
int v27; // w1
GameStatsManager *v28; // x0
CCMenuItemSpriteExtra *v29; // x0
float v30; // s0
float m_width; // s8
__n128 v32; // q0
__n128 v33; // q1
CCMenuItemSpriteExtra *m_button; // x21
cocos2d::CCSprite *v35; // x0
ButtonSprite *v36; // x21
CCMenuItemSpriteExtra *v37; // x22
float32x2_t *v38; // x21
__n128 v39; // q0
__n128 v40; // q1
double v41; // d0
cocos2d::CCSprite *v42; // x0
ButtonSprite *v43; // x21
CCMenuItemSpriteExtra *v44; // x22
float32x2_t *v45; // x21
__n128 v46; // q0
__n128 v47; // q1
double v48; // d0
cocos2d::CCSprite *v49; // x0
ButtonSprite *v50; // x21
CCMenuItemSpriteExtra *v51; // x22
float32x2_t *v52; // x21
__n128 v53; // q0
__n128 v54; // q1
double v55; // d0
ButtonSprite *v56; // x0
CCMenuItemSpriteExtra *v57; // x22
__n128 v58; // q0
cocos2d::CCMenu *m_mainMenu; // x21
__n128 v60; // q1
_BOOL4 v61; // w24
GameLevelManager *v62; // x0
GJGameLevel *v63; // x8
std::string *p_m_creatorName; // x1
std::string::size_type size; // x2
std::string *p_dst; // x0
float32x2_t *v67; // x22
float v68; // s9
float v69; // s8
float v70; // s10
__n128 v71; // q0
__n128 v72; // q1
float32x2_t *v73; // x21
float v74; // s8
__n128 v75; // q0
__n128 v76; // q1
CCMenuItemSpriteExtra *v77; // x22
__n128 v78; // q0
__n128 v79; // q1
float v80; // s8
float v81; // s9
__n128 v82; // q0
__n128 v83; // q1
MusicDownloadManager *v84; // x0
SongInfoObject *SongInfoObject; // x0
SongInfoObject *v86; // x24
int m_nongType; // w8
const char *v88; // x0
cocos2d::CCSprite *v89; // x22
__n128 v90; // q0
__n128 v91; // q1
float v92; // s0
float v93; // s10
std::string *v94; // x0
cocos2d::CCLabelBMFont *v95; // x24
__n128 v96; // q0
__n128 v97; // q1
int v98; // w19
int AverageDifficulty; // w0
GJGameLevel *v100; // x8
int v101; // w26
cocos2d::CCString *v102; // x0
cocos2d::CCNode *v103; // x25
__n128 v104; // q0
__n128 v105; // q1
__n128 v106; // q0
__n128 v107; // q1
float32x2_t *v108; // x21
__n128 v109; // q0
__n128 v110; // q1
double v111; // d0
GJGameLevel *v112; // x8
bool v113; // w9
int v114; // w10
int v115; // w11
bool v116; // cc
bool v117; // w10
float v118; // s0
int v119; // w0
GJDifficultySprite *v120; // x21
GameStatsManager *v121; // x0
_BOOL4 hasCompletedStarLevel; // w0
_BOOL4 v123; // w26
const char *v124; // x0
cocos2d::CCSprite *v125; // x22
__n128 v126; // q0
__n128 v127; // q1
double v128; // d0
cocos2d::CCString *v129; // x0
const char *CString; // x0
cocos2d::CCLabelBMFont *v131; // x27
__n128 v132; // q0
__n128 v133; // q1
float32x2_t *v134; // x21
__n128 v135; // q0
__n128 v136; // q1
double v137; // d0
LevelCell *v138; // x23
cocos2d::CCSprite *v139; // x27
GameStatsManager *v140; // x0
int BaseDiamonds; // w26
GameStatsManager *v142; // x0
int AwardedDiamondsForLevel; // w20
cocos2d::CCString *v144; // x0
const char *v145; // x0
std::string *v146; // x0
cocos2d::CCLabelBMFont *v147; // x22
__n128 v148; // q0
__n128 v149; // q1
float v150; // s8
__n128 v151; // q0
__n128 v152; // q1
double v153; // d0
float32x2_t *v154; // x21
__n128 v155; // q0
__n128 v156; // q1
double v157; // d0
GJGameLevel *v158; // x0
int m_coins; // w8
float v160; // s8
int v161; // w26
int v162; // w27
int v163; // w20
float v164; // s10
char *CoinKey; // x0
GameStatsManager *v166; // x0
std::string *v167; // x1
_BOOL4 hasPendingUserCoin; // w22
GameStatsManager *v169; // x0
std::string *v170; // x1
cocos2d::CCSprite *v171; // x28
float32x2_t *v172; // x21
float v173; // s15
float v174; // s11
__n128 v175; // q0
__n128 v176; // q1
double v177; // d0
__n128 v178; // q0
__n128 v179; // q1
int v180; // w8
cocos2d::CCLabelBMFont *v181; // x20
float v182; // s11
float v183; // s12
float v184; // s10
float v185; // s8
float v186; // s9
cocos2d::CCSprite *v187; // x26
__n128 v188; // q0
__n128 v189; // q1
cocos2d::CCSprite *v190; // x25
float32x2_t *v191; // x21
__n128 v192; // q1
__n128 v193; // q0
double v194; // d0
cocos2d::CCSprite *v195; // x24
float32x2_t *v196; // x21
__n128 v197; // q1
__n128 v198; // q0
double v199; // d0
unsigned int *v200; // x9
unsigned int v201; // w10
float v202; // s8
float v203; // s15
std::string *v204; // x0
cocos2d::CCLabelBMFont *v205; // x22
__n128 v206; // q0
__n128 v207; // q1
float32x2_t *v208; // x21
__n128 v209; // q0
__n128 v210; // q1
double v211; // d0
float v212; // s12
float v213; // s13
float v214; // s11
__int64 v215; // x0
__n128 v216; // q0
__n128 v217; // q1
std::string *v218; // x0
cocos2d::CCLabelBMFont *v219; // x26
__n128 v220; // q0
__n128 v221; // q1
float32x2_t *v222; // x21
__n128 v223; // q0
__n128 v224; // q1
double v225; // d0
GJGameLevel *v226; // x8
int m_likes; // w9
__int64 v228; // x22
cocos2d::CCSpriteFrameCache *v229; // x0
const char *v230; // x1
cocos2d::CCSpriteFrame *v231; // x0
float v232; // s12
float v233; // s13
float v234; // s11
__int64 v235; // x0
__n128 v236; // q0
__n128 v237; // q1
std::string *v238; // x0
cocos2d::CCLabelBMFont *v239; // x26
__n128 v240; // q0
__n128 v241; // q1
float32x2_t *v242; // x21
__n128 v243; // q0
__n128 v244; // q1
double v245; // d0
cocos2d::CCSprite *v246; // x25
float32x2_t *v247; // x21
__n128 v248; // q1
__n128 v249; // q0
double v250; // d0
float v251; // s10
float v252; // s11
float v253; // s9
__int64 v254; // x0
__n128 v255; // q0
__n128 v256; // q1
GameStatsManager *v257; // x0
unsigned int BaseCurrencyForLevel; // w21
GameStatsManager *v259; // x0
int AwardedCurrencyForLevel; // w0
int v261; // w22
int v262; // w8
unsigned int v263; // w19
cocos2d::CCString *v264; // x0
const char *v265; // x0
std::string *v266; // x0
cocos2d::CCLabelBMFont *v267; // x26
__n128 v268; // q0
__n128 v269; // q1
float32x2_t *v270; // x21
__n128 v271; // q0
__n128 v272; // q1
double v273; // d0
float32x2_t *v274; // x21
__n128 v275; // q0
__n128 v276; // q1
double v277; // d0
float v278; // s9
float v279; // s10
float v280; // s8
__int64 v281; // x0
__n128 v282; // q0
__n128 v283; // q1
__n128 v284; // q0
__n128 v285; // q1
cocos2d::CCSprite *v286; // x20
__n128 v287; // q0
__n128 v288; // q1
__n128 v289; // q0
int NormalPercent; // w0
cocos2d::CCString *v291; // x0
const char *v292; // x0
cocos2d::CCLabelBMFont *v293; // x20
__n128 v294; // q0
__n128 v295; // q0
__n128 v296; // q1
unsigned int v297; // w8
double v298; // d0
float v299; // s8
float v300; // s9
float v301; // s10
__n128 v302; // q0
__n128 v303; // q1
GJGameLevel *v304; // x8
cocos2d::CCSprite *v305; // x20
__n128 v306; // q0
__n128 v307; // q1
__n128 v308; // q0
__n128 v309; // q1
cocos2d::CCSprite *v310; // x20
__n128 v311; // q0
__n128 v312; // q1
__n128 v313; // q0
__n128 v314; // q1
GJGameLevel *v315; // x8
_BOOL4 v316; // [xsp+1Ch] [xbp-144h]
GJGameLevel *SavedLevel; // [xsp+20h] [xbp-140h]
cocos2d::CCLabelBMFont *v318; // [xsp+28h] [xbp-138h]
cocos2d::CCLabelBMFont *v319; // [xsp+30h] [xbp-130h]
float32x2_t v320; // [xsp+40h] [xbp-120h] BYREF
float32x2_t v321; // [xsp+48h] [xbp-118h] BYREF
float32x2_t v322; // [xsp+50h] [xbp-110h] BYREF
float32x2_t v323; // [xsp+58h] [xbp-108h] BYREF
float32x2_t v324; // [xsp+60h] [xbp-100h] BYREF
float32x2_t v325; // [xsp+68h] [xbp-F8h] BYREF
std::string m_creatorName; // [xsp+70h] [xbp-F0h] BYREF
std::string __dst; // [xsp+90h] [xbp-D0h] BYREF
std::string __p; // [xsp+B0h] [xbp-B0h] BYREF
cocos2d::CCPoint v329; // 0:kr00_8.8
cocos2d::CCPoint v330; // 0:kr08_8.8
cocos2d::CCPoint v331; // 0:kr10_8.8
cocos2d::SEL_MenuHandler v332; // 0:x3.16
cocos2d::SEL_MenuHandler v333; // 0:x3.16
cocos2d::SEL_MenuHandler v334; // 0:x3.16
cocos2d::SEL_MenuHandler v335; // 0:x3.16
cocos2d::SEL_MenuHandler v336; // 0:x3.16
cocos2d::SEL_MenuHandler v337; // 0:x3.16
m_level = a1->m_level;
random = m_level->m_dailyID.random;
seed = m_level->m_dailyID.seed;
m_levelLength = m_level->m_levelLength;
m_compactView = a1->m_compactView;
if ( m_compactView )
{
GameToolbox::intToString((unsigned int)m_level->m_listPosition, &__p);
if ( __p.m_data.m_short.shortStorage.__elems_[22] >= 0 )
p_p = (std::string *)&__p;
else
p_p = (std::string *)__p.m_data.m_long.capacitym1;
v8 = cocos2d::CCLabelBMFont::create_1((const char *)p_p, "bigFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v8);
cocos2d::CCLabelBMFont::limitLabelWidth(v8, 20.0, 0.45, 0.0);
v9.n128_f32[0] = a1->m_height * 0.5;
v10.n128_u32[0] = 16.0;
sub_100022980(v10, v9, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v8->setPosition)(v8, &__dst);
if ( __p.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)__p.m_data.m_long.capacitym1);
m_level = a1->m_level;
}
if ( m_level->m_levelName.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(&__p, (void *)m_level->m_levelName.m_data.m_long.capacitym1, m_level->m_levelName.m_data.m_long.size);
else
__p = m_level->m_levelName;
if ( __p.m_data.m_short.shortStorage.__elems_[22] >= 0 )
capacitym1 = (std::string *)&__p;
else
capacitym1 = (std::string *)__p.m_data.m_long.capacitym1;
v12 = cocos2d::CCLabelBMFont::create_1((const char *)capacitym1, "bigFont.fnt");
if ( __p.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)__p.m_data.m_long.capacitym1);
v13 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(
a1->m_mainLayer,
v12);
v13.n128_u32[0] = 0;
v14.n128_u32[0] = 0.5;
sub_100022980(v13, v14, &__p);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v12->setAnchorPoint)(v12, &__p);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v12->setScale)(v12, 1.0);
if ( a1->m_compactView )
{
v15.n128_u32[0] = 1112014848;
if ( m_compactView )
v15.n128_f32[0] = 65.0;
v16.n128_f32[0] = (float)(a1->m_height * 0.5) + 16.0;
sub_100022980(v15, v16, &__p);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v12->setPosition)(v12, &__p);
v17 = 120.0;
v18 = 0.5;
}
else
{
v16.n128_f32[0] = (float)(a1->m_height * 0.5) + 30.0;
v15.n128_u32[0] = 1112014848;
sub_100022980(v15, v16, &__p);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v12->setPosition)(v12, &__p);
v17 = 190.0;
v18 = 0.8;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v12, v17, v18, 0.0);
memset(&__p, 0, sizeof(__p));
v19 = GameLevelManager::sharedState();
if ( random <= seed )
SavedLevel = GameLevelManager::getSavedLevel(v19, a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed);
else
SavedLevel = GameLevelManager::getSavedDailyLevel(v19, a1->m_level->m_dailyID.random - a1->m_level->m_dailyID.seed);
v20 = a1->m_level;
if ( v20->m_levelType == Editor )
goto LABEL_38;
if ( v20->m_levelString.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(&__dst, (void *)v20->m_levelString.m_data.m_long.capacitym1, v20->m_levelString.m_data.m_long.size);
else
__dst = (std::string)v20->m_levelString;
sub_100009900(&m_creatorName, "");
if ( sub_1000045BC(&__dst, &m_creatorName) )
v21 = SavedLevel && !SavedLevel->m_levelNotDownloaded && SavedLevel->m_levelVersion == a1->m_level->m_levelVersion;
else
v21 = 1;
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(__dst.__r_.__value_.__l.__data_);
if ( v21 )
goto LABEL_38;
LABEL_245:
v315 = a1->m_level;
if ( v315->m_gameVersion < 23 )
{
if ( !SavedLevel || SavedLevel->m_levelNotDownloaded || SavedLevel->m_levelVersion >= v315->m_levelVersion )
{
std::string::assign((std::string *)&__p, "Get It");
v22 = "GJ_button_02.png";
}
else
{
std::string::assign((std::string *)&__p, "Update");
v22 = "GJ_button_03.png";
}
}
else
{
std::string::assign((std::string *)&__p, "NA");
v22 = "GJ_button_04.png";
}
goto LABEL_39;
}
if ( !v21 )
goto LABEL_245;
LABEL_38:
std::string::assign((std::string *)&__p, "View");
v22 = "GJ_button_01.png";
LABEL_39:
if ( random <= seed )
{
if ( __p.m_data.m_short.shortStorage.__elems_[22] >= 0 )
v26 = (std::string *)&__p;
else
v26 = (std::string *)__p.m_data.m_long.capacitym1;
if ( a1->m_compactView )
v27 = 40;
else
v27 = 50;
v23 = ButtonSprite::create_1((const char *)v26, v27, 0, 0.6, 1, "bigFont.fnt", v22, 30.0);
v28 = GameStatsManager::sharedState();
hasCompletedLevel = GameStatsManager::hasCompletedLevel(v28, a1->m_level);
v25 = 0.0;
}
else
{
v23 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
((void (__fastcall *)(ButtonSprite *, float))v23->setScale)(v23, 0.7);
hasCompletedLevel = a1->m_level->m_orbCompletion.random - a1->m_level->m_orbCompletion.seed > 99;
v25 = 18.0;
}
v332.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onClick;
v332.adj = 0;
v29 = CCMenuItemSpriteExtra::create(v23, nullptr, a1, v332);
a1->m_button = v29;
v30 = 1.0;
if ( random <= seed )
{
v30 = 1.4;
if ( a1->m_level->m_localOrSaved )
v30 = 1.0;
}
CCMenuItemSpriteExtra::setSizeMult(v29, v30);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_button->setTag)(a1->m_button, 0);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(
a1->m_mainMenu,
a1->m_button);
m_width = a1->m_width;
v32.n128_f32[0] = v25
+ (float)((float)(m_width
- (float)(*(float *)((__int64 (__fastcall *)(ButtonSprite *))v23->getContentSize)(v23)
* 0.5))
+ -9.0);
v33.n128_f32[0] = a1->m_height * 0.5;
sub_100022980(v32, v33, &__dst);
sub_1000229D0(&a1->m_point, (double *)&__dst);
m_button = a1->m_button;
v329 = cocos2d::CCNode::convertToNodeSpace(a1->m_mainMenu, &a1->m_point);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))m_button->setPosition)(
m_button,
&__dst,
v329.x,
v329.y);
if ( a1->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.6);
v333.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onClick;
v333.adj = 0;
v37 = CCMenuItemSpriteExtra::create(v36, nullptr, a1, v333);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v37->setTag)(v37, 3);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(a1->m_mainMenu, v37);
v38 = (float32x2_t *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_button->getPosition)(a1->m_button);
v39.n128_u32[0] = 16.0;
v40.n128_u32[0] = -8.0;
sub_100022980(v39, v40, &m_creatorName);
*(float32x2_t *)&v41 = sub_1000229DC(v38, (float32x2_t *)&m_creatorName, (float32x2_t *)&__dst);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v37->setPosition)(v37, &__dst, v41);
v42 = cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png");
v43 = ButtonSprite::create(v42, 30, 0, 30.0, 1.0, 1, "GJ_button_06.png", 0);
((void (__fastcall *)(ButtonSprite *, float))v43->setScale)(v43, 0.6);
v334.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onClick;
v334.adj = 0;
v44 = CCMenuItemSpriteExtra::create(v43, nullptr, a1, v334);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v44->setTag)(v44, 2);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(a1->m_mainMenu, v44);
v45 = (float32x2_t *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_button->getPosition)(a1->m_button);
v46.n128_u32[0] = -12.0;
v47.n128_u32[0] = -8.0;
sub_100022980(v46, v47, &m_creatorName);
*(float32x2_t *)&v48 = sub_1000229DC(v45, (float32x2_t *)&m_creatorName, (float32x2_t *)&__dst);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v44->setPosition)(v44, &__dst, v48);
v49 = cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
v50 = ButtonSprite::create(v49, 30, 0, 30.0, 1.0, 1, "GJ_button_01.png", 0);
((void (__fastcall *)(ButtonSprite *, float))v50->setScale)(v50, 0.6);
v335.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onClick;
v335.adj = 0;
v51 = CCMenuItemSpriteExtra::create(v50, nullptr, a1, v335);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v51->setTag)(v51, 1);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(a1->m_mainMenu, v51);
v52 = (float32x2_t *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_button->getPosition)(a1->m_button);
v53.n128_u32[0] = -1038090240;
v54.n128_u32[0] = -8.0;
sub_100022980(v53, v54, &m_creatorName);
*(float32x2_t *)&v55 = sub_1000229DC(v52, (float32x2_t *)&m_creatorName, (float32x2_t *)&__dst);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v51->setPosition)(v51, &__dst, v55);
v56 = ButtonSprite::create_1("Delete", 40, 0, 0.6, 1, "bigFont.fnt", "GJ_button_06.png", 30.0);
v336.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onClick;
v336.adj = 0;
v57 = CCMenuItemSpriteExtra::create(v56, nullptr, a1, v336);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v57->setTag)(v57, 4);
v58 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(
a1->m_mainMenu,
v57);
m_mainMenu = a1->m_mainMenu;
v58.n128_f32[0] = -v25;
v60.n128_u32[0] = 0;
sub_100022980(v58, v60, &v325);
sub_1000229DC((float32x2_t *)&a1->m_point, &v325, (float32x2_t *)&m_creatorName);
v330 = cocos2d::CCNode::convertToNodeSpace(m_mainMenu, (const cocos2d::CCPoint *)&m_creatorName);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))v57->setPosition)(
v57,
&__dst,
v330.x,
v330.y);
LevelCell::updateCellMode(a1, a1->m_cellMode);
}
if ( a1->m_level->m_accountID.random <= a1->m_level->m_accountID.seed )
{
v62 = GameLevelManager::sharedState();
v61 = GameLevelManager::accountIDForUserID(v62, a1->m_level->m_userID.random - a1->m_level->m_userID.seed) == 0;
}
else
{
v61 = 0;
}
memset(&__dst, 0, sizeof(__dst));
if ( !a1->m_compactView )
std::string::append(&__dst, "By ");
v63 = a1->m_level;
if ( v63->m_creatorName.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(
&m_creatorName,
(void *)v63->m_creatorName.m_data.m_long.capacitym1,
v63->m_creatorName.m_data.m_long.size);
else
m_creatorName = (std::string)v63->m_creatorName;
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_m_creatorName = &m_creatorName;
else
p_m_creatorName = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(m_creatorName.__r_.__value_.__r.__words[2]);
else
size = m_creatorName.__r_.__value_.__l.__size_;
std::string::append(&__dst, (const std::string::value_type *)p_m_creatorName, size);
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_dst = &__dst;
else
p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0];
v319 = cocos2d::CCLabelBMFont::create_1((const char *)p_dst, "goldFont.fnt");
sub_1000229B0(&v325);
if ( a1->m_compactView )
{
cocos2d::CCLabelBMFont::limitLabelWidth(v319, 80.0, 0.45, 0.0);
v67 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getPosition)(v12);
v68 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getContentSize)(v12);
v69 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getScale)(v12);
v70 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getContentSize)(v319);
v71.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getScale)(v319);
v71.n128_f32[0] = (float)((float)((float)(v70 * 0.5) * v71.n128_f32[0]) + (float)(v68 * v69)) + 5.0;
v72.n128_u32[0] = 0;
sub_100022980(v71, v72, &v324);
sub_1000229DC(v67, &v324, (float32x2_t *)&m_creatorName);
}
else
{
cocos2d::CCLabelBMFont::limitLabelWidth(v319, 140.0, 0.7, 0.0);
v73 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getPosition)(v12);
v74 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getContentSize)(v319);
v75.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getScale)(v319);
v75.n128_f32[0] = (float)((float)(v74 * 0.5) * v75.n128_f32[0]) + 2.0;
v76.n128_u32[0] = -22.0;
sub_100022980(v75, v76, &v324);
sub_1000229DC(v73, &v324, (float32x2_t *)&m_creatorName);
}
sub_1000229D0(&v325, (double *)&m_creatorName);
v337.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelCell::onViewProfile;
v337.adj = 0;
v77 = CCMenuItemSpriteExtra::create(v319, nullptr, a1, v337);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_mainMenu->addChild)(a1->m_mainMenu, v77);
v331 = cocos2d::CCNode::convertToNodeSpace(a1->m_mainMenu, (const cocos2d::CCPoint *)&v325);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))v77->setPosition)(
v77,
&m_creatorName,
v331.x,
v331.y);
if ( v61 )
{
m_creatorName.__r_.__value_.__s.__data_[2] = -1;
LOWORD(m_creatorName.__r_.__value_.__l.__data_) = -166;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v319->setColor)(v319, &m_creatorName);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v77->setEnabled)(v77, 0);
}
sub_1000229B0(&v324);
if ( a1->m_compactView )
{
v78.n128_f32[0] = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getPosition)(v12) + 1.0;
v79.n128_f32[0] = (float)(a1->m_height * 0.5) + -1.0;
sub_100022980(v78, v79, &m_creatorName);
sub_1000229D0(&v324, (double *)&m_creatorName);
v80 = 150.0;
v81 = 0.36;
}
else
{
v82.n128_f32[0] = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v12->getPosition)(v12) + 2.0;
v83.n128_f32[0] = (float)(a1->m_height * 0.5) + -12.0;
sub_100022980(v82, v83, &m_creatorName);
sub_1000229D0(&v324, (double *)&m_creatorName);
v80 = 195.0;
v81 = 0.45;
}
v84 = MusicDownloadManager::sharedState();
SongInfoObject = MusicDownloadManager::getSongInfoObject(v84, a1->m_level->m_songID);
v86 = SongInfoObject;
v316 = hasCompletedLevel;
if ( SongInfoObject )
{
m_nongType = SongInfoObject->m_nongType;
if ( m_nongType >= 1 )
{
if ( m_nongType == 2 )
v88 = "chompo_small_001.png";
else
v88 = "ncs_small_001.png";
v89 = cocos2d::CCSprite::createWithSpriteFrameName(v88);
v90 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))a1->m_mainLayer->addChild)(
a1->m_mainLayer,
v89);
v90.n128_u32[0] = 14.0;
v91.n128_u32[0] = -1.0;
sub_100022980(v90, v91, &v323);
sub_1000229DC(&v324, &v323, (float32x2_t *)&m_creatorName);
if ( v86->m_nongType == 2 )
{
m_creatorName.__r_.__value_.__l.__data_ = (std::string::pointer)vadd_f32(
(float32x2_t)m_creatorName.__r_.__value_.__l.__data_,
(float32x2_t)0xBF00000040400000LL);
v92 = v324.f32[0] + 40.0;
v93 = -20.0;
}
else
{
v92 = v324.f32[0] + 34.0;
v93 = -15.0;
}
v324.f32[0] = v92;
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v89->setPosition)(v89, &m_creatorName);
v80 = v80 + v93;
}
}
GJGameLevel::getSongName((__int64)a1->m_level, (__int64)&m_creatorName);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v94 = &m_creatorName;
else
v94 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v95 = cocos2d::CCLabelBMFont::create_1((const char *)v94, "bigFont.fnt");
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
v96 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(
a1->m_mainLayer,
v95);
v96.n128_u32[0] = 0;
v97.n128_u32[0] = 0.5;
sub_100022980(v96, v97, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v95->setAnchorPoint)(v95, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v95->setPosition)(v95, &v324);
cocos2d::CCLabelBMFont::limitLabelWidth(v95, v80, v81, 0.0);
if ( a1->m_level->m_songID <= 0 )
{
m_creatorName.__r_.__value_.__s.__data_[2] = -1;
LOWORD(m_creatorName.__r_.__value_.__l.__data_) = -11736;
}
else
{
m_creatorName.__r_.__value_.__s.__data_[2] = -1;
LOWORD(m_creatorName.__r_.__value_.__l.__data_) = -32001;
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v95->setColor)(v95, &m_creatorName);
v98 = random;
AverageDifficulty = GJGameLevel::getAverageDifficulty(a1->m_level);
v100 = a1->m_level;
if ( v100->m_demon.random - v100->m_demon.seed == 1 )
AverageDifficulty = GJGameLevel::demonIconForDifficulty((DemonDifficultyType)v100->m_demonDifficulty);
v101 = AverageDifficulty;
v102 = (cocos2d::CCString *)sub_100268F4C("difficulty_%02d_btn_001.png", AverageDifficulty);
cocos2d::CCString::getCString(v102);
v103 = cocos2d::CCNode::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCNode *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v103,
2);
v104 = ((__n128 (__fastcall *)(cocos2d::CCNode *, void *))v103->setContentSize)(v103, &unk_10086B0B8);
v105.n128_f32[0] = a1->m_height * 0.5;
v104.n128_u32[0] = 26.0;
sub_100022980(v104, v105, &m_creatorName);
((void (__fastcall *)(cocos2d::CCNode *, std::string *))v103->setPosition)(v103, &m_creatorName);
if ( a1->m_compactView )
{
((void (__fastcall *)(cocos2d::CCNode *, float))v103->setScale)(v103, 0.7);
v108 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCNode *))v103->getPosition)(v103);
v109.n128_u32[0] = 18.0;
v110.n128_u32[0] = 1.0;
sub_100022980(v109, v110, &v323);
*(float32x2_t *)&v111 = sub_1000229DC(v108, &v323, (float32x2_t *)&m_creatorName);
v106 = ((__n128 (__fastcall *)(cocos2d::CCNode *, std::string *, double))v103->setPosition)(
v103,
&m_creatorName,
v111);
}
v106.n128_u32[0] = 0;
v107.n128_u32[0] = 0;
sub_100022980(v106, v107, &v323);
v112 = a1->m_level;
if ( v112->m_coins <= 0 )
{
v113 = 0;
v117 = v112->m_stars.random > v112->m_stars.seed;
}
else
{
v113 = !a1->m_compactView;
v114 = v112->m_stars.random;
v115 = v112->m_stars.seed;
v116 = v114 <= v115;
v117 = v114 > v115;
if ( !v116 )
{
v118 = 14.0;
if ( !a1->m_compactView )
goto LABEL_108;
}
}
v118 = 5.0;
if ( v117 || v113 )
LABEL_108:
v323.f32[1] = v323.f32[1] + v118;
if ( v98 > seed )
v323.f32[1] = v323.f32[1] + 10.0;
if ( v112->m_autoLevel )
v119 = -1;
else
v119 = v101;
v120 = GJDifficultySprite::create(v119, Short);
GJDifficultySprite::updateFeatureStateFromLevel(v120, a1->m_level);
((void (__fastcall *)(cocos2d::CCNode *, GJDifficultySprite *, __int64))v103->addChild_0)(v103, v120, 3);
((void (__fastcall *)(GJDifficultySprite *, float32x2_t *))v120->setPosition)(v120, &v323);
v121 = GameStatsManager::sharedState();
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v121, a1->m_level);
v318 = v12;
if ( a1->m_level->m_stars.random > a1->m_level->m_stars.seed )
{
v123 = hasCompletedStarLevel;
v124 = m_levelLength == 5 ? "moon_small01_001.png" : "star_small01_001.png";
v125 = cocos2d::CCSprite::createWithSpriteFrameName(v124);
v126 = ((__n128 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *))v103->addChild)(v103, v125);
v126.n128_u32[0] = 8.0;
v127.n128_u32[0] = -30.0;
sub_100022980(v126, v127, &v322);
*(float32x2_t *)&v128 = sub_1000229DC(&v323, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v125->setPosition)(v125, &m_creatorName, v128);
v129 = (cocos2d::CCString *)sub_100268F4C("%i", a1->m_level->m_stars.random - a1->m_level->m_stars.seed);
CString = cocos2d::CCString::getCString(v129);
v131 = cocos2d::CCLabelBMFont::create_1(CString, "bigFont.fnt");
v132 = ((__n128 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *))v103->addChild)(v103, v131);
v132.n128_u32[0] = 1.0;
v133.n128_u32[0] = 0.5;
sub_100022980(v132, v133, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v131->setAnchorPoint)(v131, &m_creatorName);
v134 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v125->getPosition)(v125);
v135.n128_u32[0] = -8.0;
v136.n128_u32[0] = 0;
sub_100022980(v135, v136, &v322);
*(float32x2_t *)&v137 = sub_1000229DC(v134, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v131->setPosition)(
v131,
&m_creatorName,
v137);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v131->setScale)(v131, 0.4);
if ( v123 )
{
LOWORD(m_creatorName.__r_.__value_.__l.__data_) = -1;
m_creatorName.__r_.__value_.__s.__data_[2] = 50;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v131->setColor)(v131, &m_creatorName);
}
}
v116 = v98 <= seed;
v138 = a1;
if ( v116 )
{
v158 = a1->m_level;
m_coins = v158->m_coins;
if ( m_coins < 1 )
goto LABEL_167;
if ( v158->m_stars.random <= v158->m_stars.seed )
v160 = -31.5;
else
v160 = -45.5;
goto LABEL_134;
}
v139 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png");
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *))v103->addChild)(v103, v139);
memset(&m_creatorName, 0, sizeof(m_creatorName));
v140 = GameStatsManager::sharedState();
BaseDiamonds = GameStatsManager::getBaseDiamonds(v140, a1->m_level->m_stars.random - a1->m_level->m_stars.seed);
v142 = GameStatsManager::sharedState();
AwardedDiamondsForLevel = GameStatsManager::getAwardedDiamondsForLevel(v142, a1->m_level);
v144 = (cocos2d::CCString *)sub_100268F4C("%i/%i", AwardedDiamondsForLevel, BaseDiamonds);
v145 = cocos2d::CCString::getCString(v144);
std::string::assign(&m_creatorName, v145);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v146 = &m_creatorName;
else
v146 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v147 = cocos2d::CCLabelBMFont::create_1((const char *)v146, "bigFont.fnt");
v148 = ((__n128 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCLabelBMFont *))v103->addChild)(v103, v147);
v148.n128_u32[0] = 1.0;
v149.n128_u32[0] = 0.5;
sub_100022980(v148, v149, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v147->setAnchorPoint)(v147, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v147->setScale)(v147, 0.35);
v150 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v147->getContentSize)(v147);
v151.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v147->getScale)(v147);
v151.n128_f32[0] = (float)((float)(v150 * v151.n128_f32[0]) * 0.5) + 2.0;
v152.n128_u32[0] = -1036910592;
sub_100022980(v151, v152, &v321);
*(float32x2_t *)&v153 = sub_1000229DC(&v323, &v321, &v322);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v139->setPosition)(v139, &v322, v153);
v154 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v139->getPosition)(v139);
v155.n128_u32[0] = -8.0;
v156.n128_u32[0] = 0;
sub_100022980(v155, v156, &v321);
*(float32x2_t *)&v157 = sub_1000229DC(v154, &v321, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v147->setPosition)(v147, &v322, v157);
if ( AwardedDiamondsForLevel == BaseDiamonds )
{
v322.i8[2] = -1;
v322.i16[0] = -156;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v147->setColor)(v147, &v322);
}
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
v158 = a1->m_level;
m_coins = v158->m_coins;
if ( m_coins > 0 )
{
v160 = -60.0;
LABEL_134:
v161 = 0;
v162 = v158->m_coinsVerified.random;
v163 = v158->m_coinsVerified.seed;
do
{
if ( v161 == 2 )
{
v164 = 10.0;
}
else if ( v161 == 1 )
{
if ( m_coins == 2 )
v164 = 5.0;
else
v164 = 0.0;
}
else
{
v164 = -5.0;
if ( m_coins != 2 )
{
if ( (unsigned int)m_coins <= 2 )
v164 = 0.0;
else
v164 = -10.0;
}
}
CoinKey = (char *)GJGameLevel::getCoinKey(v158, ++v161);
sub_100009900(&m_creatorName, CoinKey);
v166 = GameStatsManager::sharedState();
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v167 = &m_creatorName;
else
v167 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
if ( GameStatsManager::hasUserCoin(v166, (const char *)v167) )
{
hasPendingUserCoin = 1;
}
else
{
v169 = GameStatsManager::sharedState();
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v170 = &m_creatorName;
else
v170 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v169, (const char *)v170);
}
v171 = cocos2d::CCSprite::createWithSpriteFrameName("usercoin_small01_001.png");
if ( v138->m_compactView )
{
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v171);
((void (__fastcall *)(cocos2d::CCSprite *, float))v171->setScale)(v171, 0.7);
v172 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v95->getPosition)(v95);
v173 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v95->getContentSize)(v95);
v174 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v95->getScale)(v95);
v175.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCSprite *))v171->getScale)(v171);
v175.n128_f32[0] = (float)((float)(v173 * v174) + 18.0) + (float)(v164 * v175.n128_f32[0]);
v176.n128_u32[0] = 0;
sub_100022980(v175, v176, &v321);
*(float32x2_t *)&v177 = sub_1000229DC(v172, &v321, &v322);
}
else
{
v178 = ((__n128 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSprite *))v103->addChild)(v103, v171);
v178.n128_f32[0] = v164;
v179.n128_f32[0] = v160;
sub_100022980(v178, v179, &v321);
*(float32x2_t *)&v177 = sub_1000229DC(&v323, &v321, &v322);
}
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v171->setPosition)(v171, &v322, v177);
if ( v162 == v163 )
{
v180 = 4960255;
if ( !hasPendingUserCoin )
v180 = 3174821;
v322.i16[0] = v180;
v322.i8[2] = BYTE2(v180);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v171->setColor)(v171, &v322);
}
else if ( !hasPendingUserCoin )
{
v322.i8[2] = -91;
v322.i16[0] = -23131;
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v171->setColor)(v171, &v322);
}
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
if ( (unsigned int)(v161 - 1) > 1 )
break;
v158 = v138->m_level;
m_coins = v158->m_coins;
}
while ( v161 < m_coins );
}
LABEL_167:
v181 = v318;
v182 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v318->getPosition)(v318);
if ( v138->m_compactView )
v183 = 6.0;
else
v183 = 9.0;
if ( v138->m_compactView )
v184 = 60.0;
else
v184 = 80.0;
if ( v138->m_compactView )
v185 = 8.5;
else
v185 = 14.0;
if ( v138->m_compactView )
v186 = 0.4;
else
v186 = 0.6;
v187 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png");
v188 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v187);
v188.n128_f32[0] = v182 + v183;
v189.n128_f32[0] = v185;
sub_100022980(v188, v189, &m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v187->setPosition)(v187, &m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, float))v187->setScale)(v187, v186);
v190 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(v138->m_mainLayer, v190);
v191 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v187->getPosition)(v187);
v192.n128_u32[0] = 0;
v193.n128_f32[0] = v184;
sub_100022980(v193, v192, &v322);
*(float32x2_t *)&v194 = sub_1000229DC(v191, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v190->setPosition)(v190, &m_creatorName, v194);
((void (__fastcall *)(cocos2d::CCSprite *, float))v190->setScale)(v190, v186);
v195 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(v138->m_mainLayer, v195);
v196 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v190->getPosition)(v190);
v197.n128_u32[0] = 0;
v198.n128_f32[0] = v184;
sub_100022980(v198, v197, &v322);
*(float32x2_t *)&v199 = sub_1000229DC(v196, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v195->setPosition)(v195, &m_creatorName, v199);
((void (__fastcall *)(cocos2d::CCSprite *, float))v195->setScale)(v195, v186);
v200 = (unsigned int *)v138->m_level;
if ( (int)v200[208] <= (int)v200[209] )
v201 = 25;
else
v201 = 18;
if ( v138->m_compactView )
v202 = 0.3;
else
v202 = 0.4;
if ( v138->m_compactView )
v203 = (float)v201 * 0.8;
else
v203 = (float)v201;
GJGameLevel::lengthKeyToString(v200[196], &m_creatorName);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v204 = &m_creatorName;
else
v204 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v205 = cocos2d::CCLabelBMFont::create_1((const char *)v204, "bigFont.fnt");
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
v206 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v205);
v206.n128_u32[0] = 0;
v207.n128_u32[0] = 0.5;
sub_100022980(v206, v207, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v205->setAnchorPoint)(v205, &m_creatorName);
v208 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v187->getPosition)(v187);
v209.n128_u32[0] = 10.0;
v210.n128_u32[0] = 0;
sub_100022980(v209, v210, &v322);
*(float32x2_t *)&v211 = sub_1000229DC(v208, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v205->setPosition)(v205, &m_creatorName, v211);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v205->setScale)(v205, v202);
cocos2d::CCLabelBMFont::limitLabelWidth(v205, 50.0, v202, 0.0);
v212 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v205->getPosition)(v205);
v213 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v205->getContentSize)(v205);
v214 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v205->getScale)(v205);
v215 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v190->getPosition)(v190);
v216.n128_f32[0] = v203 + (float)(v212 + (float)(v213 * v214));
v217.n128_u32[0] = *(_DWORD *)(v215 + 4);
sub_100022980(v216, v217, &m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v190->setPosition)(v190, &m_creatorName);
GameToolbox::intToShortString((unsigned int)v138->m_level->m_downloads, &m_creatorName);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v218 = &m_creatorName;
else
v218 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v219 = cocos2d::CCLabelBMFont::create_1((const char *)v218, "bigFont.fnt");
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
v220 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v219);
v220.n128_u32[0] = 0;
v221.n128_u32[0] = 0.5;
sub_100022980(v220, v221, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v219->setAnchorPoint)(v219, &m_creatorName);
v222 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v190->getPosition)(v190);
v223.n128_u32[0] = 9.0;
v224.n128_u32[0] = 0;
sub_100022980(v223, v224, &v322);
*(float32x2_t *)&v225 = sub_1000229DC(v222, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v219->setPosition)(v219, &m_creatorName, v225);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v219->setScale)(v219, v202);
cocos2d::CCLabelBMFont::limitLabelWidth(v219, 45.0, v202, 0.0);
v226 = v138->m_level;
m_likes = v226->m_likes;
LODWORD(v226) = v226->m_dislikes;
v228 = (unsigned int)(m_likes - (_DWORD)v226);
if ( m_likes - (int)v226 < 0 )
{
v229 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v230 = "GJ_dislikesIcon_001.png";
}
else
{
v229 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v230 = "GJ_likesIcon_001.png";
}
v231 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v229, v230);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))v195->setDisplayFrame)(v195, v231);
v232 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v219->getPosition)(v219);
v233 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v219->getContentSize)(v219);
v234 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v219->getScale)(v219);
v235 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v195->getPosition)(v195);
v236.n128_f32[0] = v203 + (float)(v232 + (float)(v233 * v234));
v237.n128_u32[0] = *(_DWORD *)(v235 + 4);
sub_100022980(v236, v237, &m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v195->setPosition)(v195, &m_creatorName);
GameToolbox::intToShortString(v228, &m_creatorName);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v238 = &m_creatorName;
else
v238 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v239 = cocos2d::CCLabelBMFont::create_1((const char *)v238, "bigFont.fnt");
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
v240 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v239);
v240.n128_u32[0] = 0;
v241.n128_u32[0] = 0.5;
sub_100022980(v240, v241, &m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v239->setAnchorPoint)(v239, &m_creatorName);
v242 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v195->getPosition)(v195);
v243.n128_u32[0] = 10.0;
v244.n128_u32[0] = 0;
sub_100022980(v243, v244, &v322);
*(float32x2_t *)&v245 = sub_1000229DC(v242, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v239->setPosition)(v239, &m_creatorName, v245);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v239->setScale)(v239, v202);
cocos2d::CCLabelBMFont::limitLabelWidth(v239, 45.0, v202, 0.0);
if ( v138->m_level->m_stars.random - v138->m_level->m_stars.seed >= 2 )
{
v246 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(v138->m_mainLayer, v246);
v247 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v195->getPosition)(v195);
v248.n128_u32[0] = 0;
v249.n128_f32[0] = v184;
sub_100022980(v249, v248, &v322);
*(float32x2_t *)&v250 = sub_1000229DC(v247, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v246->setPosition)(v246, &m_creatorName, v250);
((void (__fastcall *)(cocos2d::CCSprite *, float))v246->setScale)(v246, v186);
v251 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v239->getPosition)(v239);
v252 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v239->getContentSize)(v239);
v253 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v239->getScale)(v239);
v254 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v246->getPosition)(v246);
v255.n128_f32[0] = v203 + (float)(v251 + (float)(v252 * v253));
v256.n128_u32[0] = *(_DWORD *)(v254 + 4);
sub_100022980(v255, v256, &m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v246->setPosition)(v246, &m_creatorName);
v257 = GameStatsManager::sharedState();
BaseCurrencyForLevel = GameStatsManager::getBaseCurrencyForLevel(v257, v138->m_level);
v259 = GameStatsManager::sharedState();
AwardedCurrencyForLevel = GameStatsManager::getAwardedCurrencyForLevel(v259, v138->m_level);
v261 = AwardedCurrencyForLevel;
v262 = (int)vcvts_n_f32_s32(BaseCurrencyForLevel, 2u);
v263 = BaseCurrencyForLevel + v262;
memset(&m_creatorName, 0, sizeof(m_creatorName));
if ( (int)(BaseCurrencyForLevel + v262) <= AwardedCurrencyForLevel )
v264 = (cocos2d::CCString *)sub_100268F4C("%i", BaseCurrencyForLevel + v262);
else
v264 = (cocos2d::CCString *)sub_100268F4C("%i/%i", AwardedCurrencyForLevel, BaseCurrencyForLevel + v262);
v265 = cocos2d::CCString::getCString(v264);
std::string::assign(&m_creatorName, v265);
if ( (m_creatorName.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v266 = &m_creatorName;
else
v266 = (std::string *)m_creatorName.__r_.__value_.__r.__words[0];
v181 = v318;
v267 = cocos2d::CCLabelBMFont::create_1((const char *)v266, "bigFont.fnt");
v268 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))v138->m_mainLayer->addChild)(
v138->m_mainLayer,
v267);
v268.n128_u32[0] = 0;
v269.n128_u32[0] = 0.5;
sub_100022980(v268, v269, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v267->setAnchorPoint)(v267, &v322);
v270 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v246->getPosition)(v246);
v271.n128_u32[0] = 10.0;
v272.n128_u32[0] = 0;
sub_100022980(v271, v272, &v321);
*(float32x2_t *)&v273 = sub_1000229DC(v270, &v321, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v267->setPosition)(v267, &v322, v273);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v267->setScale)(v267, v202);
if ( v263 == v261 )
{
v322.i8[2] = -1;
v322.i16[0] = -156;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v267->setColor)(v267, &v322);
}
cocos2d::CCLabelBMFont::limitLabelWidth(v267, 45.0, v202, 0.0);
if ( SHIBYTE(m_creatorName.__r_.__value_.__r.__words[2]) < 0 )
operator delete(m_creatorName.__r_.__value_.__l.__data_);
}
v274 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v195->getPosition)(v195);
v275.n128_u32[0] = 0;
v276.n128_u32[0] = 1.0;
sub_100022980(v275, v276, &v322);
*(float32x2_t *)&v277 = sub_1000229DC(v274, &v322, (float32x2_t *)&m_creatorName);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v195->setPosition)(v195, &m_creatorName, v277);
v278 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v181->getPosition)(v181);
v279 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v181->getContentSize)(v181);
v280 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v181->getScale)(v181);
v281 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v181->getPosition)(v181);
v282.n128_f32[0] = (float)(v278 + (float)(v279 * v280)) + 10.0;
v283.n128_f32[0] = *(float *)(v281 + 4) + -1.0;
sub_100022980(v282, v283, &m_creatorName);
if ( v138->m_compactView )
{
v284.n128_u32[0] = 16.0;
v285.n128_u32[0] = 10.0;
sub_100022980(v284, v285, &v322);
sub_1000229D0(&m_creatorName, (double *)&v322);
}
if ( v316 )
{
v286 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png");
if ( !v138->m_compactView )
{
v287.n128_u32[0] = 0;
v288.n128_u32[0] = 0.5;
sub_100022980(v287, v288, &v322);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v286->setAnchorPoint)(v286, &v322);
}
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(v138->m_mainLayer, v286);
((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v286->setPosition)(v286, &m_creatorName);
v289.n128_u32[0] = 0.5;
if ( !v138->m_compactView )
v289.n128_f32[0] = 0.8;
((void (__fastcall *)(cocos2d::CCSprite *, __n128))v286->setScale)(v286, v289);
}
else if ( SavedLevel )
{
NormalPercent = GJGameLevel::getNormalPercent(SavedLevel);
if ( NormalPercent )
{
v291 = (cocos2d::CCString *)sub_100268F4C("%i%%", NormalPercent);
v292 = cocos2d::CCString::getCString(v291);
v293 = cocos2d::CCLabelBMFont::create_1(v292, "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v138->m_mainLayer->addChild_0)(
v138->m_mainLayer,
v293,
10);
v294.n128_u32[0] = 1058642330;
if ( v138->m_compactView )
v294.n128_f32[0] = 0.4;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __n128))v293->setScale)(v293, v294);
v297 = v138->m_compactView;
if ( (v297 & 1) == 0 )
{
v295.n128_u32[0] = 0;
v296.n128_u32[0] = 0.5;
sub_100022980(v295, v296, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *))v293->setAnchorPoint)(v293, &v322);
v297 = v138->m_compactView;
}
v295.n128_f32[0] = (float)v297;
v296.n128_u32[0] = 0;
sub_100022980(v295, v296, &v321);
*(float32x2_t *)&v298 = sub_1000229DC((float32x2_t *)&m_creatorName, &v321, &v322);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v293->setPosition)(v293, &v322, v298);
}
}
if ( v138->m_compactView )
v299 = 0.8;
else
v299 = 1.0;
v300 = v325.f32[0];
v301 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getContentSize)(v319);
v302.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v319->getScale)(v319);
v302.n128_f32[0] = (float)(v300 + (float)((float)(v301 * 0.5) * v302.n128_f32[0])) + (float)(v299 * 6.0);
v303.n128_f32[0] = v325.f32[1] + -1.0;
sub_100022980(v302, v303, &v322);
v304 = v138->m_level;
if ( v304->m_originalLevel.random != v304->m_originalLevel.seed )
{
v305 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png");
v306.n128_u32[0] = 0;
v307.n128_u32[0] = 0.5;
sub_100022980(v306, v307, &v321);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v305->setAnchorPoint)(v305, &v321);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))v138->m_mainLayer->addChild)(v138->m_mainLayer, v305);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v305->setPosition)(v305, &v322);
v308 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v305->setScale)(v305, v299);
v308.n128_u32[0] = 15.0;
v309.n128_u32[0] = 0;
sub_100022980(v308, v309, &v320);
sub_1000229DC(&v322, &v320, &v321);
sub_1000229D0(&v322, (double *)&v321);
v304 = v138->m_level;
}
if ( v304->m_objectCount.random - v304->m_objectCount.seed >= 40001 )
{
v310 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png");
v311.n128_u32[0] = 0;
v312.n128_u32[0] = 0.5;
sub_100022980(v311, v312, &v321);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v310->setAnchorPoint)(v310, &v321);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v138->m_mainLayer->addChild_0)(
v138->m_mainLayer,
v310,
10);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v310->setPosition)(v310, &v322);
v313 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v310->setScale)(v310, v299);
v313.n128_f32[0] = v299 * 18.0;
v314.n128_u32[0] = 0;
sub_100022980(v313, v314, &v320);
sub_1000229DC(&v322, &v320, &v321);
sub_1000229D0(&v322, (double *)&v321);
}
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( __p.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)__p.m_data.m_long.capacitym1);
}