//
// cocos2d::CCTurnOffTiles::update from 0x18003cba0 to 0x18003cc8f (239 bytes)
//
// 3 xrefs:
// > ??> @ 0x1800ea660
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b10b0
//
// 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 __fastcall cocos2d::CCTurnOffTiles::update(cocos2d::CCTurnOffTiles *this, float a2)
{
int v2; // eax
__int64 v3; // rdi
unsigned int v5; // esi
cocos2d::CCTurnOffTiles *v6; // rcx
const struct cocos2d::_ccQuad3 *v7; // r8
struct cocos2d::CCPoint 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(
(float *)&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,
(float *)&v8);
v6 = this;
}
else
{
v7 = (const struct cocos2d::_ccQuad3 *)v9;
memset(v9, 0, sizeof(v9));
}
cocos2d::CCTiledGrid3DAction::setTile(v6, &v8, v7);
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < *((_DWORD *)this + 27) );
}
}