//
// SetupSequenceTriggerPopup::updateGroupIDButtons from 0x6bc070 to 0x6bc2d2 (610 bytes)
//
// 4 xrefs:
// > SetupSequenceTriggerPopup::onAddChance @ 0x6bc380
// > SetupSequenceTriggerPopup::onChangeOrder @ 0x6bc3e0
// > SetupSequenceTriggerPopup::onDeleteSelected @ 0x6bc40c
// > SetupSequenceTriggerPopup::init @ 0x6bcd14
//
// 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:56:47 +0000
//
int __fastcall SetupSequenceTriggerPopup::updateGroupIDButtons(SetupSequenceTriggerPopup *this)
{
int v2; // r0
int v3; // r0
int v4; // r7
unsigned int i; // r4
bool v6; // cf
cocos2d::CCArray *v7; // r0
unsigned int v8; // r1
int v9; // r0
cocos2d::CCDirector *v10; // r0
int v11; // r8
float v12; // s16
float v13; // s17
float v14; // s18
int v15; // r11
const cocos2d::CCPoint *v16; // r6
int result; // r0
signed int j; // r4
int v19; // r3
char *v20; // r0
cocos2d::CCString *v21; // r0
char *CString; // r0
ButtonSprite *v23; // r0
char *v24; // r3
ButtonSprite *v25; // r0
cocos2d::CCObject *v26; // r6
float v27; // r0
float v28; // [sp+10h] [bp-64h]
_BOOL4 v29; // [sp+14h] [bp-60h]
void (__fastcall *v30)(cocos2d::CCObject *, _BYTE *); // [sp+1Ch] [bp-58h]
float v31[2]; // [sp+38h] [bp-3Ch] BYREF
_BYTE v32[8]; // [sp+40h] [bp-34h] BYREF
_BYTE v33[8]; // [sp+48h] [bp-2Ch] BYREF
_BYTE v34[8]; // [sp+50h] [bp-24h] BYREF
_DWORD v35[2]; // [sp+58h] [bp-1Ch] BYREF
int v36[2]; // [sp+60h] [bp-14h] BYREF
ButtonSprite *v37; // [sp+68h] [bp-Ch]
v2 = *((_DWORD *)this + 178);
if ( v2 )
{
v3 = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 32))(v2);
*((_DWORD *)this + 178) = 0;
v4 = v3;
}
else
{
v4 = -1;
}
for ( i = 0; ; ++i )
{
v6 = i >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 180));
v7 = *((cocos2d::CCArray **)this + 180);
if ( v6 )
break;
v8 = i;
v9 = cocos2d::CCArray::objectAtIndex(v7, v8);
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 260))(v9);
}
v10 = (cocos2d::CCDirector *)cocos2d::CCArray::removeAllObjects(v7);
v11 = *((_DWORD *)this + 132);
v12 = 4.5;
v13 = 35.0;
v14 = 40.0;
v29 = (unsigned int)(*(_DWORD *)(v11 + 1652) - *(_DWORD *)(v11 + 1648)) > 0xAF;
if ( (unsigned int)(*(_DWORD *)(v11 + 1652) - *(_DWORD *)(v11 + 1648)) <= 0xAF )
{
v15 = 5;
v13 = 66.0;
}
else
{
v15 = 10;
}
if ( (unsigned int)(*(_DWORD *)(v11 + 1652) - *(_DWORD *)(v11 + 1648)) > 0xAF )
v14 = 15.0;
else
v12 = 2.0;
cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v31);
v16 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v35,
(float)(v31[0] * 0.5) - (float)(v12 * v13),
(float)(v31[1] * 0.5) + 34.0);
result = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v32, v16);
for ( j = 0; ; ++j )
{
v19 = *(_DWORD *)(v11 + 1648);
if ( j >= (unsigned int)((*(_DWORD *)(v11 + 1652) - v19) >> 4) || j == 20 )
break;
v36[0] = 0;
v36[1] = 0;
v37 = nullptr;
if ( v29 )
v20 = "%i\n%i";
else
v20 = "%i-%i";
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)v20,
*(const char **)(v19 + 16 * j),
*(_DWORD *)(v19 + 16 * j + 8));
CString = (char *)cocos2d::CCString::getCString(v21);
std::string::assign(v36, CString);
if ( (v36[0] & 1) != 0 )
v23 = v37;
else
v23 = (ButtonSprite *)((char *)v36 + 1);
v24 = "GJ_button_03.png";
if ( j != v4 )
v24 = "GJ_button_04.png";
v25 = ButtonSprite::create(
v23,
(const char *)(int)v14,
0,
0.35,
1,
"bigFont.fnt",
v24,
(const char *)0x41F00000,
v28);
v35[1] = 0;
v35[0] = SetupSequenceTriggerPopup::onSelect;
v26 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v25,
0,
(int)this,
(int)SetupSequenceTriggerPopup::onSelect,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, signed int))(*(_DWORD *)v26 + 36))(v26, j);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v26);
v30 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v26 + 92);
v27 = floorf((float)(j / v15));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, v13 * (float)(j % v15), v27 * -38.0);
cocos2d::CCPoint::operator+(v34, v32, v33);
v30(v26, v34);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 180), v26);
if ( j == v4 )
*((_DWORD *)this + 178) = v26;
result = std::string::~string((int)v36);
}
return result;
}