//
// cocos2d::CCLens3D::update from 0x5b4390 to 0x5b4526 (406 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void cocos2d::CCLens3D::update(cocos2d::CCLens3D *a1, float a2)
{
int i; // r9
int v4; // r6
float v5; // s20
float v6; // r0
float v7; // s15
float v8; // s15
float v9; // r0
float v10; // r0
float v11; // r0
float v12; // s16
float v13; // s21
int v14; // r2
bool v15; // r3
float v16; // s16
float v17; // r0
cocos2d::CCPoint v18; // [sp+0h] [bp-20h] BYREF
cocos2d::CCPoint v19; // [sp+8h] [bp-18h] BYREF
cocos2d::ccVertex3F v20; // [sp+10h] [bp-10h] BYREF
if ( BYTE1(a1[1].m_eObjType) )
{
for ( i = 0; ; ++i )
{
v4 = 0;
if ( (float)i >= (float)(*(float *)&a1[1].__vftable + 1.0) )
break;
while ( 1 )
{
v5 = (float)v4;
if ( (float)v4 >= (float)(*(float *)&a1[1].m_uID + 1.0) )
break;
cocos2d::CCPoint::CCPoint(&v19, (float)i, (float)v4);
cocos2d::CCGrid3DAction::originalVertex(&v20, a1, &v19);
cocos2d::CCPoint::CCPoint(&v19, v20.x, v20.y);
cocos2d::CCPoint::operator-(&v18, &a1[1].m_nLuaID, &v19);
v6 = cocos2d::ccpLength(&v18);
v7 = *(float *)&a1[1].m_uReference;
if ( v6 < v7 )
{
v8 = (float)(v7 - v6) / v7;
v9 = v8 == 0.0 ? 0.001 : v8;
v10 = logf(v9);
v11 = expf(v10 * *(float *)&a1[1].m_uAutoReleaseCount);
v12 = *(float *)&a1[1].m_uReference;
v13 = v11;
if ( cocos2d::ccpLength(&v18) > 0.0 )
{
cocos2d::ccpNormalize(&v19, &v18);
cocos2d::CCPoint::operator=((PlayerObject *)&v18, COERCE_FLOAT(&v19), v14, v15);
cocos2d::CCPoint::operator*(&v19, &v18, v13 * v12);
v16 = 1.0;
if ( LOBYTE(a1[1].m_eObjType) )
v16 = -1.0;
v17 = cocos2d::ccpLength(&v19);
v20.z = v20.z + (float)((float)(v16 * v17) * *(float *)&a1[1].m_uAutoReleaseCount);
}
}
++v4;
cocos2d::CCPoint::CCPoint(&v19, (float)i, v5);
cocos2d::CCGrid3DAction::setVertex(a1, &v19, &v20);
}
}
BYTE1(a1[1].m_eObjType) = 0;
}
}