//
// PlayLayer::addToGroupOld from 0x100084620 to 0x1000846ec (204 bytes)
//
// 0 xrefs:
//
// 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 12:20:03 +0000
//
__int64 __fastcall PlayLayer::addToGroupOld(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v3; // r15d
__int64 GroupID; // r12
__int64 Group; // r13
__int64 OptimizedGroup; // rax
__int64 v7; // r12
if ( *(__int16 *)(a2 + 1168) > 0 )
{
v3 = 0;
do
{
GroupID = (unsigned int)GameObject::getGroupID(a2, (unsigned int)v3);
Group = GJBaseGameLayer::getGroup(a1, GroupID);
if ( !(unsigned __int8)sub_1007FF080(Group, a2) )
sub_1007FEBF0(Group, a2);
if ( *(_DWORD *)(a2 + 920) == 7 )
OptimizedGroup = GJBaseGameLayer::getOptimizedGroup(a1, (unsigned int)GroupID);
else
OptimizedGroup = GJBaseGameLayer::getStaticGroup(a1, (unsigned int)GroupID);
v7 = OptimizedGroup;
if ( !(unsigned __int8)sub_1007FF080(OptimizedGroup, a2) )
sub_1007FEBF0(v7, a2);
++v3;
result = (unsigned int)*(__int16 *)(a2 + 1168);
}
while ( v3 < (int)result );
}
return result;
}