//
// GJBaseGameLayer::collisionCheckObjects from 0x14031bce0 to 0x14031d460 (6016 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x14031b772
// > GJBaseGameLayer::checkCollisions @ 0x14031b7e4
// > ??> @ 0x14091ec14
//
// 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 11:30:21 +0000
//
// Hidden C++ exception states: #wind=4
void __fastcall GJBaseGameLayer::collisionCheckObjects(__int64 a1, __int64 a2, _QWORD *a3, int a4)
{
__int64 v4; // rbx
_QWORD *v5; // rdi
cocos2d::CCRect *v8; // r13
float MaxX; // xmm7_4
float MinX; // xmm8_4
float MaxY; // xmm9_4
float MinY; // xmm10_4
__int64 v13; // r12
__int64 v14; // rdi
int v15; // eax
bool v16; // zf
__int64 v17; // rax
__int64 v18; // rax
bool v19; // bl
float *v20; // rbx
float *v21; // rax
__int64 v22; // r8
__int64 v23; // rdx
__int64 v24; // rax
int v25; // ecx
int v26; // eax
__int64 v27; // rdx
const struct cocos2d::CCPoint *v28; // rax
__int64 v29; // rax
const struct cocos2d::CCPoint *v30; // rax
__int64 v31; // rax
__int64 v32; // rdx
const struct cocos2d::CCPoint *v33; // rax
__int64 v34; // rax
const struct cocos2d::CCPoint *v35; // rax
__int64 v36; // rax
__int64 v37; // rbx
const struct cocos2d::CCPoint *v38; // rax
__int64 v39; // rax
__int64 v40; // rdx
__int64 v41; // r8
__int64 v42; // rdx
__int64 v43; // rbx
const struct cocos2d::CCPoint *v44; // rax
__int64 v45; // rax
__int64 v46; // rdx
__int64 v47; // r8
__int64 v48; // rdx
__int64 v49; // rbx
const struct cocos2d::CCPoint *v50; // rax
__int64 v51; // rax
__int64 v52; // rdx
__int64 v53; // r8
__int64 v54; // rdx
__int64 v55; // rbx
const struct cocos2d::CCPoint *v56; // rax
__int64 v57; // rax
__int64 v58; // rdx
__int64 v59; // r8
__int64 v60; // rbx
const struct cocos2d::CCPoint *v61; // rax
__int64 v62; // rax
__int64 v63; // rdx
__int64 v64; // r8
__int64 v65; // rdx
__int64 v66; // rbx
const struct cocos2d::CCPoint *v67; // rax
__int64 v68; // rax
__int64 v69; // rdx
__int64 v70; // r8
__int64 v71; // rbx
const struct cocos2d::CCPoint *v72; // rax
__int64 v73; // rax
__int64 v74; // rdx
__int64 v75; // r8
const struct cocos2d::CCPoint *v76; // rax
__int64 v77; // rax
const struct cocos2d::CCPoint *v78; // rax
__int64 v79; // rax
__int64 v80; // rdx
const struct cocos2d::CCPoint *v81; // rax
__int64 v82; // rax
const struct cocos2d::CCPoint *v83; // rax
__int64 v84; // rax
__int64 v85; // rdx
const struct cocos2d::CCPoint *v86; // rax
__int64 v87; // rax
const struct cocos2d::CCPoint *v88; // rax
__int64 v89; // rax
int v90; // r8d
char isFacingLeft; // al
unsigned __int8 v92; // r15
__int64 v93; // rax
__int64 v94; // rbx
__int64 v95; // rax
__int64 v96; // rdx
int v97; // ecx
int v98; // ecx
int v99; // ecx
float v100; // xmm1_4
float v101; // xmm0_4
int v102; // r8d
__int64 v103; // r10
__int64 *v104; // r9
__int64 *v105; // rcx
char v106; // dl
__int64 *v107; // rax
__int64 v108; // rdx
signed int v109; // r8d
__int64 v110; // r10
__int64 *v111; // r9
__int64 *v112; // rcx
char v113; // dl
__int64 *v114; // rax
void *v115; // rcx
int v116; // eax
int v117; // edx
__int64 v118; // rax
__int64 v119; // rcx
__int64 v120; // rcx
_BYTE v121[16]; // [rsp+48h] [rbp-C0h] BYREF
__int64 v122; // [rsp+58h] [rbp-B0h] BYREF
__int64 v123; // [rsp+60h] [rbp-A8h] BYREF
char v124[8]; // [rsp+68h] [rbp-A0h] BYREF
char v125[8]; // [rsp+70h] [rbp-98h] BYREF
char v126[8]; // [rsp+78h] [rbp-90h] BYREF
char v127[8]; // [rsp+80h] [rbp-88h] BYREF
__int64 v128; // [rsp+88h] [rbp-80h]
__int128 v129; // [rsp+90h] [rbp-78h] BYREF
__int64 v130; // [rsp+A0h] [rbp-68h]
char v131[8]; // [rsp+A8h] [rbp-60h] BYREF
char v132[8]; // [rsp+B0h] [rbp-58h] BYREF
char v133[8]; // [rsp+B8h] [rbp-50h] BYREF
char v134[8]; // [rsp+C0h] [rbp-48h] BYREF
char v135[8]; // [rsp+C8h] [rbp-40h] BYREF
char v136[8]; // [rsp+D0h] [rbp-38h] BYREF
char v137[8]; // [rsp+D8h] [rbp-30h] BYREF
char v138[8]; // [rsp+E0h] [rbp-28h] BYREF
char v139[8]; // [rsp+E8h] [rbp-20h] BYREF
char v140[8]; // [rsp+F0h] [rbp-18h] BYREF
char v141[8]; // [rsp+F8h] [rbp-10h] BYREF
char v142[8]; // [rsp+100h] [rbp-8h] BYREF
char v143[8]; // [rsp+108h] [rbp+0h] BYREF
char v144[8]; // [rsp+110h] [rbp+8h] BYREF
char v145[8]; // [rsp+118h] [rbp+10h] BYREF
char v146[8]; // [rsp+120h] [rbp+18h] BYREF
char v147[8]; // [rsp+128h] [rbp+20h] BYREF
char v148[8]; // [rsp+130h] [rbp+28h] BYREF
char v149[16]; // [rsp+138h] [rbp+30h] BYREF
char v150[16]; // [rsp+148h] [rbp+40h] BYREF
char v151[16]; // [rsp+158h] [rbp+50h] BYREF
char v152[112]; // [rsp+168h] [rbp+60h] BYREF
int v153; // [rsp+220h] [rbp+118h] BYREF
int v154; // [rsp+224h] [rbp+11Ch]
_QWORD *v155; // [rsp+228h] [rbp+120h]
int v156; // [rsp+230h] [rbp+128h] BYREF
v155 = a3;
v4 = a4;
v5 = a3;
v8 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2);
MaxX = cocos2d::CCRect::getMaxX(v8);
MinX = cocos2d::CCRect::getMinX(v8);
MaxY = cocos2d::CCRect::getMaxY(v8);
MinY = cocos2d::CCRect::getMinY(v8);
if ( (int)v4 > 0 )
{
v128 = v4;
v13 = 0;
while ( 1 )
{
v14 = *(_QWORD *)(*v5 + 8 * v13);
v123 = v14;
v15 = *(_DWORD *)(v14 + 928);
if ( v15 == 7 || *(_BYTE *)(v14 + 654) || *(_BYTE *)(v14 + 978) )
goto LABEL_143;
switch ( v15 )
{
case 0:
goto LABEL_220;
case 2:
goto LABEL_216;
case 21:
LABEL_220:
v120 = *(int *)(a1 + 12932);
if ( *(_DWORD *)(a1 + 12936) > (int)v120 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 12944) + 8 * v120) = v14;
}
else
{
sub_1400BD3C0((const void **)(a1 + 12944), &v123);
++*(_DWORD *)(a1 + 12936);
}
++*(_DWORD *)(a1 + 12932);
break;
case 39:
break;
case 47:
LABEL_216:
v119 = *(int *)(a1 + 12968);
if ( *(_DWORD *)(a1 + 12972) > (int)v119 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 12976) + 8 * v119) = v14;
}
else
{
sub_1400BD3C0((const void **)(a1 + 12976), &v123);
++*(_DWORD *)(a1 + 12972);
}
++*(_DWORD *)(a1 + 12968);
break;
default:
if ( (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1392LL))(v14, a2) )
break;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v121);
v16 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v14 + 1648LL))(v14) == 25;
v17 = *(_QWORD *)v14;
if ( v16 )
v18 = (*(__int64 (__fastcall **)(__int64, char *))(v17 + 1176))(v14, v149);
else
v18 = (*(__int64 (__fastcall **)(__int64))(v17 + 1184))(v14);
cocos2d::CCRect::operator=(v121, v18);
if ( *(float *)(v14 + 908) <= 0.0 )
{
if ( cocos2d::CCRect::getMinX((cocos2d::CCRect *)v121) > MaxX
|| MinX > cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v121)
|| cocos2d::CCRect::getMinY((cocos2d::CCRect *)v121) > MaxY
|| MinY > cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v121) )
{
break;
}
}
else if ( !GJBaseGameLayer::playerCircleCollision(a1, a2, (float *)v14) )
{
break;
}
v19 = 1;
if ( *(_BYTE *)(v14 + 744) && (!*(_BYTE *)(*(_QWORD *)(a1 + 3528) + 463LL) || *(float *)(v14 + 908) <= 0.0) )
{
v20 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 1408LL))(v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 1416LL))(a2);
v21 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1408LL))(a2);
v19 = OBB2D::overlaps1Way((__int64)v20, v21) && OBB2D::overlaps1Way(v22, v20);
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v14 + 1648LL))(v14) == 25 )
{
v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 1184LL))(v14);
cocos2d::CCRect::operator=(v121, v24);
}
if ( v19 )
{
v25 = *(_DWORD *)(a1 + 828);
if ( !v25 || *(_DWORD *)(v14 + 1256) != 1 || (v26 = *(_DWORD *)(v14 + 1792)) == 0 || v26 == v25 )
{
switch ( *(_DWORD *)(v14 + 928) )
{
case 3:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
if ( !*(_BYTE *)(a2 + 2503) && !*(_BYTE *)(v14 + 1052) )
{
LOBYTE(v27) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1328LL))(a1, v27);
}
v28 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v131, v28);
cocos2d::CCPoint::operator=(a2 + 2568, v29);
*(_QWORD *)(a2 + 2696) = v14;
GJBaseGameLayer::flipGravity(a1, a2, 1u);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
GJBaseGameLayer::gameEventTriggered(a1, 50, 0, 0);
}
goto LABEL_143;
case 4:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
if ( *(_BYTE *)(a2 + 2503) && !*(_BYTE *)(v14 + 1052) )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1328LL))(a1, 0);
v30 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v132, v30);
cocos2d::CCPoint::operator=(a2 + 2568, v31);
*(_QWORD *)(a2 + 2696) = v14;
GJBaseGameLayer::flipGravity(a1, a2, 0);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
GJBaseGameLayer::gameEventTriggered(a1, 51, 0, 0);
}
goto LABEL_143;
case 5:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::switchedToMode(a2, 5);
v37 = v14;
v38 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v135, v38);
cocos2d::CCPoint::operator=(a2 + 2568, v39);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v37 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_61;
}
*(_QWORD *)(a1 + 1024) = v37;
if ( *(_BYTE *)(v37 + 1052) )
{
LOBYTE(v41) = 1;
LABEL_62:
LOBYTE(v40) = 1;
PlayerObject::toggleFlyMode(a2, v40, v41);
LOBYTE(v42) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1136LL))(a1, v42);
goto LABEL_53;
}
LABEL_61:
v41 = 0;
goto LABEL_62;
case 6:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
v35 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v134, v35);
cocos2d::CCPoint::operator=(a2 + 2568, v36);
*(_QWORD *)(a2 + 2696) = v14;
PlayerObject::toggleFlyMode(a2, 0, 0);
PlayerObject::toggleBirdMode(a2, 0, 0);
PlayerObject::toggleRollMode(a2, 0, 0);
PlayerObject::toggleDartMode(a2, 0, 0);
PlayerObject::toggleRobotMode(a2, 0, 0);
PlayerObject::toggleSpiderMode(a2, 0, 0);
PlayerObject::toggleSwingMode(a2, 0, 0);
PlayerObject::updatePlayerArt(a2);
PlayerObject::updateDashArt(a2);
goto LABEL_53;
case 8:
case 9:
case 0x22:
case 0x2C:
GJBaseGameLayer::bumpPlayer(a1, a2, v14);
goto LABEL_143;
case 0xA:
if ( *(_BYTE *)(a2 + 2507) )
isFacingLeft = GameObject::isFacingLeft(v14);
else
isFacingLeft = GameObject::isFacingDown(v14);
v92 = isFacingLeft ^ 1;
if ( *(_BYTE *)(a2 + 2503) != ((unsigned __int8)isFacingLeft ^ 1)
&& (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
if ( *(_BYTE *)(v14 + 1796) )
PlayerObject::reversePlayer(a2, v14);
if ( !*(_BYTE *)(v14 + 1052) )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1328LL))(a1, v92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v148, 0.0, -10.0);
v94 = v93;
v95 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::operator+(v95, v124, v94);
cocos2d::CCPoint::operator=(a2 + 2568, v124);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
*(_QWORD *)(a2 + 2696) = v14;
PlayerObject::propellPlayer(a2, v96, *(unsigned __int8 *)(v14 + 1052), 10);
GJBaseGameLayer::flipGravity(a1, a2, v92);
*(_BYTE *)(a2 + 2024) = 1;
GJBaseGameLayer::gameEventTriggered(a1, 48, 0, 0);
}
goto LABEL_143;
case 0xB:
case 0xC:
case 0xD:
case 0x1D:
case 0x20:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x2B:
GJBaseGameLayer::playerTouchedRing(a1, a2, v14);
goto LABEL_143;
case 0xE:
if ( !*(_BYTE *)(a1 + 12668) && (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v83 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v145, v83);
cocos2d::CCPoint::operator=(a2 + 2568, v84);
*(_QWORD *)(a2 + 2696) = v14;
LOBYTE(v85) = 1;
GJBaseGameLayer::toggleFlipped(a1, v85);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::gameEventTriggered(a1, 53, 0, 0);
}
goto LABEL_143;
case 0xF:
if ( !*(_BYTE *)(a1 + 12668) && (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v81 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v144, v81);
cocos2d::CCPoint::operator=(a2 + 2568, v82);
*(_QWORD *)(a2 + 2696) = v14;
GJBaseGameLayer::toggleFlipped(a1, 0);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::gameEventTriggered(a1, 54, 0, 0);
}
goto LABEL_143;
case 0x10:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::toggleFlyMode(a2, 0, 0);
PlayerObject::toggleBirdMode(a2, 0, 0);
PlayerObject::toggleDartMode(a2, 0, 0);
PlayerObject::toggleRobotMode(a2, 0, 0);
PlayerObject::toggleSpiderMode(a2, 0, 0);
PlayerObject::toggleSwingMode(a2, 0, 0);
v55 = v14;
v56 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, v56);
cocos2d::CCPoint::operator=(a2 + 2568, v57);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v55 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_89;
}
*(_QWORD *)(a1 + 1024) = v55;
if ( *(_BYTE *)(v55 + 1052) )
{
LOBYTE(v59) = 1;
PlayerObject::toggleRollMode(a2, 1, v59);
goto LABEL_53;
}
LABEL_89:
LOBYTE(v58) = 1;
PlayerObject::toggleRollMode(a2, v58, 0);
goto LABEL_53;
case 0x11:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v76 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v142, v76);
cocos2d::CCPoint::operator=(a2 + 2568, v77);
*(_QWORD *)(a2 + 2696) = v14;
PlayerObject::togglePlayerScale(a2, 0, *(unsigned __int8 *)(v14 + 1052));
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
GJBaseGameLayer::gameEventTriggered(a1, 55, 0, 0);
}
goto LABEL_143;
case 0x12:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v78 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v143, v78);
cocos2d::CCPoint::operator=(a2 + 2568, v79);
*(_QWORD *)(a2 + 2696) = v14;
LOBYTE(v80) = 1;
PlayerObject::togglePlayerScale(a2, v80, *(unsigned __int8 *)(v14 + 1052));
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
GJBaseGameLayer::gameEventTriggered(a1, 56, 0, 0);
}
goto LABEL_143;
case 0x13:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::switchedToMode(a2, 19);
v43 = v14;
v44 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v136, v44);
cocos2d::CCPoint::operator=(a2 + 2568, v45);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v43 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_70;
}
*(_QWORD *)(a1 + 1024) = v43;
if ( *(_BYTE *)(v43 + 1052) )
{
LOBYTE(v47) = 1;
goto LABEL_71;
}
LABEL_70:
v47 = 0;
LABEL_71:
LOBYTE(v46) = 1;
PlayerObject::toggleBirdMode(a2, v46, v47);
LOBYTE(v48) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1136LL))(a1, v48);
goto LABEL_53;
case 0x14:
case 0x2D:
GJBaseGameLayer::playerTouchedTrigger(a1, a2, v14);
goto LABEL_143;
case 0x16:
if ( !*(_BYTE *)(a1 + 13024) )
{
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(*(_QWORD *)v14 + 1144LL))(
v14,
a1,
*(unsigned int *)(a2 + 924),
0);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::destroyObject(a1, v14);
GJBaseGameLayer::logPickupItem(a1, v14);
if ( !(unsigned __int8)GJBaseGameLayer::hasUniqueCoin(a1, v14) )
GJBaseGameLayer::pickupItem(a1, v14);
GJBaseGameLayer::gameEventTriggered(a1, 62, 0, 0);
}
goto LABEL_143;
case 0x17:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v88 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v147, v88);
cocos2d::CCPoint::operator=(a2 + 2568, v89);
*(_QWORD *)(a2 + 2696) = v14;
*(_BYTE *)(*(_QWORD *)(a1 + 3520) + 2736LL) = 1;
LOBYTE(v90) = 1;
GJBaseGameLayer::toggleDualMode(a1, v14, v90, a2, 0);
*(_BYTE *)(*(_QWORD *)(a1 + 3520) + 2736LL) = 0;
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::gameEventTriggered(a1, 57, 0, 0);
}
goto LABEL_143;
case 0x18:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
v86 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v146, v86);
cocos2d::CCPoint::operator=(a2 + 2568, v87);
*(_QWORD *)(a2 + 2696) = v14;
GJBaseGameLayer::toggleDualMode(a1, v14, 0, a2, 0);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::gameEventTriggered(a1, 58, 0, 0);
}
goto LABEL_143;
case 0x19:
if ( *(_BYTE *)(a2 + 2507) )
{
v116 = cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v152,
(const struct cocos2d::CCRect *)&unk_14090B430);
PlayerObject::handleRotatedCollisionInternal(a2, v117, v14, v116, 0, 0, 1);
}
else
{
PlayerObject::collidedWithSlopeInternal(a2, v23, v14, 0);
}
goto LABEL_215;
case 0x1A:
if ( *(_BYTE *)(a1 + 12670) || !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::switchedToMode(a2, 26);
v60 = v14;
v61 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, v61);
cocos2d::CCPoint::operator=(a2 + 2568, v62);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v60 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_98;
}
*(_QWORD *)(a1 + 1024) = v60;
if ( *(_BYTE *)(v60 + 1052) )
{
LOBYTE(v64) = 1;
goto LABEL_99;
}
LABEL_98:
v64 = 0;
LABEL_99:
LOBYTE(v63) = 1;
PlayerObject::toggleDartMode(a2, v63, v64);
LOBYTE(v65) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1136LL))(a1, v65);
goto LABEL_53;
case 0x1B:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::toggleFlyMode(a2, 0, 0);
PlayerObject::toggleBirdMode(a2, 0, 0);
PlayerObject::toggleRollMode(a2, 0, 0);
PlayerObject::toggleDartMode(a2, 0, 0);
PlayerObject::toggleSpiderMode(a2, 0, 0);
PlayerObject::toggleSwingMode(a2, 0, 0);
v66 = v14;
v67 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v140, v67);
cocos2d::CCPoint::operator=(a2 + 2568, v68);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v66 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_107;
}
*(_QWORD *)(a1 + 1024) = v66;
if ( *(_BYTE *)(v66 + 1052) )
{
LOBYTE(v70) = 1;
PlayerObject::toggleRobotMode(a2, 1, v70);
goto LABEL_53;
}
LABEL_107:
LOBYTE(v69) = 1;
PlayerObject::toggleRobotMode(a2, v69, 0);
goto LABEL_53;
case 0x1C:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::gameEventTriggered(a1, 59, 0, 0);
GJBaseGameLayer::teleportPlayer(a1, v14, a2);
LABEL_215:
v118 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2);
cocos2d::CCRect::operator=(v8, v118);
MaxX = cocos2d::CCRect::getMaxX(v8);
MinX = cocos2d::CCRect::getMinX(v8);
MaxY = cocos2d::CCRect::getMaxY(v8);
MinY = cocos2d::CCRect::getMinY(v8);
goto LABEL_143;
case 0x1E:
v109 = *(_DWORD *)(v14 + 924);
v110 = *(_QWORD *)(a1 + 2408);
v111 = *(__int64 **)(v110 + 1376);
v112 = (__int64 *)v111[1];
if ( !*((_BYTE *)v112 + 25) )
{
do
{
if ( *((_DWORD *)v112 + 7) < v109 || *((_DWORD *)v112 + 7) <= v109 && *((int *)v112 + 8) < 0 )
{
v113 = 1;
}
else
{
v113 = 0;
v111 = v112;
}
v114 = v112 + 2;
if ( !v113 )
v114 = v112;
v112 = (__int64 *)*v114;
}
while ( !*(_BYTE *)(*v114 + 25) );
}
if ( !*((_BYTE *)v111 + 25)
&& v109 >= *((_DWORD *)v111 + 7)
&& (v109 > *((_DWORD *)v111 + 7) || *((int *)v111 + 8) <= 0) )
{
goto LABEL_192;
}
v122 = (unsigned int)v109;
sub_1402F9BA0((__int64 *)(v110 + 1376), (__int64)v151, (int *)&v122);
if ( *(_DWORD *)(v14 + 1036) == 1268 )
{
v129 = 0;
v130 = 0;
SpawnTriggerGameObject::updateRemapKeys(v14, &v129);
v115 = (void *)v129;
if ( (_QWORD)v129 )
{
if ( ((v130 - (_QWORD)v129) & 0xFFFFFFFFFFFFFFFCuLL) >= 0x1000 )
{
v115 = *(void **)(v129 - 8);
if ( (unsigned __int64)(v129 - (_QWORD)v115 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v115);
}
}
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(*(_QWORD *)v14 + 1144LL))(
v14,
a1,
*(unsigned int *)(a2 + 924),
0);
v108 = 63;
goto LABEL_191;
case 0x1F:
if ( *(_BYTE *)(a1 + 13024) )
goto LABEL_143;
v102 = *(_DWORD *)(v14 + 924);
v103 = *(_QWORD *)(a1 + 2408);
v104 = *(__int64 **)(v103 + 1376);
v105 = (__int64 *)v104[1];
if ( !*((_BYTE *)v105 + 25) )
{
do
{
if ( *((_DWORD *)v105 + 7) < v102 || *((_DWORD *)v105 + 7) <= v102 && *((int *)v105 + 8) < 0 )
{
v106 = 1;
}
else
{
v106 = 0;
v104 = v105;
}
v107 = v105 + 2;
if ( !v106 )
v107 = v105;
v105 = (__int64 *)*v107;
}
while ( !*(_BYTE *)(*v107 + 25) );
}
if ( !*((_BYTE *)v104 + 25)
&& v102 >= *((_DWORD *)v104 + 7)
&& (v102 > *((_DWORD *)v104 + 7) || *((int *)v104 + 8) <= 0) )
{
goto LABEL_192;
}
v153 = *(_DWORD *)(v14 + 924);
v154 = 0;
sub_1402F9BA0((__int64 *)(v103 + 1376), (__int64)v150, &v153);
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(*(_QWORD *)v14 + 1144LL))(
v14,
a1,
*(unsigned int *)(a2 + 924),
0);
GJBaseGameLayer::logPickupItem(a1, v14);
if ( !(unsigned __int8)GJBaseGameLayer::hasUniqueCoin(a1, v14) )
GJBaseGameLayer::pickupItem(a1, v14);
v108 = 62;
LABEL_191:
GJBaseGameLayer::gameEventTriggered(a1, v108, 0, 0);
LABEL_192:
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 1336LL))(v14);
GJBaseGameLayer::destroyObject(a1, v14);
goto LABEL_143;
case 0x21:
if ( !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::toggleFlyMode(a2, 0, 0);
PlayerObject::toggleBirdMode(a2, 0, 0);
PlayerObject::toggleRollMode(a2, 0, 0);
PlayerObject::toggleDartMode(a2, 0, 0);
PlayerObject::toggleRobotMode(a2, 0, 0);
PlayerObject::toggleSwingMode(a2, 0, 0);
v71 = v14;
v72 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v141, v72);
cocos2d::CCPoint::operator=(a2 + 2568, v73);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v71 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_115;
}
*(_QWORD *)(a1 + 1024) = v71;
if ( *(_BYTE *)(v71 + 1052) )
{
LOBYTE(v75) = 1;
PlayerObject::toggleSpiderMode(a2, 1, v75);
goto LABEL_53;
}
LABEL_115:
LOBYTE(v74) = 1;
PlayerObject::toggleSpiderMode(a2, v74, 0);
goto LABEL_53;
case 0x28:
v97 = *(_DWORD *)(v14 + 1036);
if ( v97 > 1859 )
{
if ( v97 != 2069 )
{
if ( v97 == 2866 )
{
*(_DWORD *)(a2 + 2952) = 2;
goto LABEL_143;
}
if ( v97 != 3645 )
goto LABEL_143;
}
*(_DWORD *)(a2 + 2960) = 2;
v156 = *(_DWORD *)(v14 + 1872);
if ( v156 > 0 )
{
if ( *(_BYTE *)sub_14016EE40((__int64 *)(a2 + 2976), &v156) )
goto LABEL_143;
*(_BYTE *)sub_14016EE40((__int64 *)(a2 + 2976), &v156) = 1;
}
ForceBlockGameObject::calculateForceToTarget(v14, v125, a2);
cocos2d::CCPoint::operator+(a2 + 2964, v126, v125);
cocos2d::CCPoint::operator=(a2 + 2964, v126);
v100 = (float)(*(float *)(a2 + 2968) * *(float *)(a2 + 2968))
+ (float)(*(float *)(a2 + 2964) * *(float *)(a2 + 2964));
if ( v100 < 0.0 )
v101 = sqrtf(v100);
else
v101 = fsqrt(v100);
if ( v101 > 9999.0 )
{
cocos2d::CCPoint::operator*(a2 + 2964, v127);
cocos2d::CCPoint::operator=(a2 + 2964, v127);
}
}
else if ( v97 == 1859 )
{
*(_DWORD *)(a2 + 2948) = 2;
}
else
{
v98 = v97 - 1755;
if ( v98 )
{
v99 = v98 - 58;
if ( v99 )
{
if ( v99 == 16 && *(_BYTE *)(a2 + 2540) )
{
PlayerObject::stopDashing(a2);
*(_BYTE *)(a2 + 2445) = 0;
}
}
else
{
*(_DWORD *)(a2 + 2940) = 2;
}
}
else
{
*(_DWORD *)(a2 + 2944) = 2;
}
}
goto LABEL_143;
case 0x29:
if ( *(_BYTE *)(a1 + 12670) || !(unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
goto LABEL_143;
GJBaseGameLayer::playerWillSwitchMode(a1, a2, v14);
PlayerObject::switchedToMode(a2, 41);
v49 = v14;
v50 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v137, v50);
cocos2d::CCPoint::operator=(a2 + 2568, v51);
*(_QWORD *)(a2 + 2696) = v14;
if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 1032) )
{
v49 = *(_QWORD *)(a1 + 1032);
}
else if ( !v14 )
{
goto LABEL_80;
}
*(_QWORD *)(a1 + 1024) = v49;
if ( *(_BYTE *)(v49 + 1052) )
{
LOBYTE(v53) = 1;
goto LABEL_81;
}
LABEL_80:
v53 = 0;
LABEL_81:
LOBYTE(v52) = 1;
PlayerObject::toggleSwingMode(a2, v52, v53);
LOBYTE(v54) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1136LL))(a1, v54);
LABEL_53:
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
goto LABEL_143;
case 0x2A:
if ( (unsigned __int8)GJBaseGameLayer::canBeActivatedByPlayer(a1, a2, v14) )
{
if ( !*(_BYTE *)(v14 + 1052) )
{
LOBYTE(v32) = *(_BYTE *)(a2 + 2503) == 0;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1328LL))(a1, v32);
}
v33 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 200LL))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v133, v33);
cocos2d::CCPoint::operator=(a2 + 2568, v34);
*(_QWORD *)(a2 + 2696) = v14;
GJBaseGameLayer::flipGravity(a1, a2, *(_BYTE *)(a2 + 2503) == 0);
GameObject::playShineEffect((cocos2d::CCArray **)v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 1384LL))(v14, a2);
GJBaseGameLayer::gameEventTriggered(a1, 52, 0, 0);
}
goto LABEL_143;
case 0x2E:
GJBaseGameLayer::playerTouchedRing(a1, a2, v14);
goto LABEL_215;
default:
goto LABEL_143;
}
}
}
break;
}
LABEL_143:
if ( ++v13 >= v128 )
return;
v5 = v155;
}
}
}