//
// GJBaseGameLayer::triggerTransformCommand from 0x14021f4c0 to 0x14021f74b (651 bytes)
//
// 2 xrefs:
// > TransformTriggerGameObject::triggerObject @ 0x1404bc199
// > ??> @ 0x1406cd47c
//
// 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::triggerTransformCommand(GJBaseGameLayer *a1, TransformTriggerGameObject *a2)
{
double m_objectScaleX; // xmm7_8
double m_objectScaleY; // xmm6_8
GameObject *MainObject; // rax
double v7; // xmm2_8
double v8; // xmm0_8
GJEffectManager *m_effectManager; // rdi
GroupCommandObject2 *Mylast; // rdx
int m_controlID; // esi
int m_uniqueID; // ebp
bool m_relativeRotation; // r14
float m_easingRate; // xmm8_4
EasingType m_easingType; // r15d
int m_centerGroupID; // r12d
int m_targetGroupID; // r13d
float m_duration; // xmm9_4
double m_property451; // xmm10_8
double m_property450; // xmm11_8
std::_Vector_val>::pointer v21; // rax
bool m_onlyMove; // [rsp+B0h] [rbp+8h]
m_objectScaleX = a2->m_objectScaleX;
m_objectScaleY = a2->m_objectScaleY;
if ( m_objectScaleX == 0.0 )
m_objectScaleX = 1.0;
if ( m_objectScaleY == 0.0 )
m_objectScaleY = 1.0;
if ( a2->m_divideX )
m_objectScaleX = 1.0 / m_objectScaleX;
if ( a2->m_divideY )
m_objectScaleY = 1.0 / m_objectScaleY;
if ( a2->m_relativeScale )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, a2->m_centerGroupID);
if ( MainObject )
{
v7 = (float)(MainObject->m_scaleX / MainObject->m_startScaleX);
v8 = (float)(MainObject->m_scaleY / MainObject->m_startScaleY);
if ( v7 != 0.0 )
m_objectScaleX = (m_objectScaleX - 1.0) / v7 + 1.0;
if ( v8 != 0.0 )
m_objectScaleY = (m_objectScaleY - 1.0) / v8 + 1.0;
}
}
m_effectManager = a1->m_effectManager;
Mylast = m_effectManager->m_unkVector560._Mypair._Myval2._Mylast;
m_controlID = a2->m_controlID;
m_uniqueID = a2->m_uniqueID;
m_relativeRotation = a2->m_relativeRotation;
m_easingRate = a2->m_easingRate;
m_easingType = a2->m_easingType;
m_centerGroupID = a2->m_centerGroupID;
m_targetGroupID = a2->m_targetGroupID;
m_duration = a2->m_duration;
m_onlyMove = a2->m_onlyMove;
m_property451 = a2->m_property451;
m_property450 = a2->m_property450;
if ( Mylast == m_effectManager->m_unkVector560._Mypair._Myval2._Myend )
{
sub_14026B310(&m_effectManager->m_unkVector560);
}
else
{
GroupCommandObject2::GroupCommandObject2(Mylast);
++m_effectManager->m_unkVector560._Mypair._Myval2._Mylast;
}
v21 = m_effectManager->m_unkVector560._Mypair._Myval2._Mylast;
v21[-1].m_onlyMove = m_onlyMove;
v21[-1].m_triggerUniqueID = m_uniqueID;
v21[-1].m_controlID = m_controlID;
v21[-1].m_actionValue1 = 1.0;
v21[-1].m_targetGroupID = m_targetGroupID;
v21[-1].m_centerGroupID = m_centerGroupID;
v21[-1].m_transformRelatedFalse = 0;
v21[-1].m_relativeRotation = m_relativeRotation;
v21[-1].m_targetScaleX = m_objectScaleX;
v21[-1].m_targetScaleY = m_objectScaleY;
v21[-1].m_transformTriggerProperty450 = m_property450;
v21[-1].m_transformTriggerProperty451 = m_property451;
v21[-1].m_duration = m_duration;
v21[-1].m_easingRate = m_easingRate;
v21[-1].m_commandType = 4;
v21[-1].m_easingType = m_easingType;
v21[-1].m_actionType1 = 4;
}