//
// DeathMarkerSettingsPopup::init from 0x14011bea0 to 0x14011d48d (5613 bytes)
//
// 2 xrefs:
// > PauseLayer::onSideButtonPressed @ 0x1404d9856
// > ??> @ 0x14091640c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:26:55 +0000
//
// Hidden C++ exception states: #wind=11
char __fastcall DeathMarkerSettingsPopup::init(__int64 a1, __int64 a2, __int64 a3, int a4)
{
char result; // al
__int64 v7; // rcx
__int64 v8; // rax
float v9; // xmm12_4
float v10; // xmm8_4
struct cocos2d::CCSprite *v11; // rax
int v12; // ebx
cocos2d::CCObject *v13; // rsi
__int64 v14; // rdi
__int64 v15; // rbx
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rax
__int64 v19; // rcx
char *v20; // rdx
size_t v21; // r8
__int64 v22; // rcx
void **v23; // rsi
unsigned __int64 v24; // rdi
__int64 v25; // rbx
__int64 *v26; // rsi
__int64 v27; // rdi
__int64 v28; // rbx
__int64 v29; // rax
__int64 v30; // rax
float v31; // xmm14_4
float v32; // xmm15_4
struct cocos2d::CCLabelBMFont *v33; // rdi
__int64 v34; // rbx
__int64 v35; // rax
__int64 v36; // rbx
__int64 v37; // rax
__int64 v38; // r12
__int64 *v39; // rsi
__int64 v40; // rdi
__int64 v41; // rbx
__int64 v42; // rax
__int64 v43; // rax
struct cocos2d::CCLabelBMFont *v44; // rax
__int64 v45; // rdi
__int64 v46; // rbx
__int64 v47; // rax
__int64 v48; // rdi
__int64 v49; // rbx
__int64 v50; // rax
__int64 v51; // r8
cocos2d::CCLayer *v52; // rax
__int64 v53; // rdx
__int64 v54; // rdi
__int64 v55; // rbx
float v56; // xmm11_4
__int64 v57; // rax
__int64 v58; // rbx
cocos2d::CCString *v59; // rax
int v60; // ebx
void *v61; // r8
__int64 v62; // rcx
int v63; // ebx
__int64 v64; // rcx
struct cocos2d::CCLabelBMFont *v65; // rdi
__int64 v66; // rbx
__int64 v67; // rax
__int64 v68; // rbx
__int64 v69; // rax
__int64 *v70; // rsi
__int64 v71; // rdi
__int64 v72; // rbx
__int64 v73; // rax
__int64 v74; // rax
struct cocos2d::CCLabelBMFont *v75; // rax
__int64 v76; // rdi
__int64 v77; // rbx
__int64 v78; // rax
__int64 v79; // rdi
__int64 v80; // rbx
__int64 v81; // rax
__int64 v82; // r8
cocos2d::CCLayer *v83; // rax
__int64 v84; // rdx
__int64 v85; // rdi
__int64 v86; // rbx
__int64 v87; // rax
__int64 v88; // rbx
cocos2d::CCString *v89; // rax
int v90; // esi
void *v91; // rcx
__int64 v92; // rdi
void (__fastcall **v93)(__int64, const char *); // rdi
__int64 v94; // rbx
cocos2d::CCString *v95; // rax
const char *CString; // rax
float *v97; // r15
int v98; // ebx
int v99; // eax
cocos2d::CCMenuItem *v100; // rsi
__int64 v101; // rcx
unsigned __int8 GameVariable; // al
__int64 v103; // rdi
float v104; // xmm6_4
float v105; // xmm7_4
__int64 v106; // rbx
__int64 v107; // rax
__int64 v108; // rax
const char *v109; // rsi
struct cocos2d::CCLabelBMFont *v110; // rdi
__int64 v111; // rbx
__int64 v112; // rax
__int64 v113; // rbx
__int64 v114; // rax
_BYTE *v115; // rdx
size_t v116; // r8
size_t v117; // r8
__int64 *v118; // rsi
__int64 v119; // rdi
__int64 v120; // rbx
__int64 v121; // rax
__int64 v122; // rax
cocos2d::CCObject *v123; // rbx
cocos2d::CCObject *v124; // rsi
__int64 v125; // rdi
__int64 v126; // rbx
__int64 v127; // rax
__int64 v128; // rax
void **v129; // [rsp+58h] [rbp-B0h] BYREF
void *v130; // [rsp+60h] [rbp-A8h] BYREF
__int128 v131; // [rsp+68h] [rbp-A0h] BYREF
__int64 v132; // [rsp+78h] [rbp-90h]
__int64 v133; // [rsp+80h] [rbp-88h]
float v134; // [rsp+88h] [rbp-80h] BYREF
void *v135; // [rsp+90h] [rbp-78h] BYREF
float v136[2]; // [rsp+98h] [rbp-70h] BYREF
_BYTE v137[8]; // [rsp+A0h] [rbp-68h] BYREF
const char *v138; // [rsp+A8h] [rbp-60h]
_QWORD v139[2]; // [rsp+B0h] [rbp-58h] BYREF
float v140; // [rsp+C0h] [rbp-48h]
float v141; // [rsp+C4h] [rbp-44h]
const char *v142; // [rsp+C8h] [rbp-40h]
const char *v143; // [rsp+D0h] [rbp-38h]
const char *v144; // [rsp+D8h] [rbp-30h]
__int64 (__fastcall *v145)(); // [rsp+E0h] [rbp-28h]
float v146; // [rsp+E8h] [rbp-20h]
float v147; // [rsp+ECh] [rbp-1Ch]
const char *v148; // [rsp+F0h] [rbp-18h]
const char *v149; // [rsp+F8h] [rbp-10h]
const char *v150; // [rsp+100h] [rbp-8h]
__int64 (__fastcall *v151)(); // [rsp+108h] [rbp+0h]
float v152; // [rsp+110h] [rbp+8h]
float v153; // [rsp+114h] [rbp+Ch]
const char *v154; // [rsp+118h] [rbp+10h]
const char *v155; // [rsp+120h] [rbp+18h]
const char *v156; // [rsp+128h] [rbp+20h]
__int64 (__fastcall *v157)(); // [rsp+130h] [rbp+28h]
float v158; // [rsp+138h] [rbp+30h]
float v159; // [rsp+13Ch] [rbp+34h]
const char *v160; // [rsp+140h] [rbp+38h]
const char *v161; // [rsp+148h] [rbp+40h]
const char *v162; // [rsp+150h] [rbp+48h]
__int64 (__fastcall *v163)(); // [rsp+158h] [rbp+50h]
float v164; // [rsp+160h] [rbp+58h]
float v165; // [rsp+164h] [rbp+5Ch]
const char *v166; // [rsp+168h] [rbp+60h]
const char *v167; // [rsp+170h] [rbp+68h]
const char *v168; // [rsp+178h] [rbp+70h]
__int64 (__fastcall *v169)(); // [rsp+180h] [rbp+78h]
float v170; // [rsp+188h] [rbp+80h]
float v171; // [rsp+18Ch] [rbp+84h]
const char *v172; // [rsp+190h] [rbp+88h]
const char *v173; // [rsp+198h] [rbp+90h]
const char *v174; // [rsp+1A0h] [rbp+98h]
__int64 (__fastcall *v175)(); // [rsp+1A8h] [rbp+A0h]
float v176; // [rsp+1B0h] [rbp+A8h]
float v177; // [rsp+1B4h] [rbp+ACh]
const char *v178; // [rsp+1B8h] [rbp+B0h]
const char *v179; // [rsp+1C0h] [rbp+B8h]
const char *v180; // [rsp+1C8h] [rbp+C0h]
__int64 (__fastcall *v181)(); // [rsp+1D0h] [rbp+C8h]
float v182; // [rsp+1D8h] [rbp+D0h]
float v183; // [rsp+1DCh] [rbp+D4h]
const char *v184; // [rsp+1E0h] [rbp+D8h]
const char *v185; // [rsp+1E8h] [rbp+E0h]
const char *v186; // [rsp+1F0h] [rbp+E8h]
__int64 (__fastcall *v187)(); // [rsp+1F8h] [rbp+F0h]
float v188; // [rsp+200h] [rbp+F8h]
float v189; // [rsp+204h] [rbp+FCh]
const char *v190; // [rsp+208h] [rbp+100h]
_BYTE v191[8]; // [rsp+218h] [rbp+110h] BYREF
_BYTE v192[8]; // [rsp+220h] [rbp+118h] BYREF
__int128 *v193; // [rsp+228h] [rbp+120h]
void *Block[2]; // [rsp+238h] [rbp+130h] BYREF
__int64 v195; // [rsp+248h] [rbp+140h]
unsigned __int64 v196; // [rsp+250h] [rbp+148h]
void *Src[2]; // [rsp+258h] [rbp+150h] BYREF
unsigned __int64 v198; // [rsp+268h] [rbp+160h]
unsigned __int64 v199; // [rsp+270h] [rbp+168h]
result = SetupTriggerPopup::init(a1, 0, 0, a4, 1133903872, 1, 0);
if ( result )
{
*(_QWORD *)(a1 + 1040) = a2;
v8 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8, v136);
v9 = v136[0] * 0.5;
v10 = (float)(v136[1] * 0.5) + 150.0;
v195 = 13;
v196 = 15;
strcpy((char *)Block, "Death Markers");
HIWORD(Block[1]) = 0;
SetupTriggerPopup::addTitle(a1, Block);
v11 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v12 = (int)v11;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v11 + 160LL))(v11);
v13 = CCMenuItemSpriteExtra::create(v12, 0, a1, (__int64)sub_14009D628);
*((_DWORD *)v13 + 93) = 1069547520;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v13);
v14 = *(_QWORD *)v13;
v15 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v134, (float)(v9 - 180.0) + 8.0, v10 - 12.0);
cocos2d::CCNode::convertToNodeSpace(v15, &v130, v16);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v14 + 184))(v13, v17);
*(_OWORD *)Src = 0;
v198 = 0;
v199 = 0;
Src[0] = sub_14003D460(0x80u);
v198 = 127;
v199 = 127;
strcpy(
(char *)Src[0],
"Local Markers: Your deaths.\n"
"Label counts your deaths near that spot.\n"
" \n"
"Global Markers: Online players.\n");
v18 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v129 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v129);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v18 = qword_14090BFD0;
}
v19 = *(_QWORD *)(v18 + 560);
if ( !v19 || *(_BYTE *)(v19 + 2201) )
{
v20 = "Of the players that reached the spot:\nSkull% died here.\nWall% never got past it.";
v21 = 104;
}
else
{
v20 = "No Progress triggers in this level, less info:\n"
"Skull% of all players died here.\n"
"Wall% of the players that died here never beat the level.";
v21 = 161;
}
sub_140044D80(Src, v20, v21);
v129 = Block;
*(_OWORD *)Block = 0;
v195 = 0;
v196 = 0;
v23 = Src;
if ( v199 > 0xF )
v23 = (void **)Src[0];
v24 = v198;
v25 = 0x7FFFFFFFFFFFFFFFLL;
if ( v198 > 0x7FFFFFFFFFFFFFFFLL )
sub_140009D90(v22);
if ( v198 > 0xF )
{
if ( (v198 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v25 = v198 | 0xF;
if ( (v198 | 0xF) < 0x16 )
v25 = 22;
}
Block[0] = sub_14003D460(v25 + 1);
v195 = v24;
v196 = v25;
memcpy(Block[0], v23, v24 + 1);
}
else
{
v195 = v198;
v196 = 15;
*(_OWORD *)Block = *(_OWORD *)v23;
}
v132 = 13;
v133 = 15;
strcpy((char *)&v131, "Death Markers");
HIWORD(v131) = 0;
v26 = (__int64 *)InfoAlertButton::create(&v131, Block);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v26);
v27 = *v26;
v28 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, (float)(v9 + 180.0) - 16.0, v10 - 16.0);
cocos2d::CCNode::convertToNodeSpace(v28, &v130, v29);
(*(void (__fastcall **)(__int64 *, __int64))(v27 + 184))(v26, v30);
v31 = v9 + 92.0;
v32 = v10 - 44.0;
v134 = v10 - 70.0;
v33 = cocos2d::CCLabelBMFont::create("Frequency:", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v33 + 160LL))(v33);
v34 = *(_QWORD *)v33;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v34 + 288))(v33, v35);
v36 = *(_QWORD *)v33;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, (float)(v9 - 84.0) + 8.0, v10 - 44.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v36 + 184))(v33, v37);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v33,
1);
v129 = (void **)&v131;
v131 = 0;
v132 = 0;
v133 = 0;
*(_QWORD *)&v131 = sub_14003D460(0xD0u);
v132 = 205;
v133 = 207;
strcpy(
(char *)v131,
"How often markers show when you die.\n"
"Lower settings only show them for new bests, repeated deaths at one spot, or spots deadly to e"
"veryone.\n"
"Always shows them on every death.");
Block[1] = (void *)121;
v38 = 9;
v195 = 9;
v196 = 15;
Block[0] = (void *)0x636E657571657246LL;
v39 = (__int64 *)InfoAlertButton::create(Block, &v131);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v39);
v40 = *v39;
v41 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, (float)(v9 - 84.0) - 62.0, v10 - 44.0);
cocos2d::CCNode::convertToNodeSpace(v41, &v130, v42);
(*(void (__fastcall **)(__int64 *, __int64))(v40 + 184))(v39, v43);
v44 = cocos2d::CCLabelBMFont::create("Normal", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 1016) = v44;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v44 + 160LL))(v44);
v45 = **(_QWORD **)(a1 + 1016);
v46 = *(_QWORD *)(a1 + 1016);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v45 + 288))(v46, v47);
v48 = **(_QWORD **)(a1 + 1016);
v49 = *(_QWORD *)(a1 + 1016);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, (float)(v9 - 84.0) + 12.0, v10 - 44.0);
(*(void (__fastcall **)(__int64, __int64))(v48 + 184))(v49, v50);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1016),
1);
v52 = Slider::create(
a1,
(__int64)DeathMarkerSettingsPopup::onFrequencySlider,
v51,
"slidergroove.png",
(__int64)"sliderthumb.png",
(__int64)"sliderthumbsel.png",
0.64999998);
*(_QWORD *)(a1 + 1008) = v52;
LOBYTE(v53) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)v52 + 52) + 336LL))(*((_QWORD *)v52 + 52), v53);
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1008) + 408LL) + 456LL) + 416LL) = 1045220557;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1008),
1);
v54 = **(_QWORD **)(a1 + 1008);
v55 = *(_QWORD *)(a1 + 1008);
v56 = v134;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, v9 - 84.0, v134);
(*(void (__fastcall **)(__int64, __int64))(v54 + 184))(v55, v57);
v58 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v130 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v130);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v58 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v195 = 3;
v196 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0205", 4u);
v59 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v58 + 432), Block);
v60 = cocos2d::CCString::intValue(v59);
if ( v196 > 0xF )
{
v61 = Block[0];
if ( v196 + 1 >= 0x1000 )
{
v61 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v61 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v61);
}
v62 = *(_QWORD *)(a1 + 1008);
if ( v60 <= 0 )
{
v63 = 2;
Slider::setValue(v62, (float)2 / 5.0);
}
else
{
v63 = v60 - 1;
if ( v63 > 5 )
v63 = 5;
Slider::setValue(v62, (float)v63 / 5.0);
if ( v63 < 0 )
v63 = 0;
}
v64 = *(_QWORD *)(a1 + 1016);
if ( v64 )
(**(void (__fastcall ***)(__int64, char *))(v64 + 360))(v64 + 360, off_140702F08[v63]);
v65 = cocos2d::CCLabelBMFont::create("Duration:", "goldFont.fnt");
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v65 + 160LL))(v65);
v66 = *(_QWORD *)v65;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v66 + 288))(v65, v67);
v68 = *(_QWORD *)v65;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, v31 + 13.0, v32);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v68 + 184))(v65, v69);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v65,
1);
v129 = (void **)&v131;
v131 = 0;
v132 = 0;
v133 = 0;
*(_QWORD *)&v131 = sub_14003D460(0x80u);
v132 = 112;
v133 = 127;
strcpy(
(char *)v131,
"Increase or decrease the death marker display time.\n"
"Animations are not affected.");
*(_OWORD *)Block = 0;
v195 = 0;
v196 = 0;
Block[0] = sub_14003D460(0x20u);
v195 = 16;
v196 = 31;
strcpy((char *)Block[0], "Display Duration");
v70 = (__int64 *)InfoAlertButton::create(Block, &v131);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v70);
v71 = *v70;
v72 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, v31 - 57.0, v32);
cocos2d::CCNode::convertToNodeSpace(v72, &v130, v73);
(*(void (__fastcall **)(__int64 *, __int64))(v71 + 184))(v70, v74);
v75 = cocos2d::CCLabelBMFont::create("1.0x", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 1032) = v75;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v75 + 160LL))(v75);
v76 = **(_QWORD **)(a1 + 1032);
v77 = *(_QWORD *)(a1 + 1032);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v76 + 288))(v77, v78);
v79 = **(_QWORD **)(a1 + 1032);
v80 = *(_QWORD *)(a1 + 1032);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, v31 + 17.0, v32);
(*(void (__fastcall **)(__int64, __int64))(v79 + 184))(v80, v81);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1032),
1);
v83 = Slider::create(
a1,
(__int64)DeathMarkerSettingsPopup::onTimescaleSlider,
v82,
"slidergroove.png",
(__int64)"sliderthumb.png",
(__int64)"sliderthumbsel.png",
0.64999998);
*(_QWORD *)(a1 + 1024) = v83;
LOBYTE(v84) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)v83 + 52) + 336LL))(*((_QWORD *)v83 + 52), v84);
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1024) + 408LL) + 456LL) + 416LL) = 1032358025;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 1024),
1);
v85 = **(_QWORD **)(a1 + 1024);
v86 = *(_QWORD *)(a1 + 1024);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, v31, v56);
(*(void (__fastcall **)(__int64, __int64))(v85 + 184))(v86, v87);
v88 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v130 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v130);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v88 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v195 = 3;
v196 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0211", 4u);
v89 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v88 + 432), Block);
v90 = cocos2d::CCString::intValue(v89);
if ( v196 > 0xF )
{
v91 = Block[0];
if ( v196 + 1 >= 0x1000 )
{
v91 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v91 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v91);
}
if ( v90 <= 0 )
{
v90 = 100;
}
else
{
if ( v90 > 200 )
v90 = 200;
if ( v90 < 50 )
v90 = 50;
}
Slider::setValue(*(_QWORD *)(a1 + 1024), (float)(v90 - 50) / 150.0);
v92 = *(_QWORD *)(a1 + 1032);
if ( v92 )
{
v93 = *(void (__fastcall ***)(__int64, const char *))(v92 + 360);
v94 = *(_QWORD *)(a1 + 1032);
v95 = cocos2d::CCString::createWithFormat("%.1fx", (float)((float)v90 / 100.0));
CString = cocos2d::CCString::getCString(v95);
(*v93)(v94 + 360, CString);
}
v138 = "Local Markers";
v139[0] = "0200";
v139[1] = DeathMarkerSettingsPopup::onToggleLocal;
v140 = v9 - 130.0;
v141 = v10 - 102.0;
v142 = "Shows your own deaths as markers in the level.";
v143 = "Global Markers";
v144 = "0202";
v145 = DeathMarkerSettingsPopup::onToggleGlobal;
v146 = v9 + 26.0;
v147 = v10 - 102.0;
v148 = "Shows where all players die. Downloaded automatically for online levels.";
v149 = "Switch Color";
v150 = "0204";
v151 = DeathMarkerSettingsPopup::onToggleColor;
v152 = v9 - 130.0;
v153 = v10 - 134.0;
v154 = "Tints your local markers with your primary color instead of your secondary color.";
v155 = "Disable Anim";
v156 = "0201";
v157 = DeathMarkerSettingsPopup::onToggleAnimation;
v158 = v9 + 26.0;
v159 = v10 - 134.0;
v160 = "Markers appear instantly when you die, without the pop-in animation.";
v161 = "Disable Sound";
v162 = "0206";
v163 = DeathMarkerSettingsPopup::onToggleSound;
v164 = v9 - 130.0;
v165 = v10 - 166.0;
v166 = "Mutes the marker pop-in sound.";
v167 = "Disable Markers";
v168 = "0207";
v169 = DeathMarkerSettingsPopup::onToggleDisabled;
v170 = v9 + 26.0;
v171 = v10 - 166.0;
v172 = "Hides all death markers.";
v173 = "Hide Labels";
v174 = "0208";
v175 = DeathMarkerSettingsPopup::onToggleLabels;
v176 = v9 - 130.0;
v177 = v10 - 198.0;
v178 = "Hides the count and rate labels.";
v179 = "Limited Labels";
v180 = "0210";
v181 = DeathMarkerSettingsPopup::onToggleLimited;
v182 = v9 + 26.0;
v183 = v10 - 198.0;
v184 = "Only shows the global label where you died. Ignored in the editor.";
v185 = "Live Practice Markers";
v186 = "0216";
v187 = DeathMarkerSettingsPopup::onToggleLive;
v188 = v9 - 130.0;
v189 = v10 - 230.0;
v190 = "Death markers stay visible in Practice mode,\n"
"from a Start pos, or in your local created levels.\n"
"Normal runs use the Frequency setting.";
v97 = (float *)v139;
do
{
v98 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png");
v99 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png");
v100 = CCMenuItemToggler::create(v98, v99, a1, *((_QWORD *)v97 + 1));
(*(void (__fastcall **)(cocos2d::CCMenuItem *))(*(_QWORD *)v100 + 160LL))(v100);
v101 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v129 = (void **)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v129);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v101 = qword_14090BFD0;
}
GameVariable = GameManager::getGameVariable(v101, *(_QWORD *)v97);
CCMenuItemToggler::toggle((__int64)v100, GameVariable);
(*(void (__fastcall **)(_QWORD, cocos2d::CCMenuItem *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v100);
v103 = *(_QWORD *)v100;
v104 = v97[5];
v105 = v97[4];
v106 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v130, v105, v104);
cocos2d::CCNode::convertToNodeSpace(v106, &v134, v107);
(*(void (__fastcall **)(cocos2d::CCMenuItem *, __int64))(v103 + 184))(v100, v108);
v109 = *((const char **)v97 - 1);
v110 = cocos2d::CCLabelBMFont::create(v109, (const char *)&qword_140704F78);
v111 = *(_QWORD *)v110;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v111 + 288))(v110, v112);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v110 + 160LL))(v110);
v113 = *(_QWORD *)v110;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v105 + 20.0, v104);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v113 + 184))(v110, v114);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v110,
1);
v193 = &v131;
v115 = *((_BYTE **)v97 + 3);
v131 = 0;
v132 = 0;
v133 = 0;
v116 = -1;
do
++v116;
while ( v115[v116] );
sub_14003D230(&v131, v115, v116);
*(_OWORD *)Block = 0;
v195 = 0;
v196 = 0;
v117 = -1;
do
++v117;
while ( v109[v117] );
sub_14003D230(Block, v109, v117);
v118 = (__int64 *)InfoAlertButton::create(Block, &v131);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v118);
v119 = *v118;
v120 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v137, v105 - 16.0, v104 + 13.0);
cocos2d::CCNode::convertToNodeSpace(v120, &v135, v121);
(*(void (__fastcall **)(__int64 *, __int64))(v119 + 184))(v118, v122);
v97 += 10;
--v38;
}
while ( v38 );
v135 = operator new(0x2C8u);
v123 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v135);
if ( v123 )
{
if ( ButtonSprite::init_1(
(__int64)v123,
(__int64)"Clear Markers",
110,
0,
1058642330,
1,
&qword_140704F78,
(__int64)"GJ_button_06.png",
1106247680) )
{
cocos2d::CCObject::autorelease(v123);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v123 + 8LL))(v123, 1);
v123 = nullptr;
}
}
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v123 + 160LL))(v123);
v135 = operator new(0x208u);
v124 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v135);
if ( v124 )
{
if ( CCMenuItemSpriteExtra::init(
(__int64 *)v124,
(__int64 *)v123,
0,
a1,
(__int64)DeathMarkerSettingsPopup::onClearMarkers) )
{
cocos2d::CCObject::autorelease(v124);
LABEL_65:
*((_DWORD *)v124 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v124);
v125 = *(_QWORD *)v124;
v126 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v135, v9, v10 - 266.0);
cocos2d::CCNode::convertToNodeSpace(v126, v137, v127);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v125 + 184))(v124, v128);
sub_14003D310((__int64)Src);
return 1;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v124 + 8LL))(v124, 1);
}
v124 = nullptr;
goto LABEL_65;
}
return result;
}