//
// PlayerObject::loadFromCheckpoint from 0x63af80 to 0x63b7fc (2172 bytes)
//
// 5 xrefs:
// > PlayLayer::loadFromCheckpoint @ 0x5e4d00
// > PlayLayer::loadFromCheckpoint @ 0x5e4fb0
// > PlayLayer::loadFromCheckpoint @ 0x5e4fd0
// > PlayLayer::loadFromCheckpoint @ 0x5e5030
// > ??> @ 0xbca78
//
// 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 PlayerObject::loadFromCheckpoint(PlayerObject *a1, PlayerCheckpoint *a2)
{
float m_rotation; // s0
cocos2d::CCPoint v5; // x2
void (__fastcall *setRotation)(float); // x1
double m_yVelocityBeforeSlope; // x14
bool m_wasTeleported; // w17
double m_slopeStartTime; // x12
bool m_fixGravityBug; // w16
float m_slopeAngle; // w3
bool m_reverseSync; // w15
bool m_justPlacedStreak; // w13
int m_lastCollisionBottom; // w11
int m_lastCollisionTop; // w10
int m_lastCollisionLeft; // w9
int m_lastCollisionRight; // w8
int m_unk50C; // w7
int m_unk510; // w6
GameObject *m_currentSlope2; // x5
GameObject *m_preLastGroundObject; // x4
double m_scaleXRelated2; // x8
GameObject *m_collidedObject; // x18
double m_groundYVelocity; // x7
GameObject *m_lastGroundObject; // x17
double m_yVelocityRelated; // x6
GameObject *m_collidingWithLeft; // x16
double m_scaleXRelated3; // x5
GameObject *m_collidingWithRight; // x15
double m_scaleXRelated4; // x4
double m_scaleXRelated5; // x3
bool m_isCollidingWithSlope; // w13
double unk_584; // x2
GameObject *m_currentPotentialSlope; // x10
double m_speedMultiplier; // x9
double m_yStart; // x7
double m_gravity; // x5
double m_gameModeChangedTime; // x3
float m_rotationSpeed; // w13
float m_rotateSpeed; // w11
double m_lastSpiderFlipTime; // x2
double m_slopeRotation; // x15
bool m_unk3e0; // w16
double m_currentSlopeYVelocity; // x13
double m_unk3d0; // x0
bool m_unk3e1; // w14
double m_blackOrbRelated; // x7
bool m_isAccelerating; // w12
double m_collidedTopMinY; // x6
bool m_isCurrentSlopeTop; // w10
double m_collidedBottomMaxY; // x5
bool m_wasJumpBuffered; // w8
double m_collidedLeftMaxX; // x4
bool m_wasRobotJump; // w2
double m_collidedRightMinX; // x3
float m_landParticlesAngle; // w11
float m_landParticleRelatedY; // w9
double m_yVelocity; // x5
unsigned __int8 m_stateJumpBuffered; // w14
double m_fallSpeed; // x4
double m_maybeReverseAcceleration; // x3
bool m_touchedRing; // w12
float m_xVelocityRelated2; // w2
bool m_touchedGravityPortal; // w10
bool m_touchedPad; // w8
float v66; // s0
float v67; // s1
float v68; // s0
float v69; // s1
double m_lastLandTime; // x4
double m_scaleXRelatedTime; // x2
bool m_maybeIsBoosted; // w8
float m_unkUnused3; // w5
bool m_isLocked; // w7
float m_platformerVelocityRelated; // w3
bool m_controlsDisabled; // w6
float v77; // s0
float v78; // s1
cocos2d::CCArray *m_touchingRings; // x0
cocos2d::ccArray *data; // x0
double m_totalTime; // x6
GameObject *m_lastActivatedPortal; // x18
double m_platformerXVelocity; // x3
bool m_defaultMiniIcon; // w17
float m_yVelocityRelated3; // w5
bool m_swapColors; // w16
int v87; // w4
bool m_switchDashFireColor; // w15
double m_scaleXRelated; // x2
int m_stateOnGround; // w14
int m_stateBoostX; // w13
int m_stateBoostY; // w12
int m_maybeStateForce2; // w11
int m_stateScale; // w10
bool m_holdingRight; // w9
bool m_holdingLeft; // w8
double m_maybeSlopeForce; // x7
bool m_maybeGoingCorrectSlopeDirection; // w17
double m_physDeltaRelated; // x6
bool m_isSliding; // w16
double m_maybeSlidingStartTime; // x5
bool m_isOnIce; // w15
double m_changedDirectionsTime; // x4
double m_slopeEndTime; // x3
int m_maybeSlidingTime; // w13
float m_xVelocityRelated; // w8
double m_maybeChangedDirectionAngle; // x2
double m_unkUnused2; // x2
float v109; // s0
float v110; // s1
bool v111; // w1
void (__fastcall *setPosition)(PlayerObject *__hidden, const cocos2d::CCPoint *); // x22
GhostType m_ghostType; // w1
float v114; // s0
float v115; // s1
double m_snapDistance; // x4
double m_accelerationOrSpeed; // x3
int m_followRelated; // w1
float m_unk838; // w2
bool m_wasOnSlope; // w1
_BOOL4 m_isGoingLeft; // w0
PlayLayer *v122; // x21
GameManager *v123; // x0
cocos2d::CCObject **arr; // x21
cocos2d::CCObject **v125; // x22
cocos2d::CCObject *v126; // x1
PlayLayer *m_playLayer; // x21
GameManager *v128; // x0
_BOOL4 m_jumpBuffered; // w0
DashRingObject *m_dashRing; // x4
double m_dashStartTime; // x3
double m_dashAngle; // x2
bool m_decreaseBoostSlide; // w0
double m_lastFlipTime; // x1
_BOOL4 m_platformerCheckpoint; // w0
PlayLayer *v136; // x21
GameManager *v137; // x0
PlayLayer *v138; // x21
GameManager *v139; // x0
PlayLayer *v140; // x21
GameManager *v141; // x0
PlayLayer *v142; // x21
GameManager *v143; // x0
PlayLayer *v144; // x21
GameManager *v145; // x0
cocos2d::CCPoint v146[2]; // [xsp+40h] [xbp+40h] BYREF
m_rotation = a2->m_rotation;
v5 = (cocos2d::CCPoint)_stack_chk_guard;
setRotation = (void (__fastcall *)(float))a1->setRotation;
a1->m_maybeReducedEffects = 1;
v146[1] = v5;
setRotation(m_rotation);
m_yVelocityBeforeSlope = a2->m_yVelocityBeforeSlope;
m_wasTeleported = a2->m_wasTeleported;
m_slopeStartTime = a2->m_slopeStartTime;
m_fixGravityBug = a2->m_fixGravityBug;
m_slopeAngle = a2->m_slopeAngle;
m_reverseSync = a2->m_reverseSync;
m_justPlacedStreak = a2->m_justPlacedStreak;
m_lastCollisionBottom = a2->m_lastCollisionBottom;
m_lastCollisionTop = a2->m_lastCollisionTop;
m_lastCollisionLeft = a2->m_lastCollisionLeft;
m_lastCollisionRight = a2->m_lastCollisionRight;
m_unk50C = a2->m_unk50C;
m_unk510 = a2->m_unk510;
m_currentSlope2 = a2->m_currentSlope2;
m_preLastGroundObject = a2->m_preLastGroundObject;
a1->m_slopeSlidingMaybeRotated = a2->m_slopeSlidingMaybeRotated;
a1->m_wasTeleported = m_wasTeleported;
a1->m_fixGravityBug = m_fixGravityBug;
a1->m_reverseSync = m_reverseSync;
a1->m_yVelocityBeforeSlope = m_yVelocityBeforeSlope;
a1->m_justPlacedStreak = m_justPlacedStreak;
a1->m_slopeStartTime = m_slopeStartTime;
a1->m_lastCollisionBottom = m_lastCollisionBottom;
a1->m_lastCollisionTop = m_lastCollisionTop;
a1->m_lastCollisionLeft = m_lastCollisionLeft;
a1->m_lastCollisionRight = m_lastCollisionRight;
a1->m_unk50C = m_unk50C;
a1->m_unk510 = m_unk510;
a1->m_currentSlope2 = m_currentSlope2;
a1->m_preLastGroundObject = m_preLastGroundObject;
a1->m_slopeAngle = m_slopeAngle;
a1->m_quickCheckpointMode = a2->m_quickCheckpointMode;
m_scaleXRelated2 = a2->m_scaleXRelated2;
m_collidedObject = a2->m_collidedObject;
m_groundYVelocity = a2->m_groundYVelocity;
m_lastGroundObject = a2->m_lastGroundObject;
m_yVelocityRelated = a2->m_yVelocityRelated;
m_collidingWithLeft = a2->m_collidingWithLeft;
m_scaleXRelated3 = a2->m_scaleXRelated3;
m_collidingWithRight = a2->m_collidingWithRight;
m_scaleXRelated4 = a2->m_scaleXRelated4;
LOBYTE(m_yVelocityBeforeSlope) = a2->m_collidingBetweenSteps;
m_scaleXRelated5 = a2->m_scaleXRelated5;
m_isCollidingWithSlope = a2->m_isCollidingWithSlope;
unk_584 = a2->unk_584;
LOBYTE(m_slopeStartTime) = a2->m_isBallRotating;
LOBYTE(m_lastCollisionBottom) = a2->m_unk669;
m_currentPotentialSlope = a2->m_currentPotentialSlope;
a1->m_currentSlope = a2->m_currentSlope;
a1->m_collidedObject = m_collidedObject;
a1->m_lastGroundObject = m_lastGroundObject;
a1->m_collidingWithLeft = m_collidingWithLeft;
a1->m_collidingWithRight = m_collidingWithRight;
a1->m_collidingBetweenSteps = LOBYTE(m_yVelocityBeforeSlope);
a1->m_isCollidingWithSlope = m_isCollidingWithSlope;
a1->m_isBallRotating = LOBYTE(m_slopeStartTime);
a1->m_unk669 = m_lastCollisionBottom;
a1->m_currentPotentialSlope = m_currentPotentialSlope;
a1->m_scaleXRelated2 = m_scaleXRelated2;
a1->m_groundYVelocity = m_groundYVelocity;
a1->m_yVelocityRelated = m_yVelocityRelated;
a1->m_scaleXRelated3 = m_scaleXRelated3;
a1->m_scaleXRelated4 = m_scaleXRelated4;
a1->m_scaleXRelated5 = m_scaleXRelated5;
a1->unk_584 = unk_584;
m_speedMultiplier = a2->m_speedMultiplier;
LOBYTE(m_collidingWithLeft) = a2->m_slopeFlipGravityRelated;
m_yStart = a2->m_yStart;
LOBYTE(m_yVelocityBeforeSlope) = a2->m_isRotating;
m_gravity = a2->m_gravity;
LOBYTE(m_slopeStartTime) = a2->m_isBallRotating2;
m_gameModeChangedTime = a2->m_gameModeChangedTime;
LOBYTE(m_currentPotentialSlope) = a2->m_padRingRelated;
*(float *)&m_collidingWithRight = a2->m_slopeAngleRadians;
LOBYTE(m_scaleXRelated2) = a2->m_maybeIsFalling;
m_rotationSpeed = a2->m_rotationSpeed;
LOBYTE(m_yVelocityRelated) = a2->m_shouldTryPlacingCheckpoint;
m_rotateSpeed = a2->m_rotateSpeed;
LOBYTE(m_scaleXRelated4) = a2->m_playEffects;
*(float *)&unk_584 = a2->m_trailingParticleLife;
a1->m_collidingWithSlopeId = a2->m_collidingWithSlopeId;
a1->m_slopeFlipGravityRelated = (char)m_collidingWithLeft;
LODWORD(a1->m_slopeAngleRadians) = (_DWORD)m_collidingWithRight;
a1->m_isRotating = LOBYTE(m_yVelocityBeforeSlope);
a1->m_rotationSpeed = m_rotationSpeed;
a1->m_isBallRotating2 = LOBYTE(m_slopeStartTime);
a1->m_rotateSpeed = m_rotateSpeed;
a1->m_padRingRelated = (char)m_currentPotentialSlope;
a1->m_speedMultiplier = m_speedMultiplier;
a1->m_maybeIsFalling = LOBYTE(m_scaleXRelated2);
a1->m_yStart = m_yStart;
a1->m_shouldTryPlacingCheckpoint = LOBYTE(m_yVelocityRelated);
a1->m_gravity = m_gravity;
a1->m_playEffects = LOBYTE(m_scaleXRelated4);
a1->m_trailingParticleLife = *(float *)&unk_584;
LOBYTE(unk_584) = a2->m_isOnGround3;
a1->m_gameModeChangedTime = m_gameModeChangedTime;
a1->m_isOnGround3 = LOBYTE(unk_584);
m_lastSpiderFlipTime = a2->m_lastSpiderFlipTime;
LOBYTE(m_scaleXRelated4) = a2->m_unkBool5;
a1->m_ringJumpRelated = a2->m_ringJumpRelated;
a1->m_unkBool5 = LOBYTE(m_scaleXRelated4);
a1->m_lastSpiderFlipTime = m_lastSpiderFlipTime;
std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::operator=(
(__int64)&a1->m_ringRelatedSet,
&a2->m_ringRelatedSet._M_h._M_buckets);
m_slopeRotation = a2->m_slopeRotation;
m_unk3e0 = a2->m_unk3e0;
m_currentSlopeYVelocity = a2->m_currentSlopeYVelocity;
m_unk3d0 = a2->m_unk3d0;
m_unk3e1 = a2->m_unk3e1;
m_blackOrbRelated = a2->m_blackOrbRelated;
m_isAccelerating = a2->m_isAccelerating;
m_collidedTopMinY = a2->m_collidedTopMinY;
m_isCurrentSlopeTop = a2->m_isCurrentSlopeTop;
m_collidedBottomMaxY = a2->m_collidedBottomMaxY;
m_wasJumpBuffered = a2->m_wasJumpBuffered;
m_collidedLeftMaxX = a2->m_collidedLeftMaxX;
m_wasRobotJump = a2->m_wasRobotJump;
m_collidedRightMinX = a2->m_collidedRightMinX;
a1->m_maybeSpriteRelated = a2->m_maybeSpriteRelated;
m_landParticlesAngle = a2->m_landParticlesAngle;
m_landParticleRelatedY = a2->m_landParticleRelatedY;
a1->m_unk3e0 = m_unk3e0;
a1->m_slopeRotation = m_slopeRotation;
a1->m_unk3e1 = m_unk3e1;
a1->m_currentSlopeYVelocity = m_currentSlopeYVelocity;
a1->m_isAccelerating = m_isAccelerating;
a1->m_landParticlesAngle = m_landParticlesAngle;
a1->m_isCurrentSlopeTop = m_isCurrentSlopeTop;
a1->m_landParticleRelatedY = m_landParticleRelatedY;
a1->m_wasJumpBuffered = m_wasJumpBuffered;
a1->m_unk3d0 = m_unk3d0;
a1->m_blackOrbRelated = m_blackOrbRelated;
a1->m_collidedTopMinY = m_collidedTopMinY;
a1->m_collidedBottomMaxY = m_collidedBottomMaxY;
a1->m_collidedLeftMaxX = m_collidedLeftMaxX;
a1->m_collidedRightMinX = m_collidedRightMinX;
a1->m_wasRobotJump = m_wasRobotJump;
m_yVelocity = a2->m_yVelocity;
m_stateJumpBuffered = a2->m_stateJumpBuffered;
m_fallSpeed = a2->m_fallSpeed;
LOBYTE(m_currentSlopeYVelocity) = a2->m_stateRingJump2;
m_maybeReverseAcceleration = a2->m_maybeReverseAcceleration;
m_touchedRing = a2->m_touchedRing;
m_xVelocityRelated2 = a2->m_xVelocityRelated2;
LOBYTE(m_landParticlesAngle) = a2->m_touchedCustomRing;
m_touchedGravityPortal = a2->m_touchedGravityPortal;
LOBYTE(m_landParticleRelatedY) = a2->m_maybeTouchedBreakableBlock;
m_touchedPad = a2->m_touchedPad;
LOBYTE(m_blackOrbRelated) = a2->m_maybeUpsideDownSlope;
a1->m_reverseRelated = a2->m_reverseRelated;
a1->m_stateJumpBuffered = m_stateJumpBuffered;
a1->m_stateRingJump2 = LOBYTE(m_currentSlopeYVelocity);
a1->m_touchedRing = m_touchedRing;
a1->m_touchedCustomRing = LOBYTE(m_landParticlesAngle);
a1->m_touchedGravityPortal = m_touchedGravityPortal;
a1->m_maybeTouchedBreakableBlock = LOBYTE(m_landParticleRelatedY);
a1->m_touchedPad = m_touchedPad;
a1->m_maybeUpsideDownSlope = LOBYTE(m_blackOrbRelated);
a1->m_yVelocity = m_yVelocity;
a1->m_fallSpeed = m_fallSpeed;
a1->m_maybeReverseAcceleration = m_maybeReverseAcceleration;
a1->m_xVelocityRelated2 = m_xVelocityRelated2;
cocos2d::CCPoint::operator=(&a1->m_shipRotation, v66, v67);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, v68, v69);
m_lastLandTime = a2->m_lastLandTime;
m_scaleXRelatedTime = a2->m_scaleXRelatedTime;
m_maybeIsBoosted = a2->m_maybeIsBoosted;
m_unkUnused3 = a2->m_unkUnused3;
m_isLocked = a2->m_isLocked;
m_platformerVelocityRelated = a2->m_platformerVelocityRelated;
m_controlsDisabled = a2->m_controlsDisabled;
a1->m_isOnGround2 = a2->m_isOnGround2;
a1->m_maybeIsBoosted = m_maybeIsBoosted;
a1->m_isLocked = m_isLocked;
a1->m_controlsDisabled = m_controlsDisabled;
a1->m_unkUnused3 = m_unkUnused3;
a1->m_lastLandTime = m_lastLandTime;
a1->m_platformerVelocityRelated = m_platformerVelocityRelated;
a1->m_scaleXRelatedTime = m_scaleXRelatedTime;
cocos2d::CCPoint::operator=(&a1->m_lastGroundedPos, v77, v78);
cocos2d::CCArray::removeAllObjects(a1->m_touchingRings);
m_touchingRings = a2->m_touchingRings;
if ( m_touchingRings )
{
data = m_touchingRings->data;
if ( data->num )
{
arr = data->arr;
v125 = &arr[data->num - 1];
while ( v125 >= arr )
{
v126 = *arr;
if ( !*arr )
break;
++arr;
cocos2d::CCArray::addObject(a1->m_touchingRings, v126);
}
}
}
std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::operator=(
(__int64)&a1->m_touchedRings,
&a2->m_touchedRings._M_h._M_buckets);
m_totalTime = a2->m_totalTime;
m_lastActivatedPortal = a2->m_lastActivatedPortal;
m_platformerXVelocity = a2->m_platformerXVelocity;
m_defaultMiniIcon = a2->m_defaultMiniIcon;
m_yVelocityRelated3 = a2->m_yVelocityRelated3;
m_swapColors = a2->m_swapColors;
v87 = *(_DWORD *)&a2->m_stateUnk;
m_switchDashFireColor = a2->m_switchDashFireColor;
m_scaleXRelated = a2->m_scaleXRelated;
m_stateOnGround = a2->m_stateOnGround;
m_stateBoostX = a2->m_stateBoostX;
m_stateBoostY = a2->m_stateBoostY;
m_maybeStateForce2 = a2->m_maybeStateForce2;
m_stateScale = a2->m_stateScale;
m_holdingRight = a2->m_holdingRight;
m_holdingLeft = a2->m_holdingLeft;
a1->m_leftPressedFirst = a2->m_leftPressedFirst;
a1->m_lastActivatedPortal = m_lastActivatedPortal;
a1->m_defaultMiniIcon = m_defaultMiniIcon;
a1->m_swapColors = m_swapColors;
a1->m_switchDashFireColor = m_switchDashFireColor;
a1->m_stateOnGround = m_stateOnGround;
a1->m_stateBoostX = m_stateBoostX;
a1->m_stateBoostY = m_stateBoostY;
a1->m_maybeStateForce2 = m_maybeStateForce2;
a1->m_stateScale = m_stateScale;
a1->m_holdingRight = m_holdingRight;
a1->m_holdingLeft = m_holdingLeft;
a1->m_totalTime = m_totalTime;
a1->m_yVelocityRelated3 = m_yVelocityRelated3;
*(_DWORD *)&a1->m_stateUnk = v87;
a1->m_platformerXVelocity = m_platformerXVelocity;
a1->m_scaleXRelated = m_scaleXRelated;
LOBYTE(m_lastActivatedPortal) = a2->m_maybeHasStopped;
m_maybeSlopeForce = a2->m_maybeSlopeForce;
m_maybeGoingCorrectSlopeDirection = a2->m_maybeGoingCorrectSlopeDirection;
m_physDeltaRelated = a2->m_physDeltaRelated;
m_isSliding = a2->m_isSliding;
m_maybeSlidingStartTime = a2->m_maybeSlidingStartTime;
m_isOnIce = a2->m_isOnIce;
m_changedDirectionsTime = a2->m_changedDirectionsTime;
LOBYTE(m_stateOnGround) = a2->m_isOnGround4;
m_slopeEndTime = a2->m_slopeEndTime;
m_maybeSlidingTime = a2->m_maybeSlidingTime;
m_xVelocityRelated = a2->m_xVelocityRelated;
LOBYTE(m_stateBoostY) = a2->m_isMoving;
m_maybeChangedDirectionAngle = a2->m_maybeChangedDirectionAngle;
LOBYTE(m_maybeStateForce2) = a2->m_platformerMovingLeft;
LOBYTE(m_stateScale) = a2->m_platformerMovingRight;
a1->m_isSlidingRight = a2->m_isSlidingRight;
a1->m_maybeHasStopped = (char)m_lastActivatedPortal;
a1->m_maybeGoingCorrectSlopeDirection = m_maybeGoingCorrectSlopeDirection;
a1->m_isSliding = m_isSliding;
a1->m_isOnIce = m_isOnIce;
a1->m_isOnGround4 = m_stateOnGround;
a1->m_maybeSlidingTime = m_maybeSlidingTime;
a1->m_isMoving = m_stateBoostY;
a1->m_platformerMovingLeft = m_maybeStateForce2;
a1->m_platformerMovingRight = m_stateScale;
a1->m_xVelocityRelated = m_xVelocityRelated;
a1->m_maybeSlopeForce = m_maybeSlopeForce;
a1->m_physDeltaRelated = m_physDeltaRelated;
a1->m_maybeSlidingStartTime = m_maybeSlidingStartTime;
a1->m_changedDirectionsTime = m_changedDirectionsTime;
a1->m_slopeEndTime = m_slopeEndTime;
a1->m_maybeChangedDirectionAngle = m_maybeChangedDirectionAngle;
LODWORD(m_maybeSlopeForce) = a2->m_stateNoAutoJump;
m_unkUnused2 = a2->m_unkUnused2;
LODWORD(m_physDeltaRelated) = a2->m_stateDartSlide;
LODWORD(m_maybeSlidingStartTime) = a2->m_stateHitHead;
LODWORD(m_changedDirectionsTime) = a2->m_stateFlipGravity;
a1->m_stateForce = a2->m_stateForce;
a1->m_stateNoAutoJump = LODWORD(m_maybeSlopeForce);
a1->m_stateDartSlide = LODWORD(m_physDeltaRelated);
a1->m_stateHitHead = LODWORD(m_maybeSlidingStartTime);
a1->m_stateFlipGravity = LODWORD(m_changedDirectionsTime);
a1->m_unkUnused2 = m_unkUnused2;
cocos2d::CCPoint::operator=(&a1->m_stateForceVector, v109, v110);
a1->m_affectedByForces = a2->m_affectedByForces;
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::operator=(
&a1->m_jumpPadRelated.compare.pad,
(__int64)&a2->m_jumpPadRelated);
v111 = !a2->m_isHidden;
a1->m_fallStartY = a2->m_fallStartY;
PlayerObject::toggleVisibility(a1, v111);
setPosition = a1->setPosition;
cocos2d::CCPoint::CCPoint(v146, &a2->m_position);
setPosition(a1, v146);
PlayerObject::flipGravity(a1, a2->m_isUpsideDown, 0);
PlayerObject::rotateGameplayOnly(a1, a2->m_isSideways);
m_ghostType = a2->m_ghostType;
a1->m_gravityMod = a2->m_gravityMod;
PlayerObject::toggleGhostEffect(a1, m_ghostType);
PlayerObject::togglePlayerScale(a1, a2->m_isMini, 0);
a1->m_maybeReverseSpeed = a2->m_maybeReverseSpeed;
cocos2d::CCPoint::CCPoint(v146, &a2->m_lastPosition);
cocos2d::CCPoint::operator=(&a1->m_lastPosition, v114, v115);
m_snapDistance = a2->m_snapDistance;
m_accelerationOrSpeed = a2->m_accelerationOrSpeed;
m_followRelated = a2->m_followRelated;
m_unk838 = a2->m_unk838;
a1->m_objectSnappedTo = a2->m_objectSnappedTo;
a1->m_followRelated = m_followRelated;
a1->m_snapDistance = m_snapDistance;
a1->m_accelerationOrSpeed = m_accelerationOrSpeed;
a1->m_unk838 = m_unk838;
std::vector::operator=((__int64)&a1->m_playerFollowFloats, (char **)&a2->m_playerFollowFloats);
m_wasOnSlope = a2->m_wasOnSlope;
a1->m_isOnSlope = a2->m_isOnSlope;
a1->m_wasOnSlope = m_wasOnSlope;
m_isGoingLeft = a2->m_isGoingLeft;
a1->m_slopeVelocity = a2->m_slopeVelocity;
if ( m_isGoingLeft )
PlayerObject::doReversePlayer(a1, 1);
PlayerObject::updateTimeMod(a1, a2->m_playerSpeed, 0);
if ( a2->m_isShip )
{
m_playLayer = GameManager::sharedState()->m_playLayer;
v128 = GameManager::sharedState();
GJBaseGameLayer::switchToFlyMode(m_playLayer, a1, v128->m_playLayer->m_gameState.m_lastActivatedPortal1, 1, 5);
}
else if ( a2->m_isBall )
{
v136 = GameManager::sharedState()->m_playLayer;
v137 = GameManager::sharedState();
GJBaseGameLayer::switchToRollMode(v136, a1, v137->m_playLayer->m_gameState.m_lastActivatedPortal1, 1);
}
else if ( a2->m_isBird )
{
v138 = GameManager::sharedState()->m_playLayer;
v139 = GameManager::sharedState();
GJBaseGameLayer::switchToFlyMode(v138, a1, v139->m_playLayer->m_gameState.m_lastActivatedPortal1, 1, 19);
}
else if ( a2->m_isSwing )
{
v142 = GameManager::sharedState()->m_playLayer;
v143 = GameManager::sharedState();
GJBaseGameLayer::switchToFlyMode(v142, a1, v143->m_playLayer->m_gameState.m_lastActivatedPortal1, 1, 41);
}
else if ( a2->m_isDart )
{
v140 = GameManager::sharedState()->m_playLayer;
v141 = GameManager::sharedState();
GJBaseGameLayer::switchToFlyMode(v140, a1, v141->m_playLayer->m_gameState.m_lastActivatedPortal1, 1, 26);
}
else if ( a2->m_isRobot )
{
v144 = GameManager::sharedState()->m_playLayer;
v145 = GameManager::sharedState();
GJBaseGameLayer::switchToRobotMode(v144, a1, v145->m_playLayer->m_gameState.m_lastActivatedPortal1, 1);
}
else if ( a2->m_isSpider )
{
v122 = GameManager::sharedState()->m_playLayer;
v123 = GameManager::sharedState();
GJBaseGameLayer::switchToSpiderMode(v122, a1, v123->m_playLayer->m_gameState.m_lastActivatedPortal1, 1);
}
PlayerObject::resetStreak(a1);
m_jumpBuffered = a2->m_jumpBuffered;
a1->m_jumpBuffered = m_jumpBuffered;
if ( m_jumpBuffered && a2->m_isDashing )
{
m_dashRing = a2->m_dashRing;
m_dashStartTime = a2->m_dashStartTime;
a1->m_dashX = a2->m_dashX;
a1->m_dashY = a2->m_dashY;
m_dashAngle = a2->m_dashAngle;
a1->m_dashRing = m_dashRing;
a1->m_dashStartTime = m_dashStartTime;
a1->m_dashAngle = m_dashAngle;
PlayerObject::startDashing(a1, nullptr);
}
PlayerObject::setYVelocity(a1, a2->m_yVelocityUnrounded, 50);
m_decreaseBoostSlide = a2->m_decreaseBoostSlide;
m_lastFlipTime = a2->m_lastFlipTime;
a1->m_isOnGround = a2->m_isOnGround;
a1->m_decreaseBoostSlide = m_decreaseBoostSlide;
m_platformerCheckpoint = a2->m_platformerCheckpoint;
a1->m_lastFlipTime = m_lastFlipTime;
if ( m_platformerCheckpoint )
{
PlayerObject::releaseAllButtons(a1);
PlayerObject::setYVelocity(a1, 0.0, 50);
a1->m_isOnGround = 0;
a1->m_platformerXVelocity = 0.0;
}
a1->setRotation(a1, a2->m_rotation);
a1->m_maybeReducedEffects = 0;
if ( a1->m_isPlatformer )
PlayerObject::releaseAllButtons(a1);
}