//
// LevelCell::loadFromLevel from 0x430a38 to 0x430b6e (310 bytes)
//
// 4 xrefs:
// > LevelCell::playRecallUnlock @ 0x430be4
// > CustomListView::loadCell @ 0x43408a
// > DailyLevelNode::init @ 0x6072e2
// > LevelBadgePopup::buildCell @ 0x747754
//
// 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:48:14 +0000
//
int __fastcall LevelCell::loadFromLevel(LevelCell *this, GJGameLevel *a2)
{
cocos2d::CCMenuItem *v4; // r1
int v5; // r0
int result; // r0
const char *v7; // r1
int v8; // r9
int v9; // r7
const char *v10; // r1
int v11; // r8
cocos2d::CCNodeRGBA *v12; // r0
int v13; // r6
const cocos2d::CCPoint *v14; // r11
const cocos2d::CCPoint *v15; // r10
int (__fastcall *v16)(int, _BYTE *); // r9
_BYTE v17[8]; // [sp+Ch] [bp-30h] BYREF
_BYTE v18[8]; // [sp+14h] [bp-28h] BYREF
_BYTE v19[8]; // [sp+1Ch] [bp-20h] BYREF
_BYTE v20[8]; // [sp+24h] [bp-18h] BYREF
cocos2d::CCNotificationCenter *(__fastcall *v21)(cocos2d::CCNotificationCenter *, cocos2d::CCObject *); // [sp+2Ch] [bp-10h]
int v22; // [sp+30h] [bp-Ch]
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
*((_DWORD *)this + 108) = 0;
v5 = cocos2d::CCMenu::create(nullptr, v4);
*((_DWORD *)this + 111) = v5;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v5, 3);
*((_DWORD *)this + 106) = a2;
if ( *((_DWORD *)a2 + 238) == 2 )
result = LevelCell::loadLocalLevelCell(this);
else
result = LevelCell::loadCustomLevelCell(this);
if ( *(_BYTE *)(*((_DWORD *)this + 106) + 596) )
{
v8 = *((unsigned __int8 *)this + 448);
if ( !*((_BYTE *)this + 448) )
{
v9 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v7);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 80))(v9, 1058642330);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1058642330);
v21 = LevelCell::onToggle;
v22 = v8;
v12 = CCMenuItemToggler::create(v11, v9, (int)this, (int)LevelCell::onToggle, v8);
*((_DWORD *)this + 108) = v12;
CCMenuItemToggler::toggle(v12, *((unsigned __int8 *)a2 + 595));
CCMenuItemToggler::setSizeMult(*((CCMenuItemToggler **)this + 108), 1.2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 108));
v13 = *((_DWORD *)this + 108);
v14 = *((const cocos2d::CCPoint **)this + 103);
v15 = *((const cocos2d::CCPoint **)this + 111);
v16 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, -50.0, 0.0);
cocos2d::CCPoint::operator+(v18, (char *)this + 436, v17);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v19, v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v20, v15);
return v16(v13, v20);
}
}
return result;
}