//
// CreateParticlePopup::applyTexturePage from 0x664890 to 0x6649f2 (354 bytes)
//
// 3 xrefs:
// > CreateParticlePopup::onTexturePage @ 0x664a28
// > CreateParticlePopup::onSelectParticleTexture @ 0x665778
// > CreateParticlePopup::onPage @ 0x665b80
//
// 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:55:39 +0000
//
int __fastcall CreateParticlePopup::applyTexturePage(CreateParticlePopup *this)
{
CreateParticlePopup *v1; // r4
int v2; // r5
int v3; // r2
int v4; // r6
int v5; // r0
int v6; // r5
int v7; // r9
int (__fastcall *v8)(int, _BYTE *); // r10
int result; // r0
int v10; // r5
int (__fastcall *v11)(int, int); // r6
cocos2d::CCString *v12; // r0
int CString; // r0
float v14[2]; // [sp+4h] [bp-24h] BYREF
_BYTE v15[8]; // [sp+Ch] [bp-1Ch] BYREF
_BYTE v16[8]; // [sp+14h] [bp-14h] BYREF
_BYTE v17[8]; // [sp+1Ch] [bp-Ch] BYREF
v1 = this;
v2 = 0;
if ( *((_DWORD *)this + 165) > 4u )
*((_DWORD *)this + 165) = 0;
while ( 1 )
{
v3 = *((_DWORD *)v1 + 161);
if ( v2 >= (*((_DWORD *)v1 + 162) - v3) >> 2 )
break;
v4 = *(_DWORD *)(v3 + 4 * v2);
v5 = v2 / 88;
++v2;
this = (CreateParticlePopup *)(*(int (__fastcall **)(int, bool))(*(_DWORD *)v4 + 172))(
v4,
v5 == *((_DWORD *)v1 + 165));
}
cocos2d::CCDirector::sharedDirector(this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, (float)(v14[0] * 0.5) - 56.0, (float)(v14[1] * 0.5) + 75.0);
v6 = *((_DWORD *)v1 + 174) % 88;
(*(void (__fastcall **)(_DWORD, bool))(**((_DWORD **)v1 + 160) + 172))(
*((_DWORD *)v1 + 160),
*((_DWORD *)v1 + 174) / 88 == *((_DWORD *)v1 + 165));
v7 = *((_DWORD *)v1 + 160);
v8 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (float)(v6 % 11) * 24.0, (float)(v6 / 11) * -24.0);
cocos2d::CCPoint::operator+(v17, v15, v16);
result = v8(v7, v17);
v10 = *((_DWORD *)v1 + 164);
if ( v10 )
{
v11 = *(int (__fastcall **)(int, int))(*(_DWORD *)v10 + 464);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
(const char *)(*((_DWORD *)v1 + 165) + 1),
5);
CString = cocos2d::CCString::getCString(v12);
return v11(v10, CString);
}
return result;
}