//
// GJBaseGameLayer::switchToRobotMode from 0x100124520 to 0x1001245c8 (168 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001271a3
// > PlayerObject::loadFromCheckpoint @ 0x10041d03b
//
// 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 GJBaseGameLayer::switchToRobotMode(
GJBaseGameLayer *a1,
PlayerObject *a2,
GameObject *m_lastActivatedPortal2,
bool a4)
{
bool m_hasNoEffects; // al
_BYTE v6[40]; // [rsp+8h] [rbp-28h] BYREF
PlayerObject::switchedToMode(a2, RobotPortal);
if ( m_lastActivatedPortal2 )
{
((void (__fastcall *)(GameObject *))m_lastActivatedPortal2->getPosition)(m_lastActivatedPortal2);
sub_10028CC60(v6);
sub_10028CC90();
a2->m_lastActivatedPortal = m_lastActivatedPortal2;
}
if ( a1->m_gameState.m_isDualMode && a1->m_gameState.m_lastActivatedPortal2 )
m_lastActivatedPortal2 = a1->m_gameState.m_lastActivatedPortal2;
if ( m_lastActivatedPortal2 )
{
a1->m_gameState.m_lastActivatedPortal1 = m_lastActivatedPortal2;
m_hasNoEffects = m_lastActivatedPortal2->m_hasNoEffects;
}
else
{
m_hasNoEffects = 0;
}
PlayerObject::toggleRobotMode(a2, 1, m_hasNoEffects);
}