//
// cocos2d::CCGridAction::startWithTarget from 0x10020a080 to 0x10020a13c (188 bytes)
//
// 25 xrefs:
// > cocos2d::CCShuffleTiles::startWithTarget @ 0x1007b5ea4
// > cocos2d::CCTurnOffTiles::startWithTarget @ 0x1007b7131
// > cocos2d::CCSplitRows::startWithTarget @ 0x1007b7d7e
// > cocos2d::CCSplitCols::startWithTarget @ 0x1007b812e
// > ??> @ 0x1008dc368
// > ??> @ 0x1008dc418
// > ??> @ 0x1008dc4c8
// > ??> @ 0x1008f0a60
// > ??> @ 0x1008f0b10
// > ??> @ 0x1008f0bd0
// > ??> @ 0x1008f0c90
// > ??> @ 0x1008f0d40
// > ??> @ 0x1008f0df0
// > ??> @ 0x1008f0ea0
// > ??> @ 0x1008f0f50
// > ??> @ 0x1008f1000
// > ??> @ 0x100910620
// > ??> @ 0x100993668
// > ??> @ 0x100993720
// > ??> @ 0x1009937f0
// > ??> @ 0x1009938b0
// > ??> @ 0x100993970
// > ??> @ 0x100993a30
// > ??> @ 0x100993b08
// > ??> @ 0x100993bc0
//
// 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::CCGridAction::startWithTarget(cocos2d::CCGridAction *a1, cocos2d::CCNode *a2)
{
__int64 v2; // r15
cocos2d::CCNode *m_pTarget; // r14
cocos2d::CCGridBase *v4; // rax
bool m_bActive; // cl
cocos2d::CCGridBase *v6; // rax
cocos2d::CCActionInterval::startWithTarget(a1, a2);
v2 = ((__int64 (__fastcall *)(cocos2d::CCGridAction *))a1->getGrid)(a1);
m_pTarget = a1->m_pTarget;
v4 = (cocos2d::CCGridBase *)((__int64 (__fastcall *)(cocos2d::CCNode *))m_pTarget->getGrid)(m_pTarget);
if ( !v4 )
{
LABEL_10:
((void (__fastcall *)(cocos2d::CCNode *, __int64))m_pTarget->setGrid)(m_pTarget, v2);
v6 = (cocos2d::CCGridBase *)((__int64 (__fastcall *)(cocos2d::CCNode *))m_pTarget->getGrid)(m_pTarget);
cocos2d::CCGridBase::setActive(v6, 1);
return;
}
m_bActive = v4->m_bActive;
if ( v4->m_nReuseGrid <= 0 )
{
if ( m_bActive )
cocos2d::CCGridBase::setActive(v4, 0);
goto LABEL_10;
}
if ( m_bActive
&& v4->m_sGridSize.width == *((float *)&a1->m_bFirstTick + 1)
&& v4->m_sGridSize.height == *(float *)&a1[1].__vftable )
{
((void (__fastcall *)(cocos2d::CCGridBase *))v4->reuse)(v4);
}
}