//
// ParticlePreviewLayer::draw from 0x663f28 to 0x6642b6 (910 bytes)
//
// 0 xrefs:
//
// 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
//
float __fastcall ParticlePreviewLayer::draw(ParticlePreviewLayer *this)
{
float result; // r0
int v3; // r5
int v4; // r2
_BOOL4 v5; // r3
_BOOL4 v6; // r8
_BOOL4 v7; // r5
int v8; // r9
int v9; // r0
int v10; // r9
int v11; // r0
const cocos2d::CCPoint *v12; // r0
int v13; // r0
const cocos2d::CCPoint *v14; // r2
const cocos2d::CCPoint *v15; // r0
float v16; // s17
float v17; // s18
float v18; // s19
float v19; // r0
const cocos2d::CCPoint *v20; // r2
float v21; // s15
cocos2d *v22; // r0
float v23; // s17
float v24; // s15
float v25; // s16
float v26; // s18
cocos2d *v27; // r0
float v28; // s15
const cocos2d::CCPoint *v29; // s18
cocos2d *v30; // r0
float v31; // s15
unsigned __int8 v32; // [sp+0h] [bp-3Ch]
unsigned __int8 v33; // [sp+0h] [bp-3Ch]
float v34; // [sp+10h] [bp-2Ch]
_BYTE v35[8]; // [sp+14h] [bp-28h] BYREF
_BYTE v36[8]; // [sp+1Ch] [bp-20h] BYREF
_BYTE v37[8]; // [sp+24h] [bp-18h] BYREF
_BYTE v38[8]; // [sp+2Ch] [bp-10h] BYREF
result = COERCE_FLOAT(cocos2d::CCLayerColor::draw(this));
v3 = *((_DWORD *)this + 110);
v4 = *((_DWORD *)this + 111);
if ( v3 == 1 )
{
v5 = 1;
}
else
{
v5 = v4 == 1;
if ( v3 == 2 )
{
v6 = 1;
goto LABEL_7;
}
}
v6 = v4 == 2;
if ( v3 == 3 )
{
v7 = 1;
goto LABEL_8;
}
LABEL_7:
v7 = v4 == 3;
LABEL_8:
if ( *((_BYTE *)this + 452) )
{
if ( v5 )
{
cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0, 0xFFu, v32);
v8 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
v9 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 476))(*((_DWORD *)this + 112));
cocos2d::CCPoint::operator-(v38, v9);
cocos2d::CCPoint::operator+(v35, v8, v38);
v10 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
v11 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 476))(*((_DWORD *)this + 112));
cocos2d::CCPoint::operator+(v36, v10, v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, (const cocos2d::CCPoint *)v35);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, (const cocos2d::CCPoint *)v36);
result = COERCE_FLOAT(cocos2d::ccDrawRect(v37, v38));
}
if ( v6 )
{
cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0xFFu, v32);
v12 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v12);
v13 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 520))(*((_DWORD *)this + 112));
cocos2d::CCPoint::operator*(v37, v13, 1036831949);
cocos2d::CCPoint::operator+(v38, v36, v37);
result = COERCE_FLOAT(cocos2d::ccDrawLine((cocos2d *)v36, (const cocos2d::CCPoint *)v38, v14));
}
if ( v7 )
{
cocos2d::ccDrawColor4B(
(cocos2d *)((char *)&dword_FC + 3),
(unsigned __int8)&dword_FC + 3,
0,
(unsigned __int8)&dword_FC + 3,
v32);
v15 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v15);
v16 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 528))(*((_DWORD *)this + 112)))
* 0.25;
v17 = (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 500))(*((_DWORD *)this + 112)) * 0.017453;
v18 = sinf(v17);
v19 = cosf(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, v19 * v16, v18 * v16);
cocos2d::CCPoint::operator+(v38, v36, v37);
cocos2d::ccDrawLine((cocos2d *)v36, (const cocos2d::CCPoint *)v38, v20);
v21 = 180.0;
if ( fabsf((*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 508))(*((_DWORD *)this + 112))) < 180.0 )
v21 = fabsf((*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 508))(*((_DWORD *)this + 112)));
v22 = (cocos2d *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
return COERCE_FLOAT(
cocos2d::ccDrawCircleSegment(
v22,
(const cocos2d::CCPoint *)0x41A00000,
v17 - (float)((float)((float)(v21 * 0.017453) + (float)(v21 * 0.017453)) * 0.5),
(float)(v21 * 0.017453) + (float)(v21 * 0.017453),
COERCE_FLOAT(20),
0,
1.0,
1.0,
v34));
}
}
else if ( v5 || v6 || v7 )
{
v23 = -(float)(COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 500))(*((_DWORD *)this + 112)))
* 0.017453);
v24 = 180.0;
if ( fabsf((*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 508))(*((_DWORD *)this + 112))) < 180.0 )
v24 = fabsf((*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 508))(*((_DWORD *)this + 112)));
cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0, 0xFFu, v32);
v25 = (float)(v24 * 0.017453) + (float)(v24 * 0.017453);
v26 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 584))(*((_DWORD *)this + 112)));
if ( v26 > 0.0 )
{
v27 = (cocos2d *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
v28 = (float)((float)-(float)(v25 * 0.5) - v23) + 3.14159265;
cocos2d::ccDrawCircleSegment(
v27,
(const cocos2d::CCPoint *)LODWORD(v26),
v28,
v25,
COERCE_FLOAT(36),
0,
1.0,
1.0,
v34);
}
cocos2d::ccDrawColor4B((cocos2d *)((char *)&dword_FC + 3), 0x96u, 0, (unsigned __int8)&dword_FC + 3, v33);
result = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 600))(*((_DWORD *)this + 112)));
v29 = (const cocos2d::CCPoint *)LODWORD(result);
if ( result > 0.0 )
{
v30 = (cocos2d *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 112) + 96))(*((_DWORD *)this + 112));
v31 = (float)((float)-(float)(v25 * 0.5) - v23) + 3.14159265;
return COERCE_FLOAT(cocos2d::ccDrawCircleSegment(v30, v29, v31, v25, COERCE_FLOAT(36), 0, 1.0, 1.0, v34));
}
}
return result;
}