//
// DeathTrackerOptionsPopup::init from 0x77003c to 0x770306 (714 bytes)
//
// 1 xrefs:
// > DeathTrackerOptionsPopup::create @ 0x77056c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:15 +0000
//
GameManager *__fastcall DeathTrackerOptionsPopup::init(
const cocos2d::CCPoint **this,
GJGameLevel *a2,
DeathTrackerPopup *a3)
{
GameManager *v6; // r0
GameManager *v7; // r9
float v8; // s16
float v9; // s17
const char *v10; // r1
int v11; // r5
int v12; // r8
const cocos2d::CCPoint *v13; // r11
void (__fastcall *v14)(int, _DWORD *); // r10
float v15; // s18
const char *v16; // r1
int v17; // r6
const char *v18; // r1
int v19; // r0
cocos2d::CCNodeRGBA *v20; // r6
GameManager *v21; // r0
GameManager *v22; // r0
unsigned __int8 GameVariable; // r0
void (__fastcall *v24)(cocos2d::CCNodeRGBA *, _DWORD *); // r11
const char *v25; // r2
int v26; // r6
ButtonSprite *v27; // r0
int v28; // r5
const cocos2d::CCPoint *v29; // r8
void (__fastcall *v30)(int, _BYTE *); // r6
float v32; // [sp+10h] [bp-4Ch]
cocos2d::CCPoint *v33; // [sp+14h] [bp-48h]
cocos2d::CCPoint *v34; // [sp+14h] [bp-48h]
cocos2d::CCPoint *v35; // [sp+14h] [bp-48h]
float v36[2]; // [sp+18h] [bp-44h] BYREF
char v37[8]; // [sp+20h] [bp-3Ch] BYREF
_BYTE v38[8]; // [sp+28h] [bp-34h] BYREF
int v39; // [sp+30h] [bp-2Ch]
int v40; // [sp+34h] [bp-28h]
_DWORD v41[2]; // [sp+38h] [bp-24h] BYREF
_DWORD v42[2]; // [sp+40h] [bp-1Ch] BYREF
int v43[3]; // [sp+48h] [bp-14h] BYREF
v6 = SetupTriggerPopup::init((SetupTriggerPopup *)this, nullptr, nullptr, 320.0, 150.0, (char *)&dword_0 + 1, 0.0);
v7 = v6;
if ( v6 )
{
*(this + 180) = a3;
*(this + 179) = a2;
cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v36);
memset(v43, 0, sizeof(v43));
v8 = v36[1] * 0.5;
v9 = v36[0] * 0.5;
std::string::__init(v43, "Death Tracker", 0xDu);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)v43);
std::string::~string((int)v43);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1061997773);
v39 = 684;
v40 = 1;
v12 = CCMenuItemSpriteExtra::create(v11, 0, (int)this, 684, 1);
CCMenuItemSpriteExtra::setSizeMult(v12, 1.5);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v12);
v13 = *(this + 111);
v14 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (float)(v9 - 160.0) + 8.0, (float)(v8 + 75.0) - 12.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v42, v13);
v14(v12, v42);
v15 = (float)(v8 + 75.0) - 56.0;
v17 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v16);
v19 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v18);
v41[1] = 0;
v41[0] = DeathTrackerOptionsPopup::onToggleAutoScroll;
v20 = CCMenuItemToggler::create(v17, v19, (int)this, (int)DeathTrackerOptionsPopup::onToggleAutoScroll, 0);
v21 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCNodeRGBA *, int))(*(_DWORD *)v20 + 80))(v20, 1060320051);
v22 = (GameManager *)GameManager::sharedState(v21);
GameVariable = GameManager::getGameVariable(v22, "0199");
CCMenuItemToggler::toggle(v20, GameVariable ^ 1);
(*(void (__fastcall **)(_DWORD, cocos2d::CCNodeRGBA *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v20);
v24 = *(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD *))(*(_DWORD *)v20 + 92);
v33 = *(this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v9 - 120.0, v15);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v42, v33);
v24(v20, v42);
v26 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Auto-Scroll To Cluster", "bigFont.fnt", v25);
v34 = *(cocos2d::CCPoint **)(*(_DWORD *)v26 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, 0.0, 0.5);
((void (__fastcall *)(int, _DWORD *))v34)(v26, v42);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v26 + 80))(v26, 1056964608);
v35 = *(cocos2d::CCPoint **)(*(_DWORD *)v26 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, (float)(v9 - 120.0) + 18.0, v15);
((void (__fastcall *)(int, _DWORD *))v35)(v26, v42);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v26, 1);
v27 = ButtonSprite::create(
(ButtonSprite *)"Clear Data",
(const char *)&dword_64,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_06.png",
(const char *)0x41F00000,
v32);
v42[0] = DeathTrackerOptionsPopup::onClearData;
v42[1] = 0;
v28 = CCMenuItemSpriteExtra::create((int)v27, 0, (int)this, (int)DeathTrackerOptionsPopup::onClearData, 0);
CCMenuItemSpriteExtra::setSizeMult(v28, 1.1);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v28);
v29 = *(this + 111);
v30 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v28 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, v9, (float)(v8 - 75.0) + 26.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v38, v29);
v30(v28, v38);
}
return v7;
}