//
// HardStreak::addPoint from 0x56a25c to 0x56a2f2 (150 bytes)
//
// 3 xrefs:
// > PlayerObject::placeStreakPoint @ 0x439352
// > HardStreak::createDuplicate @ 0x56a3cc
// > HardStreak::firstSetup @ 0x56aa5a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:30 +0000
//
int __fastcall HardStreak::addPoint(int a1, const cocos2d::CCPoint *a2)
{
cocos2d::CCArray *v4; // r4
int *v5; // r0
int result; // r0
int Object; // r0
_BYTE v8[8]; // [sp+4h] [bp-20h] BYREF
_BYTE v9[8]; // [sp+Ch] [bp-18h] BYREF
float v10; // [sp+14h] [bp-10h] BYREF
float v11; // [sp+18h] [bp-Ch]
if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 344))
|| (Object = cocos2d::CCArray::lastObject(*(cocos2d::CCArray **)(a1 + 344)),
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v8, (const cocos2d::CCPoint *)(Object + 52)),
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v9, a2),
result = cocos2d::CCPoint::operator-(&v10, v8, v9),
(float)((float)(v11 * v11) + (float)(v10 * v10)) >= 0.01) )
{
v4 = *(cocos2d::CCArray **)(a1 + 344);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, a2);
v5 = PointNode::create((const cocos2d::CCPoint *)&v10);
return cocos2d::CCArray::addObject(v4, (cocos2d::CCObject *)v5);
}
return result;
}