//
// cocos2d::CCLens3D::update from 0xd2d6e0 to 0xd2d8e4 (516 bytes)
//
// 2 xrefs:
// > ??> @ 0xc3ef8
// > ??> @ 0x1512938
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:07:18 +0000
//
__int64 __fastcall cocos2d::CCLens3D::update(cocos2d::CCLens3D *this, float a2)
{
float v3; // s8
float v4; // s9
int v5; // w25
float v6; // s0
int v7; // w23
float v8; // s8
float v9; // s12
float v10; // s0
float v11; // s1
float v12; // s0
float v13; // s2
long double v14; // q0
const cocos2d::CCPoint *v15; // x1
float v16; // s0
float v17; // s1
float v18; // s0
float v19; // s0
float v20; // s0
float v21; // s12
float v22; // s13
const cocos2d::CCPoint *v23; // x1
const cocos2d::CCPoint *v24; // x1
float v25; // s0
const cocos2d::CCPoint *v26; // x1
__int64 v28; // [xsp+88h] [xbp+88h] BYREF
__int64 v29; // [xsp+90h] [xbp+90h] BYREF
_DWORD v30[2]; // [xsp+98h] [xbp+98h] BYREF
float v31; // [xsp+A0h] [xbp+A0h]
if ( *((_BYTE *)this + 117) )
{
v3 = *((float *)this + 23);
if ( (float)(v3 + 1.0) > 0.0 )
{
v4 = 0.0;
v5 = 0;
v6 = *((float *)this + 24);
do
{
if ( (float)(v6 + 1.0) > 0.0 )
{
v7 = 0;
v8 = 0.0;
do
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, v4, v8);
cocos2d::CCGrid3DAction::originalVertex(this, (const cocos2d::CCPoint *)&v29);
*(float *)&v30[1] = v11;
*(float *)v30 = v12;
v31 = v13;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, v12, v11);
cocos2d::CCPoint::operator-(&v28, (char *)this + 100, &v29, v14);
cocos2d::ccpLength((cocos2d *)&v28, v15);
v17 = *((float *)this + 27);
if ( v16 < v17 )
{
v18 = (float)(v17 - v16) / v17;
if ( v18 == 0.0 )
v18 = 0.001;
v19 = logf(v18);
v20 = expf(v19 * *((float *)this + 28));
v21 = *((float *)this + 27);
v22 = v20;
cocos2d::ccpLength((cocos2d *)&v28, v23);
if ( v25 > 0.0 )
{
cocos2d::ccpNormalize(&v29, (cocos2d *)&v28, v24);
cocos2d::CCPoint::operator=(&v28, &v29);
cocos2d::CCPoint::operator*(&v28, v22 * v21);
if ( *((_BYTE *)this + 116) )
v9 = -1.0;
else
v9 = 1.0;
cocos2d::ccpLength((cocos2d *)&v29, v26);
v31 = v31 + (float)((float)(v10 * v9) * *((float *)this + 28));
}
}
++v7;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29, v4, v8);
cocos2d::CCGrid3DAction::setVertex((__int64)this, (__int64)&v29, (__int64)v30);
v6 = *((float *)this + 24);
v8 = (float)v7;
}
while ( (float)v7 < (float)(v6 + 1.0) );
v3 = *((float *)this + 23);
}
v4 = (float)++v5;
}
while ( (float)v5 < (float)(v3 + 1.0) );
}
*((_BYTE *)this + 117) = 0;
}
return _stack_chk_guard;
}