//
// LevelPage::updateDynamicPage from 0x100432af0 to 0x100433f92 (5282 bytes)
//
// 2 xrefs:
// > LevelSelectLayer::updatePageWithObject @ 0x100432a99
// > sub_1004341D0 @ 0x1004341e9
//
// 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 LevelPage::updateDynamicPage(LevelPage *a1, GJGameLevel *a2)
{
GJGameLevel *m_level; // rdi
unsigned int v4; // r15d
__int64 v5; // rax
GJGameLevel *v6; // rax
int random; // r14d
bool v8; // cc
int v9; // r14d
unsigned int v10; // r14d
__int64 v11; // rax
unsigned int v12; // r14d
__int64 v13; // rax
int NormalPercent; // eax
__m128 v15; // xmm2
GJGameLevel *v16; // rdi
int v17; // eax
unsigned int *m_normalProgressBar; // r14
__m128 v19; // xmm2
unsigned int *m_practiceProgressBar; // r14
cocos2d::CCString *v21; // rax
const char *CString; // rax
cocos2d::CCString *v23; // rax
const char *v24; // rax
GameStatsManager *v25; // rax
int v26; // r15d
cocos2d::CCLabelBMFont *m_nameLabel; // rdi
cocos2d::CCLabelBMFont *v28; // r12
GJGameLevel *v29; // rax
std::string *p_m_levelName; // rax
char *v31; // rsi
int v32; // eax
unsigned int v33; // r14d
__int64 v34; // rax
cocos2d::CCSprite *v35; // r12
CCMenuItemSpriteExtra *v36; // rax
cocos2d::CCMenu *v37; // r14
cocos2d::CCSprite *v38; // r14
__int64 v39; // rax
cocos2d::CCMoveBy *v40; // rax
cocos2d::CCEaseInOut *v41; // r14
cocos2d::CCMoveBy *v42; // rax
cocos2d::CCEaseInOut *v43; // rax
cocos2d::CCSequence *v44; // rax
cocos2d::CCRepeatForever *v45; // rax
cocos2d::CCParticleSystem *v46; // r14
__int64 v47; // rax
cocos2d::CCParticleSystem *v48; // r15
__int64 v49; // rax
cocos2d::CCParticleSystem *v50; // r13
__int64 v51; // rax
GameObject *m_coinObject; // rdi
cocos2d::CCLabelBMFont *v53; // r14
float *v54; // rax
cocos2d::CCLabelBMFont *v55; // r14
cocos2d::CCString *v56; // rax
const char *v57; // r14
cocos2d::CCSprite *m_difficultySprite; // r12
cocos2d::CCSpriteFrameCache *v59; // rax
cocos2d::CCSpriteFrame *v60; // rax
cocos2d::CCSprite *v61; // rdi
float v62; // xmm0_4
float v63; // xmm0_4
cocos2d::CCSprite *v64; // r14
cocos2d::CCLabelBMFont *v65; // r14
float *v66; // rax
cocos2d::CCLabelBMFont *m_starsLabel; // r14
cocos2d::CCString *v68; // rax
const char *v69; // rax
GameStatsManager *v70; // rax
bool hasCompletedStarLevel; // al
cocos2d::CCLabelBMFont *v72; // rdi
cocos2d::CCLabelBMFont_vtbl *v73; // rax
__int128 *v74; // rsi
GameStatsManager *v75; // r14
const char *CoinKey; // rax
bool hasSecretCoin; // r14
const char *v78; // r15
const char *v79; // r12
__int64 v80; // r13
cocos2d::CCSpriteFrameCache *v81; // rax
cocos2d::CCSpriteFrame *v82; // rax
GameStatsManager *v83; // r14
const char *v84; // rax
bool v85; // r14
const char *v86; // r12
__int64 v87; // r13
cocos2d::CCSpriteFrameCache *v88; // rax
cocos2d::CCSpriteFrame *v89; // rax
GameStatsManager *v90; // r14
const char *v91; // rax
bool v92; // r14
__int64 v93; // r13
cocos2d::CCSpriteFrameCache *v94; // rax
cocos2d::CCSpriteFrame *v95; // rax
int v96; // r15d
unsigned int v97; // r12d
__int64 v98; // rax
cocos2d::CCSprite *v99; // r12
cocos2d::CCSprite *v100; // r13
cocos2d::CCString *v101; // rax
const char *v102; // rax
cocos2d::CCLabelBMFont *v103; // r14
unsigned __int64 *v104; // r15
GameStatsManager *v105; // rax
GameStatsManager *v106; // rax
cocos2d::CCSprite *v107; // r14
cocos2d::CCString *v108; // rax
const char *v109; // rax
cocos2d::CCLabelBMFont *v110; // r15
float v111; // xmm0_4
__int64 v112; // rax
unsigned int v113; // r14d
__int64 v114; // rax
cocos2d::CCLabelBMFont *v115; // r14
char v116; // [rsp+0h] [rbp-B0h]
char v117; // [rsp+0h] [rbp-B0h]
char v118; // [rsp+0h] [rbp-B0h]
char v119; // [rsp+0h] [rbp-B0h]
char v120; // [rsp+0h] [rbp-B0h]
float v121; // [rsp+8h] [rbp-A8h] BYREF
_QWORD v122[2]; // [rsp+10h] [rbp-A0h] BYREF
void *v123; // [rsp+20h] [rbp-90h]
float v124; // [rsp+2Ch] [rbp-84h]
unsigned __int64 v125[2]; // [rsp+30h] [rbp-80h] BYREF
void *v126; // [rsp+40h] [rbp-70h]
float v127; // [rsp+48h] [rbp-68h] BYREF
float v128; // [rsp+4Ch] [rbp-64h]
cocos2d::CCSprite *v129; // [rsp+50h] [rbp-60h]
float v130; // [rsp+5Ch] [rbp-54h]
__int128 v131; // [rsp+60h] [rbp-50h] BYREF
void *__p; // [rsp+70h] [rbp-40h]
int m_progressWidth_low; // [rsp+84h] [rbp-2Ch]
double v134; // 0:xmm0_8.8
if ( !a1->m_isBusy )
{
m_level = a1->m_level;
if ( m_level )
{
if ( a2->m_levelID.random - a2->m_levelID.seed == m_level->m_levelID.random - m_level->m_levelID.seed )
return;
cocos2d::CCObject::release(m_level);
a1->m_level = nullptr;
}
if ( (unsigned int)sub_100720070(a1->m_dynamicObjects) )
{
v4 = 0;
do
{
v5 = sub_1007200C0(a1->m_dynamicObjects, v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 504LL))(v5);
++v4;
}
while ( v4 < (unsigned int)sub_100720070(a1->m_dynamicObjects) );
}
sub_100720270(a1->m_dynamicObjects);
a1->m_secretDoor = nullptr;
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v134 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v127);
v6 = a1->m_level;
random = v6->m_levelID.random;
v8 = random <= v6->m_levelID.seed;
v9 = random - v6->m_levelID.seed;
if ( !v8 )
{
if ( (unsigned int)sub_100720070(a1->m_progressObjects) )
{
v10 = 0;
do
{
v11 = sub_1007200C0(a1->m_progressObjects, v10);
(*(void (__fastcall **)(__int64, __int64, double))(*(_QWORD *)v11 + 328LL))(v11, 1, v134);
++v10;
}
while ( v10 < (unsigned int)sub_100720070(a1->m_progressObjects) );
}
if ( (unsigned int)sub_100720070(a1->m_levelObjects) )
{
v12 = 0;
do
{
v13 = sub_1007200C0(a1->m_levelObjects, v12);
(*(void (__fastcall **)(__int64, __int64, double))(*(_QWORD *)v13 + 328LL))(v13, 1, v134);
++v12;
}
while ( v12 < (unsigned int)sub_100720070(a1->m_levelObjects) );
}
m_progressWidth_low = SLODWORD(a1->m_progressWidth);
NormalPercent = GJGameLevel::getNormalPercent(a1->m_level);
v15 = (__m128)LODWORD(a1->m_progressWidth);
if ( *(float *)&m_progressWidth_low > (float)((float)((float)NormalPercent / 100.0)
* *(float *)&m_progressWidth_low) )
{
v16 = a1->m_level;
m_progressWidth_low = SLODWORD(a1->m_progressWidth);
v17 = GJGameLevel::getNormalPercent(v16);
v15 = (__m128)(unsigned int)m_progressWidth_low;
v15.f32[0] = *(float *)&m_progressWidth_low * (float)((float)v17 / 100.0);
}
m_normalProgressBar = (unsigned int *)a1->m_normalProgressBar;
sub_10028CC00((__int64)&v131, 0.0, 0.0, v15, (__m128)m_normalProgressBar[109]);
(*(void (__fastcall **)(unsigned int *, __int128 *))(*(_QWORD *)m_normalProgressBar + 1120LL))(
m_normalProgressBar,
&v131);
v19 = 0;
v19.f32[0] = fminf(
(float)((float)a1->m_level->m_practicePercent / 100.0) * a1->m_progressWidth,
a1->m_progressWidth);
m_practiceProgressBar = (unsigned int *)a1->m_practiceProgressBar;
sub_10028CC00((__int64)&v131, 0.0, 0.0, v19, (__m128)m_practiceProgressBar[109]);
(*(void (__fastcall **)(unsigned int *, __int128 *))(*(_QWORD *)m_practiceProgressBar + 1120LL))(
m_practiceProgressBar,
&v131);
GJGameLevel::getNormalPercent(a1->m_level);
v21 = (cocos2d::CCString *)sub_1007AB580("%i%%", v116);
CString = cocos2d::CCString::getCString(v21);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_normalProgressLabel->setString)(
a1->m_normalProgressLabel,
CString);
v23 = (cocos2d::CCString *)sub_1007AB580("%i%%", v117);
v24 = cocos2d::CCString::getCString(v23);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_practiceProgressLabel->setString)(
a1->m_practiceProgressLabel,
v24);
v25 = GameStatsManager::sharedState();
*(float *)&v26 = COERCE_FLOAT(GameStatsManager::getStat(v25, "8"));
m_nameLabel = a1->m_nameLabel;
m_progressWidth_low = a1->m_level->m_requiredCoins;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))m_nameLabel->setScale)(m_nameLabel, 1.0);
v28 = a1->m_nameLabel;
v29 = a1->m_level;
if ( (v29->m_levelName.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&v131,
v29->m_levelName.m_data.m_long.longStorage,
v29->m_levelName.m_data.m_long.size,
COERCE_DOUBLE(1065353216));
if ( (v131 & 1) == 0 )
goto LABEL_19;
}
else
{
p_m_levelName = &v29->m_levelName;
__p = p_m_levelName->m_data.m_long.longStorage;
v131 = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2;
if ( (v131 & 1) == 0 )
{
LABEL_19:
v31 = (char *)&v131 + 1;
goto LABEL_33;
}
}
v31 = (char *)__p;
LABEL_33:
((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *))v28->setString)(v28, v31);
if ( (v131 & 1) != 0 )
operator delete(__p);
if ( *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_nameLabel->getContentSize)(a1->m_nameLabel) > 250.0 )
{
v53 = a1->m_nameLabel;
v54 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v53->getContentSize)(v53);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v53->setScale)(v53, 250.0 / *v54);
}
v55 = a1->m_nameLabel;
if ( ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v55->getScale)(v55) <= 1.0 )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_nameLabel->getScale)(a1->m_nameLabel, 1.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double))v55->setScale)(v55, COERCE_DOUBLE(1065353216));
v56 = (cocos2d::CCString *)sub_1007AB580("diffIcon_%02d_btn_001.png", v118);
v57 = cocos2d::CCString::getCString(v56);
m_difficultySprite = a1->m_difficultySprite;
v59 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v60 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v59, v57);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_difficultySprite->setDisplayFrame)(
m_difficultySprite,
v60);
v61 = a1->m_difficultySprite;
*(float *)&v129 = v61->m_obRect.size.width;
v62 = ((float (__fastcall *)(cocos2d::CCSprite *))v61->getScale)(v61);
*(float *)&v129 = v62 * *(float *)&v129;
v124 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_nameLabel->getContentSize)(a1->m_nameLabel);
v63 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_nameLabel->getScale)(a1->m_nameLabel);
v64 = a1->m_difficultySprite;
sub_10028CBE0(
(float *)&v131,
(float)((float)(a1->m_levelDisplaySize.width * 0.5)
- (float)((float)((float)((float)((float)(v63 * v124) + 5.0) + (float)(*(float *)&v129 * 0.5)) + 30.0)
* 0.5))
+ (float)(*(float *)&v129 * 0.5),
(float)(a1->m_levelDisplaySize.height * 0.5) + 3.0);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v64->setPosition)(v64, &v131);
v65 = a1->m_nameLabel;
v66 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_difficultySprite->getPosition)(a1->m_difficultySprite);
sub_10028CBE0((float *)&v131, *v66 + 30.0, (float)(a1->m_levelDisplaySize.height * 0.5) + 3.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v65->setPosition)(v65, &v131);
m_starsLabel = a1->m_starsLabel;
v68 = (cocos2d::CCString *)sub_1007AB580("%i", v119);
v69 = cocos2d::CCString::getCString(v68);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_starsLabel->setString)(m_starsLabel, v69);
v70 = GameStatsManager::sharedState();
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v70, a1->m_level);
v72 = a1->m_starsLabel;
v130 = *(float *)&v26;
if ( hasCompletedStarLevel )
{
BYTE2(v131) = 50;
LOWORD(v131) = -1;
v73 = v72->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v74 = &v131;
}
else
{
v73 = v72->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v74 = (__int128 *)&unk_10081BD13;
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v73->setColor)(v72, v74);
v75 = GameStatsManager::sharedState();
CoinKey = GJGameLevel::getCoinKey(a1->m_level, 1);
hasSecretCoin = GameStatsManager::hasSecretCoin(v75, CoinKey);
v78 = "GJ_coinsIcon_gray_001.png";
v79 = "GJ_coinsIcon_gray_001.png";
if ( hasSecretCoin )
v79 = "GJ_coinsIcon_001.png";
v80 = sub_1007200C0(a1->m_coins, 0);
v81 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v82 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v81, v79);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v80 + 1144LL))(v80, v82);
if ( hasSecretCoin )
{
BYTE2(v131) = -1;
LOWORD(v131) = -1;
}
else
{
BYTE2(v131) = -31;
LOWORD(v131) = -7711;
}
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v80 + 944LL))(v80, &v131);
v83 = GameStatsManager::sharedState();
v84 = GJGameLevel::getCoinKey(a1->m_level, 2);
v85 = GameStatsManager::hasSecretCoin(v83, v84);
v86 = "GJ_coinsIcon_gray_001.png";
if ( v85 )
v86 = "GJ_coinsIcon_001.png";
v87 = sub_1007200C0(a1->m_coins, 1);
v88 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v89 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v88, v86);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v87 + 1144LL))(v87, v89);
if ( v85 )
{
BYTE2(v131) = -1;
LOWORD(v131) = -1;
}
else
{
BYTE2(v131) = -31;
LOWORD(v131) = -7711;
}
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v87 + 944LL))(v87, &v131);
v90 = GameStatsManager::sharedState();
v91 = GJGameLevel::getCoinKey(a1->m_level, 3);
v92 = GameStatsManager::hasSecretCoin(v90, v91);
if ( v92 )
v78 = "GJ_coinsIcon_001.png";
v93 = sub_1007200C0(a1->m_coins, 2);
v94 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v95 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v94, v78);
(*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v93 + 1144LL))(v93, v95);
if ( v92 )
{
BYTE2(v131) = -1;
LOWORD(v131) = -1;
}
else
{
BYTE2(v131) = -31;
LOWORD(v131) = -7711;
}
v96 = LODWORD(v130);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v93 + 944LL))(v93, &v131);
if ( m_progressWidth_low <= v96 )
{
v105 = GameStatsManager::sharedState();
GameStatsManager::getBaseCurrencyForLevel(v105, a1->m_level);
v106 = GameStatsManager::sharedState();
GameStatsManager::getAwardedCurrencyForLevel(v106, a1->m_level);
v107 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png");
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, cocos2d::CCSprite *))a1->m_levelDisplay->addChild)(
a1->m_levelDisplay,
v107);
((void (__fastcall *)(cocos2d::CCSprite *, float))v107->setScale)(v107, 0.69999999);
v108 = (cocos2d::CCString *)sub_1007AB580("%i/%i", v120);
v109 = cocos2d::CCString::getCString(v108);
v110 = cocos2d::CCLabelBMFont::create_3(v109, "bigFont.fnt");
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, cocos2d::CCLabelBMFont *))a1->m_levelDisplay->addChild)(
a1->m_levelDisplay,
v110);
sub_10028CBE0((float *)&v131, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v110->setAnchorPoint)(v110, &v131);
sub_10028CBE0((float *)&v131, 8.0, 12.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v110->setPosition)(v110, &v131);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v110->setScale)(v110, 0.40000001);
m_progressWidth_low = *(int *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v110->getPosition)(v110);
v130 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v110->getContentSize)(v110);
v111 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v110->getScale)(v110);
*(float *)&m_progressWidth_low = (float)((float)(v111 * v130) + *(float *)&m_progressWidth_low) + 9.0;
v112 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v110->getPosition)(v110);
sub_10028CBE0((float *)&v131, *(float *)&m_progressWidth_low, *(float *)(v112 + 4) + -0.5);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v107->setPosition)(v107, &v131);
sub_10071FCD0(a1->m_dynamicObjects, v107);
sub_10071FCD0(a1->m_dynamicObjects, v110);
m_coinObject = a1->m_coinObject;
if ( !m_coinObject )
goto LABEL_29;
}
else
{
if ( (unsigned int)sub_100720070(a1->m_levelObjects) )
{
v97 = 0;
do
{
v98 = sub_1007200C0(a1->m_levelObjects, v97);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v98 + 328LL))(v98, 0);
++v97;
}
while ( v97 < (unsigned int)sub_100720070(a1->m_levelObjects) );
}
v99 = cocos2d::CCSprite::createWithSpriteFrameName("GJLargeLock_001.png");
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, cocos2d::CCSprite *))a1->m_levelDisplay->addChild)(
a1->m_levelDisplay,
v99);
sub_10028CBE0((float *)&v131, a1->m_levelDisplaySize.width * 0.5, a1->m_levelDisplaySize.height * 0.5);
v129 = v99;
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v99->setPosition)(v99, &v131);
v100 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon_001.png");
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, cocos2d::CCSprite *))a1->m_levelDisplay->addChild)(
a1->m_levelDisplay,
v100);
((void (__fastcall *)(cocos2d::CCSprite *, float))v100->setScale)(v100, 1.0);
sub_10028CBE0((float *)&v131, a1->m_levelDisplaySize.width + -15.0, 15.0);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v100->setPosition)(v100, &v131);
v101 = (cocos2d::CCString *)sub_1007AB580("%i/%i", v120);
v102 = cocos2d::CCString::getCString(v101);
v103 = cocos2d::CCLabelBMFont::create_3(v102, "bigFont.fnt");
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, cocos2d::CCLabelBMFont *))a1->m_levelDisplay->addChild)(
a1->m_levelDisplay,
v103);
sub_10028CBE0((float *)&v131, 1.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v103->setAnchorPoint)(v103, &v131);
v104 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v100->getPosition)(v100);
sub_10028CBE0((float *)v125, -15.0, 0.5);
sub_10028CCE0((double *)&v131, v104, v125);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v103->setPosition)(v103, &v131);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v103->setScale)(v103, 0.69999999);
sub_10071FCD0(a1->m_dynamicObjects, v129);
sub_10071FCD0(a1->m_dynamicObjects, v100);
sub_10071FCD0(a1->m_dynamicObjects, v103);
m_coinObject = a1->m_coinObject;
if ( !m_coinObject )
goto LABEL_29;
}
goto LABEL_28;
}
v32 = sub_100720070(a1->m_progressObjects);
if ( v9 != -2 )
{
if ( v32 )
{
v113 = 0;
do
{
v114 = sub_1007200C0(a1->m_progressObjects, v113);
(*(void (__fastcall **)(__int64, _QWORD, double))(*(_QWORD *)v114 + 328LL))(v114, 0, v134);
++v113;
}
while ( v113 < (unsigned int)sub_100720070(a1->m_progressObjects) );
}
v115 = cocos2d::CCLabelBMFont::create_3("Coming Soon!", "bigFont.fnt");
((void (__fastcall *)(LevelPage *, cocos2d::CCLabelBMFont *, double))a1->addChild)(a1, v115, v134);
sub_10028CBE0((float *)&v131, v127 * 0.5, (float)(0.5 * v128) + 50.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v115->setPosition)(v115, &v131);
sub_10071FCD0(a1->m_dynamicObjects, v115);
LevelPage::addSecretDoor(a1);
m_coinObject = a1->m_coinObject;
if ( !m_coinObject )
goto LABEL_29;
goto LABEL_28;
}
if ( v32 )
{
v33 = 0;
do
{
v34 = sub_1007200C0(a1->m_progressObjects, v33);
(*(void (__fastcall **)(__int64, _QWORD, double))(*(_QWORD *)v34 + 328LL))(v34, 0, v134);
++v33;
}
while ( v33 < (unsigned int)sub_100720070(a1->m_progressObjects) );
}
v35 = cocos2d::CCSprite::createWithSpriteFrameName("theTowerDoor_001.png");
v36 = CCMenuItemSpriteExtra::create(
v35,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)LevelPage::onTheTower);
v37 = cocos2d::CCMenu::createWithItem(v36);
((void (__fastcall *)(LevelPage *, cocos2d::CCMenu *, double))a1->addChild)(a1, v37, v134);
sub_10028CBE0((float *)&v131, v127 * 0.5, (float)(v128 * 0.5) + -5.0);
((void (__fastcall *)(cocos2d::CCMenu *, __int128 *))v37->setPosition)(v37, &v131);
sub_10071FCD0(a1->m_dynamicObjects, v37);
v38 = cocos2d::CCSprite::createWithSpriteFrameName("theTowerLabel_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *))v35->addChild)(v35, v38);
*(float *)&m_progressWidth_low = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35)
* 0.5;
v39 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
sub_10028CBE0((float *)&v131, *(float *)&m_progressWidth_low, *(float *)(v39 + 4) + 23.0);
((void (__fastcall *)(cocos2d::CCSprite *, __int128 *))v38->setPosition)(v38, &v131);
sub_10028CBE0((float *)&v131, 0.0, 5.0);
v40 = cocos2d::CCMoveBy::create(2.5, (const cocos2d::CCPoint *)&v131);
v41 = cocos2d::CCEaseInOut::create(v40, 1.8);
sub_10028CBE0((float *)&v131, 0.0, -5.0);
v42 = cocos2d::CCMoveBy::create(2.5, (const cocos2d::CCPoint *)&v131);
v43 = cocos2d::CCEaseInOut::create(v42, 1.8);
v44 = sub_1003B5760(v41, v43, 0);
v45 = cocos2d::CCRepeatForever::create(v44);
cocos2d::CCNode::runAction(v35, v45);
__p = operator new(0xC0u);
*(_QWORD *)&v131 = 193;
*((_QWORD *)&v131 + 1) = 189;
strcpy(
(char *)__p,
"30a-1a2.2a0.48a11a90a180a29a0a11a0a0a0a0a0a0a0a5a1a0a0a0.0745098a0a0a0a0.611765a0a1a0a2a1a0a0a0a0a0.937255a0a1a0a1"
"a0a0.54a0a0.57a0a56a0a11a0a-25a17a1a2a1a0a0a1a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0");
v46 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString(&v131, 0, 0);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCParticleSystem *, __int64))v35->addChild_0)(v35, v46, 11);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->setScale)(v46, 1.0);
cocos2d::CCParticleSystem::resetSystem(v46);
m_progressWidth_low = *(int *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
v47 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
sub_10028CBE0((float *)v125, *(float *)&m_progressWidth_low * 0.5, *(float *)(v47 + 4) * 0.5);
((void (__fastcall *)(cocos2d::CCParticleSystem *, unsigned __int64 *))v46->setPosition)(v46, v125);
v126 = operator new(0xB8u);
v125[0] = 185;
v125[1] = 183;
strcpy(
(char *)v126,
"20a-1a2a0.3a8a90a90a0a2a27a30a0a0a0a0a0a0a75a28a0a360a0a0a0.839216a0a1a0a0.05a0a0a0a0a0a0.184314a0a0a0a1a0a0.05a0a"
"0.73a0a0.71a0a0a0a0a0a0a0a0a2a1a1a0a0a184a0a0a0a0a0a0a1a0a0a0a0a0a0a0");
v48 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString(v125, 0, 0);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCParticleSystem *, __int64))v35->addChild_0)(v35, v48, 11);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->setScale)(v48, 1.0);
cocos2d::CCParticleSystem::resetSystem(v48);
m_progressWidth_low = *(int *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
v49 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
sub_10028CBE0((float *)v122, *(float *)&m_progressWidth_low * 0.5, *(float *)(v49 + 4) * 0.5);
((void (__fastcall *)(cocos2d::CCParticleSystem *, _QWORD *))v48->setPosition)(v48, v122);
v123 = operator new(0xB8u);
v122[0] = 185;
v122[1] = 178;
strcpy(
(char *)v123,
"3a-1a3a0.3a1a90a90a0a2a11a13a0a0a0a0a0a0a15a5a0a0a0a0a0.839216a0a1a0a0.15a0.16a0a0a0a0a0.184314a0a0a0a1a0a0.21a0.0"
"7a1a0a1a0a0a0a0a0a0a0a0a2a1a1a0a0a34a0a0a0a0a0a0a1a0a0a0a0a0a0a0");
v50 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString(v122, 0, 0);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCParticleSystem *, __int64))v35->addChild_0)(v35, v50, 11);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v50->setScale)(v50, 1.0);
cocos2d::CCParticleSystem::resetSystem(v50);
m_progressWidth_low = *(int *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
v51 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v35->getContentSize)(v35);
sub_10028CBE0(&v121, *(float *)&m_progressWidth_low * 0.5, 0.5 * *(float *)(v51 + 4));
((void (__fastcall *)(cocos2d::CCParticleSystem *, float *))v50->setPosition)(v50, &v121);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v46->update)(v46, 0.1);
((void (__fastcall *)(cocos2d::CCParticleSystem *, float))v48->update)(v48, 0.1);
if ( (v122[0] & 1) != 0 )
{
operator delete(v123);
if ( (v125[0] & 1) == 0 )
{
LABEL_26:
if ( (v131 & 1) == 0 )
goto LABEL_27;
goto LABEL_72;
}
}
else if ( (v125[0] & 1) == 0 )
{
goto LABEL_26;
}
operator delete(v126);
if ( (v131 & 1) == 0 )
{
LABEL_27:
m_coinObject = a1->m_coinObject;
if ( !m_coinObject )
{
LABEL_29:
a1->m_isBusy = 0;
return;
}
LABEL_28:
((void (__fastcall *)(GameObject *, bool))m_coinObject->setVisible)(
m_coinObject,
a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed == -1);
goto LABEL_29;
}
LABEL_72:
operator delete(__p);
m_coinObject = a1->m_coinObject;
if ( !m_coinObject )
goto LABEL_29;
goto LABEL_28;
}
}