//
// InfoLayer::init from 0x10034f994 to 0x1003512c0 (6444 bytes)
//
// 1 xrefs:
// > InfoLayer::create @ 0x10034f944
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall InfoLayer::init(InfoLayer *a1, GJGameLevel *a2, GJUserScore *a3, GJLevelList *a4)
{
_BOOL4 inited; // w19
CommentKeyType v9; // w8
GameManager *v10; // x0
_BOOL4 GameVariable; // w21
GameManager *v12; // x0
GameManager *v13; // x0
float v14; // s10
int v15; // w26
cocos2d::CCDirector *v16; // x0
cocos2d::extension::CCScale9Sprite *v17; // x22
__n128 v18; // q0
__n128 v19; // q1
cocos2d::CCMenu *v20; // x0
GJUserScore *m_score; // x8
GJLevelList *m_levelList; // x8
std::string *p_m_listName; // x8
const char *v24; // x8
cocos2d::CCString *v25; // x0
const char *v26; // x22
cocos2d::CCLabelBMFont *v27; // x22
__n128 v28; // q0
__n128 v29; // q1
GJGameLevel *m_level; // x8
void *capacitym1; // x1
unsigned __int64 size; // x2
const char *p_dst; // x0
cocos2d::CCLabelBMFont *v34; // x23
__n128 v35; // q0
__n128 v36; // q1
float v37; // s2
float v38; // s9
float v39; // s1
GJLevelList *v40; // x8
int m_accountID; // w24
std::string *p_m_creatorName; // x8
GJGameLevel *v43; // x8
int random; // w9
GJGameLevel *v45; // x8
GameLevelManager *v46; // x0
const char *v47; // x8
cocos2d::CCString *v48; // x0
const char *CString; // x0
cocos2d::CCLabelBMFont *v50; // x22
float v51; // s8
__int64 v52; // x0
__n128 v53; // q0
__n128 v54; // q1
float v55; // s1
__n128 v56; // q0
float v57; // s9
float v58; // s11
float v59; // s12
float v60; // s13
__int64 v61; // x0
__n128 v62; // q0
__n128 v63; // q1
float32x2_t *v64; // x25
float v65; // s9
__n128 v66; // q0
__n128 v67; // q1
CCMenuItemSpriteExtra *v68; // x23
__n128 v69; // q0
__n128 v70; // q1
double v71; // d0
cocos2d::extension::CCScale9Sprite *v72; // x24
GJLevelList *v73; // x0
bool v74; // w0
bool v75; // w24
void **v76; // x1
std::string::size_type v77; // x24
std::string::size_type v78; // x8
unsigned __int8 v79; // w11
std::string::size_type v80; // x12
std::string::size_type v81; // x22
std::string *v82; // x23
std::string::size_type v83; // x21
std::string::size_type v84; // x19
void **p_p; // x25
signed __int64 v86; // x26
unsigned __int64 v87; // x13
signed __int64 v88; // x9
char *v89; // x28
char *v90; // x0
int v91; // w24
char *v92; // x0
char *v93; // x27
std::string::size_type v94; // x2
const std::string::value_type *v95; // x3
std::string::size_type v96; // x4
std::string::size_type v97; // x8
unsigned int v98; // w8
int v99; // w9
float v100; // s9
std::string *v101; // x1
__n128 v102; // q0
__n128 v103; // q1
cocos2d::CCObject *v104; // x24
__n128 v105; // q0
__n128 v106; // q1
double v107; // d0
GJGameLevel *v108; // x8
GameManager *v109; // x0
ButtonSprite *v110; // x24
CCMenuItemSpriteExtra *v111; // x24
float32x2_t *v112; // x23
float v113; // s8
__n128 v114; // q0
__n128 v115; // q1
double v116; // d0
cocos2d::CCSprite *v117; // x0
CCMenuItemSpriteExtra *v118; // x22
__n128 v119; // q0
cocos2d::CCMenu *m_buttonMenu; // x23
__n128 v121; // q1
cocos2d::CCSprite *v122; // x0
CCMenuItemSpriteExtra *v123; // x0
__n128 v124; // q0
CCMenuItemSpriteExtra *m_reportBtn; // x23
cocos2d::CCMenu *v126; // x24
__n128 v127; // q1
GameLevelManager *v128; // x0
GJUserScore *v129; // x8
int m_userID; // w1
GJLevelList *v131; // x8
GJGameLevel *v132; // x8
_BOOL4 hasReportedLevel; // w23
__int64 v134; // x0
__int16 v135; // w8
cocos2d::CCSprite *v136; // x0
CCMenuItemSpriteExtra *v137; // x22
cocos2d::CCMenu *v138; // x23
__n128 v139; // q0
__n128 v140; // q1
LoadingCircle *v141; // x0
__n128 v142; // q0
cocos2d::CCSprite *m_sprite; // x22
__n128 v144; // q1
cocos2d::CCMenu *v145; // x22
float v146; // s9
cocos2d::CCSprite *v147; // x24
CCMenuItemSpriteExtra *v148; // x0
__n128 v149; // q0
CCMenuItemSpriteExtra *m_leftArrow; // x24
__n128 v151; // q1
cocos2d::CCSprite *v152; // x23
CCMenuItemSpriteExtra *v153; // x0
__n128 v154; // q0
CCMenuItemSpriteExtra *m_rightArrow; // x23
__n128 v156; // q1
cocos2d::CCLabelBMFont *v157; // x0
cocos2d::CCLabelBMFont *m_pageLabel; // x22
cocos2d::CCDirector *v159; // x0
float v160; // s9
AppDelegate *v161; // x0
float v162; // s0
float v163; // s9
cocos2d::CCDirector *v164; // x0
__n128 v165; // q1
__n128 v166; // q0
__n128 v167; // q0
cocos2d::CCLabelBMFont *v168; // x22
__n128 v169; // q1
cocos2d::CCMenu *v170; // x22
__n128 v171; // q0
__n128 v172; // q1
CCMenuItemSpriteExtra *SpriteButton; // x0
__n128 v174; // q0
__n128 v175; // q1
CCMenuItemSpriteExtra *v176; // x0
__n128 v177; // q0
__n128 v178; // q1
char v179; // w8
CCMenuItemSpriteExtra *v180; // x0
ButtonSprite *v181; // x0
const char *v182; // x1
CCMenuItemSpriteExtra *v183; // x0
ButtonSprite *v184; // x23
GameManager *v185; // x0
const char *v186; // x1
__n128 v187; // q0
__n128 v188; // q1
ButtonSprite *v189; // x0
CCMenuItemSpriteExtra *v190; // x0
CCMenuItemSpriteExtra *m_commentsBtn; // x22
cocos2d::CCMenu *v192; // x23
__n128 v193; // q0
__n128 v194; // q1
const char *v195; // x0
cocos2d::CCLabelBMFont *v196; // x0
__n128 v197; // q0
cocos2d::CCLabelBMFont *m_noComments; // x22
__n128 v199; // q1
GJUserScore *v200; // x8
int v201; // w23
GJLevelList *v202; // x8
GJGameLevel *v203; // x8
GameManager *v204; // x0
_BOOL4 v205; // w0
GameLevelManager *v206; // x0
const char *v207; // x1
GameManager *v208; // x0
cocos2d::CCSprite *v209; // x0
CCMenuItemSpriteExtra *v210; // x22
__n128 v211; // q0
cocos2d::CCMenu *v212; // x23
__n128 v213; // q1
cocos2d::CCSprite *v214; // x22
CCMenuItemSpriteExtra *v215; // x0
__n128 v216; // q0
CCMenuItemSpriteExtra *m_refreshCommentsBtn; // x22
cocos2d::CCMenu *v218; // x23
__n128 v219; // q1
float v221; // s1
float v222; // s2
float v223; // s3
char v224; // [xsp+8h] [xbp-1B8h]
CCMenuItemSpriteExtra *v225; // [xsp+10h] [xbp-1B0h]
cocos2d::CCLabelBMFont *v226; // [xsp+18h] [xbp-1A8h]
int v227; // [xsp+24h] [xbp-19Ch]
_BOOL4 v228; // [xsp+28h] [xbp-198h]
bool v229; // [xsp+2Ch] [xbp-194h]
std::string::size_type v230; // [xsp+30h] [xbp-190h]
unsigned __int8 v231; // [xsp+38h] [xbp-188h]
float32x2_t v232; // [xsp+40h] [xbp-180h] BYREF
float32x2_t v233; // [xsp+48h] [xbp-178h] BYREF
void *v234[2]; // [xsp+50h] [xbp-170h] BYREF
char v235; // [xsp+67h] [xbp-159h]
void *v236; // [xsp+68h] [xbp-158h] BYREF
std::string::size_type v237; // [xsp+70h] [xbp-150h]
unsigned __int8 v238; // [xsp+7Fh] [xbp-141h]
void *__p; // [xsp+80h] [xbp-140h] BYREF
signed __int64 v240; // [xsp+88h] [xbp-138h]
char v241; // [xsp+97h] [xbp-129h]
void *v242[2]; // [xsp+98h] [xbp-128h] BYREF
char v243; // [xsp+AFh] [xbp-111h]
std::string v244; // [xsp+B0h] [xbp-110h] BYREF
float v245; // [xsp+C8h] [xbp-F8h] BYREF
float v246[4]; // [xsp+D0h] [xbp-F0h] BYREF
float32x2_t v247; // [xsp+E0h] [xbp-E0h] BYREF
cocos2d::CCPoint v248; // [xsp+E8h] [xbp-D8h] BYREF
__int128 v249; // [xsp+F0h] [xbp-D0h] BYREF
char *v250; // [xsp+100h] [xbp-C0h]
__int128 __dst; // [xsp+110h] [xbp-B0h] BYREF
char *longStorage; // [xsp+120h] [xbp-A0h]
float v253; // [xsp+130h] [xbp-90h]
float v254; // [xsp+134h] [xbp-8Ch]
cocos2d::CCPoint v255; // 0:kr08_8.8
cocos2d::CCPoint v256; // 0:kr10_8.8
cocos2d::CCPoint v257; // 0:kr18_8.8
cocos2d::CCPoint v258; // 0:kr20_8.8
cocos2d::CCPoint v259; // 0:kr28_8.8
cocos2d::CCPoint v260; // 0:kr30_8.8
cocos2d::CCPoint v261; // 0:kr38_8.8
cocos2d::CCPoint v262; // 0:kr40_8.8
cocos2d::CCPoint v263; // 0:kr48_8.8
cocos2d::SEL_MenuHandler v264; // 0:x2.16
cocos2d::SEL_MenuHandler v265; // 0:x2.16
cocos2d::SEL_MenuHandler v266; // 0:x2.16
cocos2d::SEL_MenuHandler v267; // 0:x2.16
cocos2d::SEL_MenuHandler v268; // 0:x3.16
cocos2d::SEL_MenuHandler v269; // 0:x3.16
cocos2d::SEL_MenuHandler v270; // 0:x3.16
cocos2d::SEL_MenuHandler v271; // 0:x3.16
cocos2d::SEL_MenuHandler v272; // 0:x3.16
cocos2d::SEL_MenuHandler v273; // 0:x3.16
cocos2d::SEL_MenuHandler v274; // 0:x3.16
cocos2d::SEL_MenuHandler v275; // 0:x3.16
cocos2d::SEL_MenuHandler v276; // 0:x3.16
cocos2d::SEL_MenuHandler v277; // 0:x3.16
cocos2d::CCRect v278; // 0:kr50_16.16
cocos2d::CCPoint v279; // 0:s1.4,4:s2.4
cocos2d::CCPoint v280; // 0:s1.4,4:s2.4
cocos2d::CCPoint v281; // 0:s1.4,4:s2.4
cocos2d::CCPoint v282; // 0:s1.4,4:s2.4
cocos2d::CCRect v283; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
inited = FLAlertLayer::init_1(a1, 150);
if ( !inited )
return inited;
if ( a3 )
{
a1->m_score = a3;
cocos2d::CCObject::retain(a3);
v9 = 1;
LABEL_6:
a1->m_mode = v9;
goto LABEL_7;
}
if ( a4 )
{
a1->m_levelList = a4;
cocos2d::CCObject::retain(a4);
v9 = User;
goto LABEL_6;
}
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
a1->m_mode = 0;
LABEL_7:
v10 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v10, "0075");
if ( GameVariable )
{
v12 = GameManager::sharedState();
GameManager::setGameVariable(v12, "0089", 0);
}
v13 = GameManager::sharedState();
if ( GameManager::getGameVariable(v13, "0089") || a1->m_score )
{
v14 = -4.0;
v15 = 1;
}
else
{
v15 = 0;
v14 = -53.0;
}
GameLevelManager::sharedState()->m_commentUploadDelegate = &a1->CommentUploadDelegate;
v16 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v16);
sub_100022990((float *)&__dst, 0.0, 0.0, 80.0, 80.0);
v17 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v283);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v17->setOpacity)(v17, 255);
sub_100022988((float *)&__dst, 440.0, 290.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int128 *))v17->setContentSize)(v17, &__dst);
v18 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v17,
0xFFFFFFFFLL);
v18.n128_f32[0] = v253 * 0.5;
v19.n128_f32[0] = v254 * 0.5;
sub_100022980(v18, v19, &__dst);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int128 *))v17->setPosition)(v17, &__dst);
v20 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v20;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v20,
10);
m_score = a1->m_score;
if ( !m_score )
{
m_levelList = a1->m_levelList;
if ( m_levelList )
{
if ( (m_levelList->m_listName.m_data.m_short.shortStorage.__elems_[22] & 0x80000000) == 0 )
{
p_m_listName = &m_levelList->m_listName;
LABEL_28:
__dst = *(_OWORD *)&p_m_listName->m_data.m_short.sizex2;
longStorage = p_m_listName->m_data.m_long.longStorage;
goto LABEL_32;
}
capacitym1 = (void *)m_levelList->m_listName.m_data.m_long.capacitym1;
size = m_levelList->m_listName.m_data.m_long.size;
}
else
{
m_level = a1->m_level;
if ( (m_level->m_levelName.m_data.m_short.shortStorage.__elems_[22] & 0x80000000) == 0 )
{
p_m_listName = &m_level->m_levelName;
goto LABEL_28;
}
capacitym1 = (void *)m_level->m_levelName.m_data.m_long.capacitym1;
size = m_level->m_levelName.m_data.m_long.size;
}
sub_1000097D0(&__dst, capacitym1, size);
LABEL_32:
if ( SHIBYTE(longStorage) >= 0 )
p_dst = (const char *)&__dst;
else
p_dst = (const char *)__dst;
v34 = cocos2d::CCLabelBMFont::create_1(p_dst, "bigFont.fnt");
v37 = 20.0;
if ( v15 )
v37 = 16.0;
v36.n128_f32[0] = (float)((float)(v254 * 0.5) + 145.0) - v37;
v35.n128_f32[0] = v253 * 0.5;
sub_100022980(v35, v36, &v249);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v34->setPosition)(v34, &v249);
if ( v15 )
v38 = 150.0;
else
v38 = 300.0;
v39 = 1.0;
if ( v15 )
v39 = 0.6;
cocos2d::CCLabelBMFont::limitLabelWidth(v34, v38, v39, 0.0);
v40 = a1->m_levelList;
if ( v40 )
{
m_accountID = v40->m_accountID;
}
else
{
v43 = a1->m_level;
random = v43->m_accountID.random;
LODWORD(v43) = v43->m_accountID.seed;
m_accountID = random - (_DWORD)v43;
if ( random != (_DWORD)v43
|| (v46 = GameLevelManager::sharedState(),
m_accountID = GameLevelManager::accountIDForUserID(
v46,
a1->m_level->m_userID.random - a1->m_level->m_userID.seed),
(v40 = a1->m_levelList) == nullptr) )
{
v45 = a1->m_level;
if ( (v45->m_creatorName.m_data.m_short.shortStorage.__elems_[22] & 0x80000000) == 0 )
{
p_m_creatorName = &v45->m_creatorName;
goto LABEL_49;
}
sub_1000097D0(&v249, (void *)v45->m_creatorName.m_data.m_long.capacitym1, v45->m_creatorName.m_data.m_long.size);
LABEL_54:
v47 = (const char *)&v249;
if ( SHIBYTE(v250) < 0 )
v47 = (const char *)v249;
v48 = (cocos2d::CCString *)sub_100268F4C("By %s", v47);
CString = cocos2d::CCString::getCString(v48);
v50 = cocos2d::CCLabelBMFont::create_1(CString, "goldFont.fnt");
v51 = v253;
v52 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v34->getPosition)(v34);
v53.n128_f32[0] = v51 * 0.5;
v54.n128_f32[0] = *(float *)(v52 + 4) + -26.0;
sub_100022980(v53, v54, &v248);
if ( v15 )
v55 = 0.5;
else
v55 = 0.8;
cocos2d::CCLabelBMFont::limitLabelWidth(v50, v38, v55, 0.0);
if ( v15 )
{
((void (__fastcall *)(std::string *__return_ptr, cocos2d::CCLabelBMFont *))v34->getScaledContentSize)(
&v244,
v34);
v57 = *(float *)&v244.__r_.__value_.__l.__data_;
((void (__fastcall *)(void **__return_ptr, cocos2d::CCLabelBMFont *))v50->getScaledContentSize)(v242, v50);
v58 = *(float *)v242;
v59 = v253;
((void (__fastcall *)(void **__return_ptr, cocos2d::CCLabelBMFont *))v34->getScaledContentSize)(v242, v34);
v60 = *(float *)v242;
v61 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v34->getPosition)(v34);
v62.n128_f32[0] = (float)((float)(v59 * 0.5) - (float)((float)((float)(v57 + v58) + 15.0) * 0.5))
+ (float)(v60 * 0.5);
v63.n128_u32[0] = *(_DWORD *)(v61 + 4);
sub_100022980(v62, v63, &v244);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v34->setPosition)(v34, &v244);
v64 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v34->getPosition)(v34);
((void (__fastcall *)(void **__return_ptr, cocos2d::CCLabelBMFont *))v34->getScaledContentSize)(&__p, v34);
v65 = *(float *)&__p;
((void (__fastcall *)(void **__return_ptr, cocos2d::CCLabelBMFont *))v50->getScaledContentSize)(&v236, v50);
v66.n128_f32[0] = (float)((float)(v65 * 0.5) + (float)(*(float *)&v236 * 0.5)) + 15.0;
v67.n128_u32[0] = 0;
sub_100022980(v66, v67, v242);
sub_1000229DC(v64, (float32x2_t *)v242, (float32x2_t *)&v244);
v56.n128_f64[0] = sub_1000229D0(&v248, (double *)&v244);
}
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64, __n128))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v34,
20,
v56);
v268.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onMore;
v268.adj = 0;
v68 = CCMenuItemSpriteExtra::create(v50, nullptr, a1, v268);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v68);
v255 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v248);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))v68->setPosition)(
v68,
&v244,
v255.x,
v255.y);
if ( !m_accountID )
{
v244.__r_.__value_.__s.__data_[2] = -1;
LOWORD(v244.__r_.__value_.__l.__data_) = -166;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v50->setColor)(v50, &v244);
v69 = ((__n128 (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v68->setEnabled)(v68, 0);
}
v69.n128_f32[0] = v253 * 0.5;
v70.n128_f32[0] = (float)(v254 * 0.5) + 52.0;
sub_100022980(v69, v70, &v247);
if ( (v15 & 1) != 0 )
goto LABEL_144;
sub_100022990(v246, 0.0, 0.0, 80.0, 80.0);
v71 = sub_100022B98(&v244, (__int64)v246);
v278.origin.x = *(float *)&v71;
v278.origin.y = v221;
v278.size.width = v222;
v278.size.height = v223;
v72 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v278);
sub_100022988(&v245, 340.0, 55.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v72->setContentSize)(v72, &v245);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v72,
0xFFFFFFFFLL);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v72->setPosition)(v72, &v247);
v244.__r_.__value_.__s.__data_[2] = 33;
LOWORD(v244.__r_.__value_.__l.__data_) = 16514;
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, std::string *))v72->setColor)(v72, &v244);
sub_100009900(&v244, "(No description provided)");
v73 = a1->m_levelList;
if ( v73 )
GJLevelList::getUnpackedDescription((__int64)v73, v242);
else
GJGameLevel::getUnpackedLevelDescription((__int64)a1->m_level, v242);
sub_100009900(&__p, "");
v74 = sub_1000045BC(v242, &__p);
v75 = v74;
if ( v241 < 0 )
{
operator delete(__p);
if ( v75 )
{
LABEL_75:
sub_100009900(&__p, "\xA0");
v225 = v68;
v226 = v50;
v227 = v15;
v228 = GameVariable;
v229 = inited;
sub_100009900(&v236, "");
v77 = 0;
v78 = HIBYTE(v244.__r_.__value_.__r.__words[2]);
v79 = HIBYTE(v244.__r_.__value_.__r.__words[2]);
v81 = v244.__r_.__value_.__l.__size_;
v80 = v244.__r_.__value_.__r.__words[0];
if ( (v244.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v82 = &v244;
else
v82 = (std::string *)v244.__r_.__value_.__r.__words[0];
if ( (v244.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v78 = v244.__r_.__value_.__l.__size_;
v83 = v241;
v84 = v240;
if ( v241 >= 0 )
p_p = &__p;
else
p_p = (void **)__p;
if ( v241 >= 0 )
v86 = v241;
else
v86 = v240;
v87 = (unsigned __int64)v241 >> 63;
do
{
if ( v86 )
{
v88 = v78 - v77;
if ( (__int64)(v78 - v77) < v86 )
break;
v224 = v87;
v230 = v80;
v231 = v79;
v89 = (char *)v82 + v78;
v90 = (char *)v82 + v77;
v91 = *(char *)p_p;
while ( 1 )
{
if ( v88 - v86 == -1 || (v92 = (char *)memchr(v90, v91, v88 - v86 + 1)) == nullptr )
{
LABEL_122:
v80 = v230;
v79 = v231;
goto LABEL_123;
}
v93 = v92;
if ( !memcmp(v92, p_p, v86) )
break;
v90 = v93 + 1;
v88 = v89 - (v93 + 1);
if ( v88 < v86 )
goto LABEL_122;
}
v80 = v230;
v79 = v231;
if ( v93 == v89 )
break;
v77 = v93 - (char *)v82;
LOBYTE(v87) = v224;
}
if ( v77 == -1 )
break;
if ( (v87 & 1) != 0 )
v94 = v84;
else
v94 = v83;
if ( (v238 & 0x80u) == 0 )
v95 = (const std::string::value_type *)&v236;
else
v95 = (const std::string::value_type *)v236;
if ( (v238 & 0x80u) == 0 )
v96 = v238;
else
v96 = v237;
std::string::replace(&v244, v77, v94, v95, v96);
v97 = v238;
if ( (v238 & 0x80u) != 0 )
v97 = v237;
v77 += v97;
v78 = HIBYTE(v244.__r_.__value_.__r.__words[2]);
v79 = HIBYTE(v244.__r_.__value_.__r.__words[2]);
v81 = v244.__r_.__value_.__l.__size_;
v80 = v244.__r_.__value_.__r.__words[0];
if ( (v244.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v82 = &v244;
else
v82 = (std::string *)v244.__r_.__value_.__r.__words[0];
if ( (v244.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v78 = v244.__r_.__value_.__l.__size_;
v83 = v241;
v87 = (unsigned __int64)v241 >> 63;
v84 = v240;
p_p = v241 >= 0 ? &__p : (void **)__p;
v86 = v241 >= 0 ? v241 : v240;
}
while ( v78 >= v77 );
LABEL_123:
if ( a1->m_levelList )
v98 = 300;
else
v98 = 180;
if ( (v79 & 0x80) != 0 )
{
v99 = v98;
GameVariable = v228;
LOBYTE(inited) = v229;
v15 = v227;
v68 = v225;
if ( v81 > v98 )
goto LABEL_130;
}
else
{
LODWORD(v81) = v79;
GameVariable = v228;
LOBYTE(inited) = v229;
v15 = v227;
v68 = v225;
}
v100 = 1.0;
v99 = v81;
if ( (unsigned int)v81 < 0x47 )
{
LABEL_131:
if ( (v79 & 0x80u) == 0 )
v101 = &v244;
else
v101 = (std::string *)v80;
sub_100009900(v234, (char *)v101);
v50 = v226;
v102.n128_u32[0] = 0.5;
v103.n128_u32[0] = 0.5;
sub_100022980(v102, v103, &v233);
v104 = TextArea::create(
(__int64)v234,
(__int64)"chatFont.fnt",
(__int64 *)&v233,
1,
1.0,
295.0 / v100,
20.0);
if ( v235 < 0 )
operator delete(v234[0]);
v105 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCObject *))a1->m_mainLayer->addChild)(
a1->m_mainLayer,
v104);
v105.n128_u32[0] = 0;
v106.n128_u32[0] = 1.0;
sub_100022980(v105, v106, &v232);
*(float32x2_t *)&v107 = sub_1000229DC(&v247, &v232, &v233);
((void (__fastcall *)(cocos2d::CCObject *, float32x2_t *, double))v104->__vftable[2].isEqual)(
v104,
&v233,
v107);
((void (__fastcall *)(cocos2d::CCObject *, float))v104->__vftable[2].copyWithZone)(v104, v100);
if ( (char)v238 < 0 )
operator delete(v236);
if ( v241 < 0 )
operator delete(__p);
if ( v243 < 0 )
operator delete(v242[0]);
if ( SHIBYTE(v244.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v244.__r_.__value_.__l.__data_);
LABEL_144:
InfoLayer::setupLevelInfo(a1);
if ( (v15 & 1) == 0 )
{
v108 = a1->m_level;
if ( v108 )
{
if ( v108->m_originalLevel.random != v108->m_originalLevel.seed )
{
v109 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v109, "0077")
&& a1->m_level->m_originalLevel.random - a1->m_level->m_originalLevel.seed != a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed )
{
v110 = ButtonSprite::create_1(
"Original",
220,
0,
0.45,
0,
"bigFont.fnt",
"GJ_button_01.png",
25.0);
((void (__fastcall *)(ButtonSprite *, float))v110->setScale)(v110, 0.8);
v269.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onOriginal;
v269.adj = 0;
v111 = CCMenuItemSpriteExtra::create(v110, nullptr, a1, v269);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v111);
CCMenuItemSpriteExtra::setSizeMult(v111, 1.2);
v112 = (float32x2_t *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v68->getPosition)(v68);
v113 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v50->getContentSize)(v50);
v114.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v50->getScale)(v50);
v114.n128_f32[0] = (float)((float)(v113 * 0.5) * v114.n128_f32[0]) + 70.0;
v115.n128_u32[0] = 0;
sub_100022980(v114, v115, v242);
*(float32x2_t *)&v116 = sub_1000229DC(v112, (float32x2_t *)v242, (float32x2_t *)&v244);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, double))v111->setPosition)(
v111,
&v244,
v116);
}
}
}
}
v117 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_chatBtn_001.png");
v270.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onComment;
v270.adj = 0;
v118 = CCMenuItemSpriteExtra::create(v117, nullptr, a1, v270);
CCMenuItemSpriteExtra::setSizeMult(v118, 1.5);
v119 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v118);
v119.n128_f32[0] = (float)((float)(v253 * 0.5) + 220.0) + -10.0;
m_buttonMenu = a1->m_buttonMenu;
v121.n128_f32[0] = (float)((float)(v254 * 0.5) + -145.0) + 10.0;
sub_100022980(v119, v121, v242);
v256 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, (const cocos2d::CCPoint *)v242);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))v118->setPosition)(
v118,
&v244,
v256.x,
v256.y);
v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png");
v271.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::confirmReport;
v271.adj = 0;
v123 = CCMenuItemSpriteExtra::create(v122, nullptr, a1, v271);
a1->m_reportBtn = v123;
CCMenuItemSpriteExtra::setSizeMult(v123, 1.5);
v124 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
a1->m_reportBtn);
m_reportBtn = a1->m_reportBtn;
v126 = a1->m_buttonMenu;
v124.n128_f32[0] = (float)((float)(v253 * 0.5) + -220.0) + 10.0;
v127.n128_f32[0] = (float)((float)(v254 * 0.5) + -145.0) + 10.0;
sub_100022980(v124, v127, v242);
v257 = cocos2d::CCNode::convertToNodeSpace(v126, (const cocos2d::CCPoint *)v242);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))m_reportBtn->setPosition)(
m_reportBtn,
&v244,
v257.x,
v257.y);
v128 = GameLevelManager::sharedState();
v129 = a1->m_score;
if ( v129 )
{
m_userID = v129->m_userID;
}
else
{
v131 = a1->m_levelList;
if ( v131 )
{
m_userID = -v131->m_listID;
}
else
{
v132 = a1->m_level;
if ( v132 )
m_userID = v132->m_levelID.random - v132->m_levelID.seed;
else
m_userID = 0;
}
}
hasReportedLevel = GameLevelManager::hasReportedLevel(v128, m_userID);
v134 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_reportBtn->getNormalImage)(a1->m_reportBtn);
if ( hasReportedLevel )
{
v244.__r_.__value_.__s.__data_[2] = 75;
v135 = 19275;
}
else
{
v135 = -1;
v244.__r_.__value_.__s.__data_[2] = -1;
}
LOWORD(v244.__r_.__value_.__l.__data_) = v135;
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v134 + 944LL))(v134, &v244);
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_reportBtn->setEnabled)(
a1->m_reportBtn,
!hasReportedLevel);
if ( GameVariable )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v118->setVisible)(v118, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v118->setEnabled)(v118, 0);
}
if ( SHIBYTE(v250) < 0 )
operator delete((void *)v249);
if ( SHIBYTE(longStorage) < 0 )
operator delete((void *)__dst);
goto LABEL_166;
}
LABEL_130:
v100 = (float)((float)((float)(180 - v99) / (float)v98) * 0.3) + 0.7;
goto LABEL_131;
}
}
else if ( v74 )
{
goto LABEL_75;
}
if ( v243 >= 0 )
v76 = v242;
else
v76 = (void **)v242[0];
std::string::assign(&v244, (const std::string::value_type *)v76);
goto LABEL_75;
}
}
if ( (v40->m_creatorName.m_data.m_short.shortStorage.__elems_[22] & 0x80000000) == 0 )
{
p_m_creatorName = &v40->m_creatorName;
LABEL_49:
v249 = *(_OWORD *)&p_m_creatorName->m_data.m_short.sizex2;
v250 = p_m_creatorName->m_data.m_long.longStorage;
goto LABEL_54;
}
sub_1000097D0(&v249, (void *)v40->m_creatorName.m_data.m_long.capacitym1, v40->m_creatorName.m_data.m_long.size);
goto LABEL_54;
}
if ( m_score->m_userName.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(&__dst, (void *)m_score->m_userName.m_data.m_long.capacitym1, m_score->m_userName.m_data.m_long.size);
}
else
{
__dst = *(_OWORD *)&m_score->m_userName.m_data.m_short.sizex2;
longStorage = m_score->m_userName.m_data.m_long.longStorage;
}
v24 = (const char *)&__dst;
if ( SHIBYTE(longStorage) < 0 )
v24 = (const char *)__dst;
v25 = (cocos2d::CCString *)sub_100268F4C("%s's comments", v24);
v26 = cocos2d::CCString::getCString(v25);
if ( SHIBYTE(longStorage) < 0 )
operator delete((void *)__dst);
v27 = cocos2d::CCLabelBMFont::create_1(v26, "bigFont.fnt");
v28.n128_f32[0] = v253 * 0.5;
v29.n128_f32[0] = (float)((float)(v254 * 0.5) + 145.0) + -16.0;
sub_100022980(v28, v29, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v27->setPosition)(v27, &__dst);
cocos2d::CCLabelBMFont::limitLabelWidth(v27, 180.0, 0.55, 0.0);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v27);
LABEL_166:
v136 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v272.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onClose;
v272.adj = 0;
v137 = CCMenuItemSpriteExtra::create(v136, nullptr, a1, v272);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v137);
CCMenuItemSpriteExtra::setSizeMult(v137, 1.6);
v138 = a1->m_buttonMenu;
v139.n128_f32[0] = (float)((float)(v253 * 0.5) + -220.0) + 10.0;
v140.n128_f32[0] = (float)((float)(v254 * 0.5) + 145.0) + -10.0;
sub_100022980(v139, v140, &v249);
v258 = cocos2d::CCNode::convertToNodeSpace(v138, (const cocos2d::CCPoint *)&v249);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, float, float))v137->setPosition)(
v137,
&__dst,
v258.x,
v258.y);
v141 = LoadingCircle::create();
a1->m_loadingCircle = v141;
v141->m_parentLayer = a1->m_mainLayer;
v141->m_fade = 0;
cocos2d::CCObject::retain(v141);
LoadingCircle::show(a1->m_loadingCircle);
v142 = ((__n128 (__fastcall *)(LoadingCircle *, _QWORD))a1->m_loadingCircle->setVisible)(a1->m_loadingCircle, 0);
m_sprite = a1->m_loadingCircle->m_sprite;
v142.n128_f32[0] = v253 * 0.5;
v144.n128_f32[0] = v14 + (float)(v254 * 0.5);
sub_100022980(v142, v144, &__dst);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))m_sprite->setPosition)(m_sprite, &__dst);
v145 = cocos2d::CCMenu::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v145,
10);
v146 = (float)(v254 * 0.5) + -53.0;
v147 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v147->setScale)(v147, 0.8);
v273.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onPrevPage;
v273.adj = 0;
v148 = CCMenuItemSpriteExtra::create(v147, nullptr, a1, v273);
a1->m_leftArrow = v148;
v149 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v145->addChild)(v145, v148);
m_leftArrow = a1->m_leftArrow;
v149.n128_f32[0] = (float)(v253 * 0.5) + -195.0;
v151.n128_f32[0] = v146;
sub_100022980(v149, v151, &v249);
v259 = cocos2d::CCNode::convertToNodeSpace(v145, (const cocos2d::CCPoint *)&v249);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, float, float))m_leftArrow->setPosition)(
m_leftArrow,
&__dst,
v259.x,
v259.y);
CCMenuItemSpriteExtra::setSizeMult(a1->m_leftArrow, 2.0);
v152 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png");
cocos2d::CCSprite::setFlipX(v152, 1);
((void (__fastcall *)(cocos2d::CCSprite *, float))v152->setScale)(v152, 0.8);
v274.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onNextPage;
v274.adj = 0;
v153 = CCMenuItemSpriteExtra::create(v152, nullptr, a1, v274);
a1->m_rightArrow = v153;
v154 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v145->addChild)(v145, v153);
m_rightArrow = a1->m_rightArrow;
v154.n128_f32[0] = (float)(v253 * 0.5) + 195.0;
v156.n128_f32[0] = v146;
sub_100022980(v154, v156, &v249);
v260 = cocos2d::CCNode::convertToNodeSpace(v145, (const cocos2d::CCPoint *)&v249);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, float, float))m_rightArrow->setPosition)(
m_rightArrow,
&__dst,
v260.x,
v260.y);
CCMenuItemSpriteExtra::setSizeMult(a1->m_rightArrow, 2.0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_leftArrow->setVisible)(a1->m_leftArrow, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_rightArrow->setVisible)(a1->m_rightArrow, 0);
v157 = cocos2d::CCLabelBMFont::create_1(" ", "goldFont.fnt");
a1->m_pageLabel = v157;
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v157,
10);
m_pageLabel = a1->m_pageLabel;
v159 = cocos2d::CCDirector::sharedDirector();
v160 = sub_1001768E0((__int64)v159) + -7.0;
v161 = AppDelegate::get();
v162 = 0.0;
if ( v161->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] )
v162 = 10.0;
v163 = v160 - v162;
v164 = cocos2d::CCDirector::sharedDirector();
v165.n128_f32[0] = sub_1001768C8((__int64)v164) + -2.0;
v166.n128_f32[0] = v163;
sub_100022980(v166, v165, &__dst);
v167 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))m_pageLabel->setPosition)(m_pageLabel, &__dst);
v168 = a1->m_pageLabel;
v167.n128_u32[0] = 1.0;
v169.n128_u32[0] = 1.0;
sub_100022980(v167, v169, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v168->setAnchorPoint)(v168, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_pageLabel->setScale)(a1->m_pageLabel, 0.4);
v170 = cocos2d::CCMenu::create();
v171 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v170,
10);
v171.n128_u32[0] = 0;
v172.n128_u32[0] = -0.5;
sub_100022980(v171, v172, &__dst);
v264.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleCommentMode;
v264.adj = 0;
SpriteButton = InfoLayer::getSpriteButton(a1, "GJ_likesIcon_001.png", v264, v170, 0.7, v279);
a1->m_likeBtn = SpriteButton;
v174 = ((__n128 (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))SpriteButton->setTag)(SpriteButton, 0);
v174.n128_u32[0] = 0;
v175.n128_u32[0] = -1.0;
sub_100022980(v174, v175, &__dst);
v265.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleCommentMode;
v265.adj = 0;
v176 = InfoLayer::getSpriteButton(a1, "GJ_timeIcon_001.png", v265, v170, 0.7, v280);
a1->m_timeBtn = v176;
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v176->setTag)(v176, 1);
if ( a1->m_score )
v179 = 1;
else
v179 = GameVariable;
if ( (v179 & 1) == 0 )
{
v177.n128_u32[0] = 0;
v178.n128_u32[0] = -1.0;
sub_100022980(v177, v178, &__dst);
v266.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleExtendedMode;
v266.adj = 0;
v180 = InfoLayer::getSpriteButton(a1, "GJ_extendedIcon_001.png", v266, v170, 0.7, v281);
v181 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v180->getNormalImage)(v180);
if ( v15 )
v182 = "GJ_button_02.png";
else
v182 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v181, v182);
}
if ( !GameVariable )
{
v177.n128_u32[0] = 0;
v178.n128_u32[0] = -1.5;
sub_100022980(v177, v178, &__dst);
v267.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleSmallCommentMode;
v267.adj = 0;
v183 = InfoLayer::getSpriteButton(a1, "GJ_smallModeIcon_001.png", v267, v170, 0.7, v282);
v184 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v183->getNormalImage)(v183);
v185 = GameManager::sharedState();
if ( GameManager::getGameVariable(v185, "0088") )
v186 = "GJ_button_02.png";
else
v186 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v184, v186);
}
InfoLayer::updateCommentModeButtons(a1);
v187.n128_f32[0] = (float)(v253 * 0.5) + -195.0;
v188.n128_f32[0] = (float)((float)(v254 * 0.5) + 145.0) + -110.0;
sub_100022980(v187, v188, &v249);
((void (__fastcall *)(cocos2d::CCMenu *, __int128 *))v170->setPosition)(v170, &v249);
cocos2d::CCMenu::alignItemsVerticallyWithPadding(v170, 4.0);
v189 = ButtonSprite::create_1("Load Comments", 220, 0, 0.6, 0, "bigFont.fnt", "GJ_button_01.png", 25.0);
v275.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onGetComments;
v275.adj = 0;
v190 = CCMenuItemSpriteExtra::create(v189, nullptr, a1, v275);
a1->m_commentsBtn = v190;
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v190);
CCMenuItemSpriteExtra::setSizeMult(a1->m_commentsBtn, 2.0);
m_commentsBtn = a1->m_commentsBtn;
v192 = a1->m_buttonMenu;
v193.n128_f32[0] = v253 * 0.5;
v194.n128_f32[0] = v14 + (float)(v254 * 0.5);
sub_100022980(v193, v194, &v244);
v261 = cocos2d::CCNode::convertToNodeSpace(v192, (const cocos2d::CCPoint *)&v244);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, float, float))m_commentsBtn->setPosition)(
m_commentsBtn,
&__dst,
v261.x,
v261.y);
if ( PlatformToolbox::isNetworkAvailable() )
v195 = "No comments";
else
v195 = "No Internet connection!";
v196 = cocos2d::CCLabelBMFont::create_1(v195, "goldFont.fnt");
a1->m_noComments = v196;
v197 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v196,
10);
m_noComments = a1->m_noComments;
v197.n128_f32[0] = v253 * 0.5;
v199.n128_f32[0] = v14 + (float)(v254 * 0.5);
sub_100022980(v197, v199, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))m_noComments->setPosition)(m_noComments, &__dst);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_noComments->setScale)(a1->m_noComments, 0.8);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_noComments->setVisible)(a1->m_noComments, 0);
if ( !PlatformToolbox::isNetworkAvailable() )
{
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))a1->m_noComments->setVisible)(a1->m_noComments, 1);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_commentsBtn->setVisible)(a1->m_commentsBtn, 0);
}
GameLevelManager::sharedState();
v200 = a1->m_score;
if ( v200 )
{
v201 = v200->m_userID;
}
else
{
v202 = a1->m_levelList;
if ( v202 )
{
v201 = -v202->m_listID;
}
else
{
v203 = a1->m_level;
if ( v203 )
v201 = v203->m_levelID.random - v203->m_levelID.seed;
else
v201 = 0;
}
}
v204 = GameManager::sharedState();
v205 = GameManager::getGameVariable(v204, "0069");
GameLevelManager::getCommentKey(v201, 0, v205, a1->m_mode, &__dst);
if ( !GameVariable
&& ((v206 = GameLevelManager::sharedState(), SHIBYTE(longStorage) >= 0)
? (v207 = (const char *)&__dst)
: (v207 = (const char *)__dst),
GameLevelManager::getStoredLevelComments(v206, v207)
|| (v208 = GameManager::sharedState(), GameManager::getGameVariable(v208, "0090"))) )
{
InfoLayer::loadPage(a1, 0, 0);
}
else
{
InfoLayer::setupCommentsBrowser(a1, nullptr);
}
if ( !a1->m_score )
{
v209 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v276.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onLevelInfo;
v276.adj = 0;
v210 = CCMenuItemSpriteExtra::create(v209, nullptr, a1, v276);
CCMenuItemSpriteExtra::setSizeMult(v210, 2.0);
v211 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
v210);
v212 = a1->m_buttonMenu;
v211.n128_f32[0] = (float)((float)(v253 * 0.5) + 220.0) + -17.0;
v213.n128_f32[0] = (float)((float)(v254 * 0.5) + 145.0) + -17.0;
sub_100022980(v211, v213, v242);
v262 = cocos2d::CCNode::convertToNodeSpace(v212, (const cocos2d::CCPoint *)v242);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))v210->setPosition)(
v210,
&v244,
v262.x,
v262.y);
}
v214 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v214->setScale)(v214, 0.6);
v277.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::onRefreshComments;
v277.adj = 0;
v215 = CCMenuItemSpriteExtra::create(v214, nullptr, a1, v277);
a1->m_refreshCommentsBtn = v215;
CCMenuItemSpriteExtra::setSizeMult(v215, 1.5);
v216 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(
a1->m_buttonMenu,
a1->m_refreshCommentsBtn);
m_refreshCommentsBtn = a1->m_refreshCommentsBtn;
v218 = a1->m_buttonMenu;
v216.n128_f32[0] = (float)(v253 * 0.5) + 195.0;
v219.n128_f32[0] = (float)(v254 * 0.5) + 0.0;
sub_100022980(v216, v219, v242);
v263 = cocos2d::CCNode::convertToNodeSpace(v218, (const cocos2d::CCPoint *)v242);
((void (__fastcall *)(CCMenuItemSpriteExtra *, std::string *, float, float))m_refreshCommentsBtn->setPosition)(
m_refreshCommentsBtn,
&v244,
v263.x,
v263.y);
if ( GameVariable )
{
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_refreshCommentsBtn->setVisible)(
a1->m_refreshCommentsBtn,
0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_refreshCommentsBtn->setEnabled)(
a1->m_refreshCommentsBtn,
0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_noComments->setVisible)(a1->m_noComments, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_commentsBtn->setVisible)(a1->m_commentsBtn, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_likeBtn->setVisible)(a1->m_likeBtn, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_likeBtn->setEnabled)(a1->m_likeBtn, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_timeBtn->setVisible)(a1->m_timeBtn, 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_timeBtn->setEnabled)(a1->m_timeBtn, 0);
}
if ( SHIBYTE(longStorage) < 0 )
operator delete((void *)__dst);
return inited;
}