//
// LevelControlConfig::slotFromConfig from 0x798864 to 0x798998 (308 bytes)
//
// 6 xrefs:
// > LevelControlConfig::createFromGlobal @ 0x79945e
// > LevelControlConfig::createFromGlobal @ 0x7994d4
// > LevelControlConfig::createFromGlobal @ 0x79950c
// > LevelControlConfig::createFromGlobal @ 0x79954a
// > LevelControlConfig::createFromGlobal @ 0x799582
// > TouchControlEditLayer::saveTarget @ 0x7a4db4
//
// 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:47 +0000
//
LevelControlConfig *__fastcall LevelControlConfig::slotFromConfig(
LevelControlConfig *this,
const UIButtonConfig *a2,
const cocos2d::CCSize *a3,
float *a4,
int a5,
int a6,
bool a7,
char a8)
{
char *v8; // r10
char v12; // r3
int v13; // r3
int v14; // r3
int v15; // r3
float v16; // s15
float v17; // s14
int v18; // r3
float v19; // s15
float v20; // s14
v8 = (char *)this + 28;
cocos2d::CCPoint::CCPoint((LevelControlConfig *)((char *)this + 28));
UIButtonConfig::reset(this);
cocos2d::CCPoint::CCPoint((LevelControlConfig *)((char *)this + 40), (const cocos2d::CCPoint *)&unk_D2E5B0);
*((_DWORD *)this + 12) = 0;
*((_DWORD *)this + 13) = 0;
*((_BYTE *)this + 56) = 0;
*((_BYTE *)this + 57) = 0;
*(_DWORD *)this = *(_DWORD *)a3;
*((_DWORD *)this + 1) = *((_DWORD *)a3 + 1);
*((_DWORD *)this + 2) = *((_DWORD *)a3 + 2);
*((_DWORD *)this + 3) = *((_DWORD *)a3 + 3);
*((_DWORD *)this + 4) = *((_DWORD *)a3 + 4);
*((_DWORD *)this + 5) = *((_DWORD *)a3 + 5);
*((_BYTE *)this + 24) = *((_BYTE *)a3 + 24);
*((_BYTE *)this + 25) = *((_BYTE *)a3 + 25);
cocos2d::CCPoint::operator=(v8, (char *)a3 + 28);
*((_BYTE *)this + 36) = *((_BYTE *)a3 + 36);
*((_BYTE *)this + 37) = *((_BYTE *)a3 + 37);
v12 = *((_BYTE *)a3 + 38);
*((_BYTE *)this + 37) = 0;
*((_DWORD *)this + 12) = a5;
*((_BYTE *)this + 38) = v12;
*((_DWORD *)this + 13) = a6;
*((_BYTE *)this + 56) = a7;
*((_BYTE *)this + 57) = a8;
if ( !a5 )
{
if ( *((float *)a3 + 7) >= (float)(*a4 * 0.5) )
v13 = 3;
else
v13 = 2;
*((_DWORD *)this + 12) = v13;
}
if ( !a6 )
{
if ( *((float *)a3 + 8) >= (float)(a4[1] * 0.5) )
v14 = 3;
else
v14 = 2;
*((_DWORD *)this + 13) = v14;
}
v15 = *((_DWORD *)this + 12);
v16 = *((float *)a3 + 7);
if ( v15 != 2 )
{
v17 = *a4;
if ( v15 == 3 )
v16 = v17 - v16;
else
v16 = v16 - (float)(v17 * 0.5);
}
*((float *)this + 10) = v16;
v18 = *((_DWORD *)this + 13);
v19 = *((float *)a3 + 8);
if ( v18 != 2 )
{
v20 = a4[1];
if ( v18 == 3 )
v19 = v20 - v19;
else
v19 = v19 - (float)(v20 * 0.5);
}
*((float *)this + 11) = v19;
return this;
}