//
// cocos2d::CCTurnOffTiles::create from 0x18003ae60 to 0x18003af58 (248 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b0e94
//
// 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
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCTurnOffTiles *__fastcall cocos2d::CCTurnOffTiles::create(
float a1,
struct cocos2d::CCSize *a2,
unsigned int a3)
{
void *v5; // rbx
bool (__fastcall *v6)(cocos2d::CCTurnOffTiles *__hidden, float, const struct cocos2d::CCSize *, unsigned int); // rdx
v5 = operator new(0x78u);
if ( v5 )
{
*(_OWORD *)v5 = 0;
*((_OWORD *)v5 + 1) = 0;
*((_OWORD *)v5 + 2) = 0;
*((_OWORD *)v5 + 3) = 0;
*((_OWORD *)v5 + 4) = 0;
*((_OWORD *)v5 + 5) = 0;
*((_OWORD *)v5 + 6) = 0;
*((_QWORD *)v5 + 14) = 0;
cocos2d::CCAction::CCAction((cocos2d::CCAction *)v5);
*((_DWORD *)v5 + 20) = 0;
*(_QWORD *)v5 = &cocos2d::CCGridAction::`vftable';
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v5 + 12);
*(_QWORD *)v5 = &cocos2d::CCTurnOffTiles::`vftable';
}
else
{
v5 = nullptr;
}
if ( !v5 )
return (struct cocos2d::CCTurnOffTiles *)v5;
v6 = *(bool (__fastcall **)(cocos2d::CCTurnOffTiles *__hidden, float, const struct cocos2d::CCSize *, unsigned int))(*(_QWORD *)v5 + 128LL);
if ( v6 == cocos2d::CCTurnOffTiles::initWithDuration )
{
if ( cocos2d::CCGridAction::initWithDuration((cocos2d::CCGridAction *)v5, a1, a2) )
{
*((_DWORD *)v5 + 26) = a3;
*((_QWORD *)v5 + 14) = 0;
LABEL_9:
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v5);
return (struct cocos2d::CCTurnOffTiles *)v5;
}
}
else if ( ((unsigned __int8 (__fastcall *)(void *, bool (__fastcall *)(cocos2d::CCTurnOffTiles *__hidden, float, const struct cocos2d::CCSize *, unsigned int), struct cocos2d::CCSize *, _QWORD))v6)(
v5,
v6,
a2,
a3) )
{
goto LABEL_9;
}
cocos2d::CCObject::release((cocos2d::CCObject *)v5);
return nullptr;
}