//
// GJBaseGameLayer::collisionCheckObjects from 0x100126910 to 0x100127b0f (4607 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x10012632a
// > GJBaseGameLayer::checkCollisions @ 0x1001264d0
//
// 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::collisionCheckObjects(
GJBaseGameLayer *a1,
PlayerObject *a2,
std::vector *a3,
int a4,
float a5)
{
PlayerObject *v7; // r15
__int64 v8; // rbx
double v9; // xmm0_8
double v10; // xmm0_8
double v11; // xmm0_8
double v12; // xmm0_8
__int64 v13; // rsi
__int64 v14; // rbx
GameObject *v15; // r13
GJBaseGameLayer *v16; // rdx
int m_solidCollisionObjectsCount; // r8d
int m_solidCollisionObjectsIndex; // r9d
std::__vector_base::pointer end; // r14
GameObject **value; // rax
__int64 v21; // r15
int m_hazardCollisionObjectsCount; // r8d
int m_hazardCollisionObjectsIndex; // r9d
std::__vector_base::pointer v24; // r14
GameObject **v25; // rax
__int64 v26; // r15
std::__vector_base::pointer begin; // rdi
signed __int64 v28; // r14
__int64 v29; // r15
__int64 v30; // rax
unsigned __int64 v31; // r12
GameObject **v32; // rax
std::__vector_base::pointer v33; // rdi
signed __int64 v34; // r14
__int64 v35; // r15
__int64 v36; // rax
unsigned __int64 v37; // r12
GameObject **v38; // rax
__int64 v39; // rsi
const cocos2d::CCPoint *v40; // r14
GameObject **v41; // r12
GameObject **v42; // r12
bool v43; // r14
OBB2D *v44; // r14
OBB2D *v45; // r15
__int64 v46; // rax
GJBaseGameLayer *v47; // rdi
int m_currentChannel; // eax
GJBaseGameLayer *v49; // r14
GJBaseGameLayer *v50; // rdi
GJGameEvent v51; // esi
char v52; // cl
GJBaseGameLayer *v53; // r14
GJBaseGameLayer *v54; // rdi
GJGameEvent v55; // esi
GJBaseGameLayer *v56; // r14
GJBaseGameLayer *v57; // r14
GJBaseGameLayer *v58; // rdi
PlayerObject *v59; // rsi
GameObject *v60; // rdx
int v61; // r8d
GJBaseGameLayer *v62; // r14
GJBaseGameLayer *v63; // r14
GJBaseGameLayer *v64; // r14
bool canBeActivatedByPlayer; // al
GJBaseGameLayer *v66; // r14
__int64 v67; // rax
double v68; // xmm0_8
double v69; // xmm0_8
double v70; // xmm0_8
GJBaseGameLayer *v71; // r14
GJBaseGameLayer *v72; // rdi
GJGameEvent v73; // esi
GJBaseGameLayer *v74; // r14
GJBaseGameLayer *v75; // r14
GJBaseGameLayer *v76; // r14
char v77; // al
GJBaseGameLayer *v78; // r14
GJBaseGameLayer *v79; // r14
char m_isHide; // al
GJBaseGameLayer *v81; // r14
GJBaseGameLayer *v82; // r14
GJBaseGameLayer *v83; // r14
__int64 v84; // rax
double v85; // xmm0_8
double v86; // xmm0_8
double v87; // xmm0_8
__int64 v89; // [rsp+10h] [rbp-B0h]
GameObject **v90; // [rsp+18h] [rbp-A8h]
GameObject **v91; // [rsp+18h] [rbp-A8h]
float __src; // [rsp+20h] [rbp-A0h]
PlayerObject *v93; // [rsp+28h] [rbp-98h]
std::vector __p; // [rsp+30h] [rbp-90h] BYREF
int v95; // [rsp+50h] [rbp-70h]
int v96; // [rsp+54h] [rbp-6Ch]
std::vector *v97; // [rsp+58h] [rbp-68h]
float v98; // [rsp+60h] [rbp-60h]
float v99; // [rsp+64h] [rbp-5Ch]
float v100; // [rsp+68h] [rbp-58h]
float v101; // [rsp+6Ch] [rbp-54h]
cocos2d::CCPoint *p_m_lastPortalPos; // [rsp+70h] [rbp-50h]
GJBaseGameLayer *v103; // [rsp+78h] [rbp-48h]
_BYTE v104[16]; // [rsp+80h] [rbp-40h] BYREF
__int64 v105; // [rsp+90h] [rbp-30h]
v7 = a2;
v103 = a1;
v8 = ((__int64 (__fastcall *)(PlayerObject *))a2->getObjectRect)(a2);
v9 = sub_10028D230();
v98 = *(float *)&v9;
v10 = sub_10028D270();
v99 = *(float *)&v10;
v11 = sub_10028D280();
v100 = *(float *)&v11;
v89 = v8;
v12 = sub_10028D2C0();
v101 = *(float *)&v12;
if ( a4 > 0 )
{
p_m_lastPortalPos = &a2->m_lastPortalPos;
v13 = (unsigned int)a4;
v14 = 0;
v93 = v7;
v105 = (unsigned int)a4;
while ( 1 )
{
v15 = a3->__begin_[v14];
if ( v15->m_objectType == Decoration || v15->m_isGroupDisabled || v15->m_isDisabled )
goto LABEL_5;
v16 = v103;
switch ( v15->m_objectType )
{
case Solid:
case Breakable:
m_solidCollisionObjectsCount = v103->m_solidCollisionObjectsCount;
m_solidCollisionObjectsIndex = v103->m_solidCollisionObjectsIndex;
if ( m_solidCollisionObjectsIndex > m_solidCollisionObjectsCount )
{
v103->m_solidCollisionObjects.__begin_[m_solidCollisionObjectsCount] = v15;
}
else
{
end = v103->m_solidCollisionObjects.__end_;
value = v103->m_solidCollisionObjects.__end_cap_.__value_;
if ( end >= value )
{
v97 = a3;
begin = v103->m_solidCollisionObjects.__begin_;
v28 = (char *)end - (char *)begin;
v29 = v28 >> 3;
if ( (unsigned __int64)((v28 >> 3) + 1) >> 61 )
goto LABEL_157;
v30 = (char *)value - (char *)begin;
v31 = v30 >> 2;
if ( v30 >> 2 <= (unsigned __int64)((v28 >> 3) + 1) )
v31 = (v28 >> 3) + 1;
if ( (unsigned __int64)v30 >= 0x7FFFFFFFFFFFFFF8LL )
v31 = 0x1FFFFFFFFFFFFFFFLL;
v95 = m_solidCollisionObjectsCount;
v96 = m_solidCollisionObjectsIndex;
if ( v31 )
{
if ( v31 > 0x1FFFFFFFFFFFFFFFLL )
goto LABEL_158;
v32 = (GameObject **)operator new(8 * v31);
}
else
{
v32 = nullptr;
}
v90 = &v32[v31];
v32[v29] = v15;
v21 = (__int64)&v32[v29 + 1];
v41 = v32;
memcpy(v32, begin, v28);
v16 = v103;
v103->m_solidCollisionObjects.__begin_ = v41;
v16->m_solidCollisionObjects.__end_ = (std::__vector_base::pointer)v21;
v16->m_solidCollisionObjects.__end_cap_.__value_ = v90;
if ( begin )
{
operator delete(begin);
v16 = v103;
m_solidCollisionObjectsCount = v103->m_solidCollisionObjectsCount;
m_solidCollisionObjectsIndex = v103->m_solidCollisionObjectsIndex;
a3 = v97;
v13 = v105;
}
else
{
a3 = v97;
v13 = v105;
m_solidCollisionObjectsCount = v95;
m_solidCollisionObjectsIndex = v96;
}
}
else
{
*end = v15;
v21 = (__int64)(end + 1);
}
v16->m_solidCollisionObjects.__end_ = (std::__vector_base::pointer)v21;
v16->m_solidCollisionObjectsIndex = m_solidCollisionObjectsIndex + 1;
v7 = v93;
}
v16->m_solidCollisionObjectsCount = m_solidCollisionObjectsCount + 1;
goto LABEL_5;
case Hazard:
case AnimatedHazard:
m_hazardCollisionObjectsCount = v103->m_hazardCollisionObjectsCount;
m_hazardCollisionObjectsIndex = v103->m_hazardCollisionObjectsIndex;
if ( m_hazardCollisionObjectsIndex <= m_hazardCollisionObjectsCount )
{
v24 = v103->m_hazardCollisionObjects.__end_;
v25 = v103->m_hazardCollisionObjects.__end_cap_.__value_;
if ( v24 >= v25 )
{
v97 = a3;
v33 = v103->m_hazardCollisionObjects.__begin_;
v34 = (char *)v24 - (char *)v33;
v35 = v34 >> 3;
if ( (unsigned __int64)((v34 >> 3) + 1) >> 61 )
LABEL_157:
sub_1000CACE0();
v36 = (char *)v25 - (char *)v33;
v37 = v36 >> 2;
if ( v36 >> 2 <= (unsigned __int64)((v34 >> 3) + 1) )
v37 = (v34 >> 3) + 1;
if ( (unsigned __int64)v36 >= 0x7FFFFFFFFFFFFFF8LL )
v37 = 0x1FFFFFFFFFFFFFFFLL;
v95 = m_hazardCollisionObjectsCount;
v96 = m_hazardCollisionObjectsIndex;
if ( v37 )
{
if ( v37 > 0x1FFFFFFFFFFFFFFFLL )
LABEL_158:
sub_100054850();
v38 = (GameObject **)operator new(8 * v37);
}
else
{
v38 = nullptr;
}
v91 = &v38[v37];
v38[v35] = v15;
v26 = (__int64)&v38[v35 + 1];
v42 = v38;
memcpy(v38, v33, v34);
v16 = v103;
v103->m_hazardCollisionObjects.__begin_ = v42;
v16->m_hazardCollisionObjects.__end_ = (std::__vector_base::pointer)v26;
v16->m_hazardCollisionObjects.__end_cap_.__value_ = v91;
if ( v33 )
{
operator delete(v33);
v16 = v103;
m_hazardCollisionObjectsCount = v103->m_hazardCollisionObjectsCount;
m_hazardCollisionObjectsIndex = v103->m_hazardCollisionObjectsIndex;
a3 = v97;
v13 = v105;
}
else
{
a3 = v97;
v13 = v105;
m_hazardCollisionObjectsCount = v95;
m_hazardCollisionObjectsIndex = v96;
}
}
else
{
*v24 = v15;
v26 = (__int64)(v24 + 1);
}
v16->m_hazardCollisionObjects.__end_ = (std::__vector_base::pointer)v26;
v16->m_hazardCollisionObjectsIndex = m_hazardCollisionObjectsIndex + 1;
v7 = v93;
}
else
{
v103->m_hazardCollisionObjects.__begin_[m_hazardCollisionObjectsCount] = v15;
}
v16->m_hazardCollisionObjectsCount = m_hazardCollisionObjectsCount + 1;
goto LABEL_5;
case CollisionObject:
goto LABEL_5;
default:
if ( ((unsigned __int8 (__fastcall *)(GameObject *, PlayerObject *))v15->hasBeenActivatedByPlayer)(
a3->__begin_[v14],
v7) )
{
goto LABEL_18;
}
sub_10028D130(v104, v7, v12);
if ( ((unsigned int (__fastcall *)(GameObject *))v15->getType)(v15) == 25 )
{
((void (__fastcall *)(std::vector *, GameObject *, float, float))v15->getObjectRect_0)(
&__p,
v15,
2.0,
2.0);
v7 = v93;
sub_10028D1A0(v104, &__p);
*(_QWORD *)&v12 = LODWORD(v15->m_objectRadius);
if ( *(float *)&v12 <= 0.0 )
goto LABEL_38;
}
else
{
v39 = ((__int64 (__fastcall *)(GameObject *))v15->getObjectRect)(v15);
sub_10028D1A0(v104, v39);
*(_QWORD *)&v12 = LODWORD(v15->m_objectRadius);
if ( *(float *)&v12 <= 0.0 )
{
LABEL_38:
v12 = sub_10028D270();
if ( *(float *)&v12 > v98 )
goto LABEL_18;
v12 = sub_10028D230();
if ( v99 > *(float *)&v12 )
goto LABEL_18;
v12 = sub_10028D2C0();
if ( *(float *)&v12 > v100 )
goto LABEL_18;
v12 = sub_10028D280();
if ( v101 > *(float *)&v12 )
goto LABEL_18;
goto LABEL_59;
}
}
if ( v103->m_levelSettings->m_fixRadiusCollision )
{
v40 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(PlayerObject *))v7->getPosition)(v7);
((void (__fastcall *)(std::vector *, GameObject *))v15->getRealPosition)(&__p, v15);
v7 = v93;
LODWORD(v97) = cocos2d::ccpDistance(v40, (const cocos2d::CCPoint *)&__p);
__src = GameObject::getObjectRadius(v15);
*(_QWORD *)&v12 = *(unsigned int *)(((__int64 (__fastcall *)(PlayerObject *))v7->getObjectRect)(v7) + 8);
*(float *)&v12 = (float)(*(float *)&v12 * 0.5) + __src;
if ( *(float *)&v12 < *(float *)&v97 )
goto LABEL_18;
}
else if ( !GJBaseGameLayer::objectIntersectsCircle((GJBaseGameLayer *)v104, v7, v15) )
{
goto LABEL_18;
}
LABEL_59:
v43 = 1;
if ( v15->m_shouldUseOuterOb )
{
if ( !v103->m_levelSettings->m_fixRadiusCollision || (v12 = 0.0, v15->m_objectRadius <= 0.0) )
{
v44 = (OBB2D *)((__int64 (__fastcall *)(GameObject *))v15->getOrientedBox)(v15);
((void (__fastcall *)(PlayerObject *))v7->updateOrientedBox)(v7);
v45 = (OBB2D *)((__int64 (__fastcall *)(PlayerObject *))v7->getOrientedBox)(v7);
v43 = OBB2D::overlaps1Way(v44) && OBB2D::overlaps1Way(v45);
v7 = v93;
}
}
if ( ((unsigned int (__fastcall *)(GameObject *))v15->getType)(v15) == 25 )
{
v46 = ((__int64 (__fastcall *)(GameObject *))v15->getObjectRect)(v15);
sub_10028D1A0(v104, v46);
}
if ( v43 )
{
v47 = v103;
m_currentChannel = v103->m_gameState.m_currentChannel;
if ( !m_currentChannel
|| v15->m_classType != Effect
|| LODWORD(v15[1].m_obRect.origin.x) == m_currentChannel
|| LODWORD(v15[1].m_obRect.origin.x) == 0 )
{
switch ( v15->m_objectType )
{
case InverseGravityPortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
break;
if ( !v7->m_isUpsideDown && !v15->m_hasNoEffects )
((void (__fastcall *)(GJBaseGameLayer *, __int64))v103->playGravityEffect)(v103, 1);
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
m_isHide = 1;
if ( !v15->m_hasNoEffects )
m_isHide = v15->m_isHide;
v81 = v103;
GJBaseGameLayer::flipGravity(v103, v7, 1, m_isHide);
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *, double))v15->activatedByPlayer)(v15, v7, v12);
v54 = v81;
v55 = PortalGravityFlip;
goto LABEL_138;
case NormalGravityPortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
break;
if ( v7->m_isUpsideDown && !v15->m_hasNoEffects )
((void (__fastcall *)(GJBaseGameLayer *, _QWORD))v103->playGravityEffect)(v103, 0);
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
v77 = 1;
if ( !v15->m_hasNoEffects )
v77 = v15->m_isHide;
v78 = v103;
GJBaseGameLayer::flipGravity(v103, v7, 0, v77);
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *, double))v15->activatedByPlayer)(v15, v7, v12);
v54 = v78;
v55 = PortalGravityNormal;
goto LABEL_138;
case ShipPortal:
v79 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
v58 = v79;
v59 = v7;
v60 = v15;
v61 = 5;
goto LABEL_142;
case CubePortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
PlayerObject::switchedToMode(v7, CubePortal);
PlayerObject::modeDidChange(v7);
goto LABEL_145;
case YellowJumpPad:
case PinkJumpPad:
case RedJumpPad:
case CustomRing|YellowJumpPad:
GJBaseGameLayer::bumpPlayer(v103, v7, (EffectGameObject *)v15);
break;
case YellowJumpPad|Hazard:
GJBaseGameLayer::gravBumpPlayer(v103, v7, (EffectGameObject *)v15);
break;
case YellowJumpRing:
case PinkJumpRing:
case GravityRing:
case GreenRing:
case DropRing:
case RedJumpRing:
case CustomRing:
case DashRing:
case GravityDashRing:
case GravityTogglePortal|0x1:
GJBaseGameLayer::playerTouchedRing(v103, v7, (RingObject *)v15);
break;
case InverseMirrorPortal:
if ( v103->m_isEditor )
break;
v82 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
sub_10028CC90();
v7->m_lastActivatedPortal = v15;
GJBaseGameLayer::toggleFlipped(v82, 1, v15->m_hasNoEffects);
GameObject::playShineEffect(v15);
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
v54 = v82;
v55 = PortalFlip;
goto LABEL_138;
case NormalMirrorPortal:
if ( v103->m_isEditor )
break;
v64 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
sub_10028CC90();
v7->m_lastActivatedPortal = v15;
GJBaseGameLayer::toggleFlipped(v64, 0, v15->m_hasNoEffects);
GameObject::playShineEffect(v15);
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
v54 = v64;
v55 = PortalUnFlip;
goto LABEL_138;
case BallPortal:
v71 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
GJBaseGameLayer::switchToRollMode(v71, v7, v15, 0);
goto LABEL_145;
case RegularSizePortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
break;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
PlayerObject::togglePlayerScale(v7, 0, v15->m_hasNoEffects);
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *, double))v15->activatedByPlayer)(v15, v7, v12);
v72 = v103;
v73 = PortalNormalScale;
goto LABEL_118;
case MiniSizePortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
break;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
PlayerObject::togglePlayerScale(v7, 1, v15->m_hasNoEffects);
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *, double))v15->activatedByPlayer)(v15, v7, v12);
v72 = v103;
v73 = PortalMiniScale;
LABEL_118:
GJBaseGameLayer::gameEventTriggered(v72, v73, 0, 0);
break;
case UfoPortal:
v83 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
v58 = v83;
v59 = v7;
v60 = v15;
v61 = 19;
goto LABEL_142;
case Modifier:
case EnterEffectObject:
GJBaseGameLayer::playerTouchedTrigger(v103, v7, (EffectGameObject *)v15);
break;
case SecretCoin:
if ( v103->m_isPracticeMode )
break;
v63 = v103;
((void (__fastcall *)(GameObject *, GJBaseGameLayer *, _QWORD, _QWORD))v15->triggerObject)(
v15,
v103,
(unsigned int)v7->m_uniqueID,
0);
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
GJBaseGameLayer::destroyObject(v63, v15);
if ( !GJBaseGameLayer::hasUniqueCoin(v63, (EffectGameObject *)v15) )
GJBaseGameLayer::pickupItem(v63, (EffectGameObject *)v15);
v54 = v63;
v55 = UserCoin;
goto LABEL_138;
case DualPortal:
v74 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
sub_10028CC90();
v7->m_lastActivatedPortal = v15;
v74->m_player2->m_isBeingSpawnedByDualPortal = 1;
GJBaseGameLayer::toggleDualMode(v74, v15, 1, v7, 0);
v74->m_player2->m_isBeingSpawnedByDualPortal = 0;
GameObject::playShineEffect(v15);
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
v54 = v74;
v55 = PortalDualOn;
goto LABEL_138;
case SoloPortal:
v75 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
sub_10028CC90();
v7->m_lastActivatedPortal = v15;
GJBaseGameLayer::toggleDualMode(v75, v15, 0, v7, 0);
GameObject::playShineEffect(v15);
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
v54 = v75;
v55 = PortalDualOff;
goto LABEL_138;
case Slope:
PlayerObject::collidedWithSlope(v7, a5, v15, 0);
goto LABEL_147;
case WavePortal:
if ( v103->m_isPlatformer )
break;
v76 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
v58 = v76;
v59 = v7;
v60 = v15;
v61 = 26;
goto LABEL_142;
case RobotPortal:
v56 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
GJBaseGameLayer::switchToRobotMode(v56, v7, v15, 0);
goto LABEL_145;
case TeleportPortal:
canBeActivatedByPlayer = GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15);
v13 = v105;
if ( canBeActivatedByPlayer )
{
v66 = v103;
GJBaseGameLayer::gameEventTriggered(v103, PortalTeleport, 0, 0);
GJBaseGameLayer::teleportPlayer(v66, (TeleportPortalObject *)v15, v7);
v67 = ((__int64 (__fastcall *)(PlayerObject *))v7->getObjectRect)(v7);
sub_10028D1A0(v89, v67);
v68 = sub_10028D230();
v98 = *(float *)&v68;
v69 = sub_10028D270();
v99 = *(float *)&v69;
v70 = sub_10028D280();
v100 = *(float *)&v70;
v12 = sub_10028D2C0();
v13 = v105;
v101 = *(float *)&v12;
}
goto LABEL_5;
case Collectible:
v49 = v103;
if ( GJEffectManager::hasBeenTriggered(v103->m_effectManager, v15->m_uniqueID, 0) )
goto LABEL_154;
GJEffectManager::storeTriggeredID(v49->m_effectManager, v15->m_uniqueID, 0);
if ( v15->m_objectID == 1268 )
{
memset(&__p, 0, sizeof(__p));
SpawnTriggerGameObject::updateRemapKeys((SpawnTriggerGameObject *)v15, &__p);
if ( __p.__begin_ )
{
__p.__end_ = __p.__begin_;
operator delete(__p.__begin_);
}
}
v49 = v103;
((void (__fastcall *)(GameObject *, GJBaseGameLayer *, _QWORD, _QWORD))v15->triggerObject)(
v15,
v103,
(unsigned int)v7->m_uniqueID,
0);
v50 = v49;
v51 = PickupItem;
goto LABEL_153;
case Collectible|0x1:
if ( v103->m_isPracticeMode )
break;
v49 = v103;
if ( GJEffectManager::hasBeenTriggered(v103->m_effectManager, v15->m_uniqueID, 0) )
goto LABEL_154;
GJEffectManager::storeTriggeredID(v49->m_effectManager, v15->m_uniqueID, 0);
((void (__fastcall *)(GameObject *, GJBaseGameLayer *, _QWORD, _QWORD))v15->triggerObject)(
v15,
v49,
(unsigned int)v7->m_uniqueID,
0);
if ( !GJBaseGameLayer::hasUniqueCoin(v49, (EffectGameObject *)v15) )
GJBaseGameLayer::pickupItem(v49, (EffectGameObject *)v15);
v50 = v49;
v51 = UserCoin;
LABEL_153:
GJBaseGameLayer::gameEventTriggered(v50, v51, 0, 0);
LABEL_154:
v12 = 0.0;
((void (__fastcall *)(GameObject *, double))v15->triggerActivated)(v15, 0.0);
GJBaseGameLayer::destroyObject(v49, v15);
goto LABEL_155;
case SpiderPortal:
v62 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
GJBaseGameLayer::switchToSpiderMode(v62, v7, v15, 0);
goto LABEL_145;
case DropRing|YellowJumpPad:
PlayerObject::touchedObject(v7, v15);
break;
case SwingPortal:
if ( v103->m_isPlatformer )
break;
v57 = v103;
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
goto LABEL_155;
GJBaseGameLayer::playerWillSwitchMode(v47, v7, v15);
v58 = v57;
v59 = v7;
v60 = v15;
v61 = 41;
LABEL_142:
GJBaseGameLayer::switchToFlyMode(v58, v59, v60, 0, v61);
LABEL_145:
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *))v15->activatedByPlayer)(v15, v7);
goto LABEL_155;
case GravityTogglePortal:
if ( !GJBaseGameLayer::canBeActivatedByPlayer(v103, v7, (EffectGameObject *)v15) )
break;
if ( !v15->m_hasNoEffects )
((void (__fastcall *)(GJBaseGameLayer *, bool))v103->playGravityEffect)(v103, !v7->m_isUpsideDown);
((void (__fastcall *)(GameObject *))v15->getPosition)(v15);
sub_10028CC60(&__p);
v12 = sub_10028CC90();
v7->m_lastActivatedPortal = v15;
v52 = 1;
if ( !v15->m_hasNoEffects )
v52 = v15->m_isHide;
v53 = v103;
GJBaseGameLayer::flipGravity(v103, v7, !v7->m_isUpsideDown, v52);
GameObject::playShineEffect(v15);
((void (__fastcall *)(GameObject *, PlayerObject *, double))v15->activatedByPlayer)(v15, v7, v12);
v54 = v53;
v55 = PortalGravityInvert;
LABEL_138:
GJBaseGameLayer::gameEventTriggered(v54, v55, 0, 0);
goto LABEL_155;
case GravityTogglePortal|NormalGravityPortal:
GJBaseGameLayer::playerTouchedRing(v103, v7, (RingObject *)v15);
LABEL_147:
v84 = ((__int64 (__fastcall *)(PlayerObject *))v7->getObjectRect)(v7);
sub_10028D1A0(v89, v84);
v85 = sub_10028D230();
v98 = *(float *)&v85;
v86 = sub_10028D270();
v99 = *(float *)&v86;
v87 = sub_10028D280();
v100 = *(float *)&v87;
v12 = sub_10028D2C0();
v101 = *(float *)&v12;
break;
default:
break;
}
}
LABEL_18:
v13 = v105;
goto LABEL_5;
}
LABEL_155:
v13 = v105;
LABEL_5:
if ( v13 == ++v14 )
return;
break;
}
}
}
}