//
// PlayerObject::togglePlayerScale from 0x75cde8 to 0x75d170 (904 bytes)
//
// 10 xrefs:
// > PlayerObject::copyAttributes @ 0x75d4bc
// > PlayerObject::resetObject @ 0x75dfe4
// > PlayerObject::loadFromCheckpoint @ 0x76bb38
// > MenuGameLayer::resetPlayer @ 0x7da328
// > MenuGameLayer::resetPlayer @ 0x7da50c
// > GJBaseGameLayer::setupLevelStart @ 0x9e8074
// > GJBaseGameLayer::setupLevelStart @ 0x9e82cc
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e90cc
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e9160
// > ??> @ 0xde5f8
//
// This function is hookable on this platform (idp: arm, 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 12:53:01 +0000
//
__int64 __fastcall PlayerObject::togglePlayerScale(PlayerObject *this, char a2, unsigned __int8 a3)
{
PlayerObject *v3; // x19
int v4; // w21
float v6; // s1
int v7; // w1
cocos2d::CCParticleSystem *v8; // x0
float v9; // s0
__int64 v10; // x0
cocos2d::CCMotionStreak *v11; // x0
float v12; // s8
int v13; // w0
int v14; // w1
cocos2d::CCScaleTo *v15; // x0
cocos2d::CCEaseElasticOut *v16; // x0
cocos2d::CCActionInterval *v17; // x1
cocos2d::CCAction *v18; // x22
__int64 v19; // x22
__int64 v20; // x0
int v21; // [xsp+48h] [xbp+48h]
_BYTE v22[8]; // [xsp+50h] [xbp+50h] BYREF
v3 = this;
v4 = a3;
if ( a2 )
{
if ( *((float *)this + 618) != 1.0 )
return _stack_chk_guard;
v6 = 0.6;
v7 = *((unsigned __int8 *)this + 2648);
*((_DWORD *)this + 618) = 1058642330;
if ( !v7 )
goto LABEL_9;
if ( *((_BYTE *)this + 2419) )
{
PlayerObject::updatePlayerRollFrame(this, 0);
v6 = *((float *)v3 + 618);
}
else if ( !*((_BYTE *)this + 2421) && !*((_BYTE *)this + 2420) )
{
v14 = *((unsigned __int8 *)this + 2428);
if ( !*((_BYTE *)this + 2428) )
goto LABEL_42;
}
}
else
{
if ( *((float *)this + 618) == 1.0 )
return _stack_chk_guard;
if ( *((_BYTE *)this + 2832) )
*((_DWORD *)this + 676) = 2;
v13 = *((unsigned __int8 *)this + 2648);
*((float *)v3 + 618) = 1.0;
v6 = 1.0;
if ( v13 )
{
if ( *((_BYTE *)v3 + 2419) )
{
v20 = GameManager::sharedState((GameManager *)*((unsigned __int8 *)v3 + 2419));
PlayerObject::updatePlayerRollFrame(v3, *(_DWORD *)(v20 + 740) - *(_DWORD *)(v20 + 744));
v6 = *((float *)v3 + 618);
goto LABEL_9;
}
v6 = 1.0;
if ( !*((_BYTE *)v3 + 2421) && !*((_BYTE *)v3 + 2420) && !*((_BYTE *)v3 + 2428) )
{
v14 = *((_DWORD *)v3 + 390);
this = v3;
LABEL_42:
PlayerObject::updatePlayerFrame(this, v14);
v6 = *((float *)v3 + 618);
}
}
}
LABEL_9:
v8 = *((cocos2d::CCParticleSystem **)v3 + 280);
*((float *)v3 + 227) = v6;
*((float *)v3 + 228) = v6;
cocos2d::CCParticleSystem::loadScaledDefaults(v8, v6);
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 281), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 270), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 273), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 271), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 272), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 274), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 275), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 276), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 277), *((float *)v3 + 618));
cocos2d::CCParticleSystem::loadScaledDefaults(*((cocos2d::CCParticleSystem **)v3 + 278), *((float *)v3 + 618));
if ( *((_BYTE *)v3 + 2420) )
v9 = 0.8;
else
v9 = 1.0;
cocos2d::CCMotionStreak::setStroke(
*((cocos2d::CCMotionStreak **)v3 + 238),
(float)(*((float *)v3 + 567) * *((float *)v3 + 618)) * v9);
if ( *((_BYTE *)v3 + 1972) || *((_BYTE *)v3 + 2420) )
*(_DWORD *)(*((_QWORD *)v3 + 240) + 432LL) = *((_DWORD *)v3 + 618);
v10 = *((_QWORD *)v3 + 224);
if ( v10 )
*(_DWORD *)(v10 + 332) = *((_DWORD *)v3 + 618);
v11 = *((cocos2d::CCMotionStreak **)v3 + 239);
if ( v11 )
updateStreakSettings(v11, *((_DWORD *)v3 + 569), (__int64)v3);
GJActionManager::stopInternalAction(*((GJActionManager **)v3 + 379), 6);
v12 = *((float *)v3 + 618);
if ( !*((_BYTE *)v3 + 1972)
|| *((_BYTE *)v3 + 1969)
|| (v15 = (cocos2d::CCScaleTo *)*(unsigned __int8 *)(*(_QWORD *)(GameManager::sharedState((GameManager *)*((unsigned __int8 *)v3 + 1969))
+ 544)
+ 12605LL),
(_DWORD)v15) )
{
(*(void (__fastcall **)(PlayerObject *, float))(*(_QWORD *)v3 + 128LL))(v3, v12);
(*(void (__fastcall **)(PlayerObject *, float))(*(_QWORD *)v3 + 144LL))(v3, v12);
}
else
{
v16 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create(v15, 0.5, v12, v12);
v18 = (cocos2d::CCAction *)cocos2d::CCEaseElasticOut::create(v16, v17);
(*(void (__fastcall **)(cocos2d::CCAction *, __int64))(*(_QWORD *)v18 + 72LL))(v18, 6);
GJActionManager::runInternalAction(*((GJActionManager **)v3 + 379), v18, v3);
if ( *((float *)v3 + 618) == 1.0 )
LOWORD(v21) = -256;
else
LOWORD(v21) = 255;
BYTE2(v21) = -106;
if ( !v4 )
{
v19 = *(_QWORD *)(GameManager::sharedState((GameManager *)0xFFFFFF96LL) + 544);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, (PlayerObject *)((char *)v3 + 2488));
GJBaseGameLayer::lightningFlash(v19, v22, v21);
PlayerObject::spawnPortalCircle((__int64)v3, v21, 45.0);
PlayerObject::spawnScaleCircle((__int64)v3);
}
}
if ( *((_BYTE *)v3 + 2419) && *((_BYTE *)v3 + 1784) )
PlayerObject::runRotateAction(v3);
PlayerObject::placeStreakPoint(v3);
PlayerObject::updateRobotAnimationSpeed(v3);
return _stack_chk_guard;
}