//
// cocos2d::CCTurnOffTiles::update from 0x18003d2c0 to 0x18003d3af (239 bytes)
//
// 3 xrefs:
// > ??> @ 0x1800f06c0
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bb1d0
//
// This function is hookable on this platform (idp: pc, 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 11:21:37 +0000
//
void __fastcall cocos2d::CCTurnOffTiles::update(cocos2d::CCTurnOffTiles *this, float a2)
{
int v2; // eax
__int64 v3; // rdi
unsigned int v5; // esi
cocos2d::CCTiledGrid3DAction *v6; // rcx
const struct cocos2d::_ccQuad3 *v7; // r8
float v8; // [rsp+20h] [rbp-48h] BYREF
_OWORD v9[3]; // [rsp+28h] [rbp-40h] BYREF
v2 = *((_DWORD *)this + 27);
v3 = 0;
v5 = (int)(float)((float)v2 * a2);
if ( v2 )
{
do
{
kmVec2Fill(
&v8,
(float)(int)(float)((float)*(int *)(*((_QWORD *)this + 14) + 4 * v3) / *((float *)this + 25)),
(float)(int)(*(_DWORD *)(*((_QWORD *)this + 14) + 4 * v3) % (unsigned int)(int)*((float *)this + 25)));
v6 = this;
if ( (unsigned int)v3 >= v5 )
{
v7 = (const struct cocos2d::_ccQuad3 *)cocos2d::CCTiledGrid3DAction::originalTile((__int64)this, v9, &v8);
v6 = this;
}
else
{
v7 = (const struct cocos2d::_ccQuad3 *)v9;
memset(v9, 0, sizeof(v9));
}
cocos2d::CCTiledGrid3DAction::setTile(v6, (const struct cocos2d::CCPoint *)&v8, v7);
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < *((_DWORD *)this + 27) );
}
}