//
// GJBaseGameLayer::modifyObjectPhysics from 0x863938 to 0x863a58 (288 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::modifyGroupPhysics @ 0x863b40
// > ??> @ 0x428a0
//
// 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 GJBaseGameLayer::modifyObjectPhysics(GJBaseGameLayer *a1, AdvancedFollowEditObject *a2, GameObjectPhysics *a3)
{
float m_modX; // s11
float m_modXVariance; // s9
float v7; // s9
float m_modY; // s10
float m_modYVariance; // s8
float v10; // s0
float m_startSpeed; // s10
float m_startSpeedVariance; // s8
float v13; // s2
float v14; // s1
float m_startDirection; // s8
float m_startDirectionVariance; // s9
float v17; // s0
GJBaseGameLayer *v18; // [xsp+58h] [xbp+58h]
float v20; // [xsp+60h] [xbp+60h]
float v21; // [xsp+70h] [xbp+70h]
float v22; // [xsp+74h] [xbp+74h]
m_modX = a2->m_modX;
m_modXVariance = a2->m_modXVariance;
v7 = m_modX + (float)(m_modXVariance * GameToolbox::fast_rand_0_1());
m_modY = a2->m_modY;
m_modYVariance = a2->m_modYVariance;
v10 = m_modY + (float)(m_modYVariance * GameToolbox::fast_rand_0_1());
m_startSpeed = a2->m_startSpeed;
m_startSpeedVariance = a2->m_startSpeedVariance;
v13 = a3->m_unkPoint1.y * v10;
a3->m_unkPoint1.x = a3->m_unkPoint1.x * v7;
a3->m_unkPoint1.y = v13;
v14 = m_startSpeed + (float)(m_startSpeedVariance * GameToolbox::fast_rand_0_1());
if ( v14 != 0.0 )
{
m_startDirection = a2->m_startDirection;
v18 = a1;
m_startDirectionVariance = a2->m_startDirectionVariance;
v20 = v14;
v17 = GameToolbox::fast_rand_0_1();
GJBaseGameLayer::getFollowSpeedVal(
v18,
a3->m_gameObject,
a2->m_startSpeedReference,
a2->m_startDirectionReference,
m_startDirection + (float)(m_startDirectionVariance * v17),
v20);
if ( !a2->m_xOnly )
a3->m_unkPoint1.y = a3->m_unkPoint1.y + v22;
if ( !a2->m_yOnly )
a3->m_unkPoint1.x = a3->m_unkPoint1.x + v21;
}
}