//
// PlayerObject::resetObject from 0x100411f00 to 0x1004124a1 (1441 bytes)
//
// 1 xrefs:
// > ??> @ 0x100933bf8
//
// 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 PlayerObject::resetObject(PlayerObject *a1)
{
std::__hash_node_base *>::__next_pointer next; // rdi
std::__hash_node_base *> *v3; // r14
unsigned __int64 value; // rsi
std::__vector_base::pointer begin; // rdi
CheckpointObject *m_pendingCheckpoint; // rdi
GameObject *Object; // r14
__int128 v8; // xmm0
std::__hash_node_base, void *> *>::__next_pointer v9; // rdi
std::__hash_node_base, void *> *> *v10; // r14
unsigned __int64 v11; // rsi
a1->m_maybeReducedEffects = 1;
GJActionManager::stopAllInternalActions(a1->m_actionManager);
a1->m_physDeltaRelated = 0.0;
a1->m_wasTeleported = 0;
a1->m_unk3e0 = 0;
a1->m_ringJumpRelated = 0;
*(_OWORD *)&a1->m_currentSlope2 = 0;
*(_OWORD *)&a1->m_collidedObject = 0;
*(_OWORD *)&a1->m_collidingWithLeft = 0;
*(_OWORD *)&a1->m_scaleXRelated2 = 0;
*(_OWORD *)&a1->m_yVelocityRelated = 0;
*(_OWORD *)&a1->m_scaleXRelated4 = 0;
a1->m_isCollidingWithSlope = 0;
*(_OWORD *)&a1->m_maybeReverseSpeed = 0;
PlayerObject::doReversePlayer(a1, 0);
PlayerObject::rotateGameplay(a1, 2, 4, 0, 0.0, 0.0, 0, 0);
a1->m_platformerXVelocity = 0.0;
a1->m_maybeHasStopped = 0;
a1->m_maybeGoingCorrectSlopeDirection = 0;
a1->m_affectedByForces = 0;
a1->m_isOnIce = 0;
a1->m_scaleXRelated = 0.0;
*(_WORD *)&a1->m_platformerMovingLeft = 0;
a1->m_maybeUpsideDownSlope = 0;
a1->m_controlsDisabled = 0;
*(_OWORD *)&a1->m_maybeSlidingTime = 0;
HIDWORD(a1->m_changedDirectionsTime) = 0;
a1->m_gravityMod = 1.0;
a1->m_maybeIsColliding = 0;
a1->m_isOnGround = 0;
a1->m_isOnGround2 = 1;
a1->m_lastLandTime = 0.0;
a1->m_scaleXRelatedTime = 0.0;
a1->m_fallSpeed = 0.0;
a1->m_platformerVelocityRelated = 0.0;
a1->m_decreaseBoostSlide = 0;
*(_OWORD *)&a1->m_dashStartTime = 0;
PlayerObject::toggleVisibility(a1, 1);
a1->m_flashTime = -1.0;
((void (__fastcall *)(PlayerObject *, cocos2d::ccColor3B *))a1->setColor)(a1, &a1->m_originalMainColor);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_iconSpriteSecondary->setColor)(
a1->m_iconSpriteSecondary,
&a1->m_originalSecondColor);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_vehicleSpriteSecondary->setColor)(
a1->m_vehicleSpriteSecondary,
&a1->m_originalSecondColor);
GJRobotSprite::updateColor02(
a1->m_robotSprite,
(cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_originalSecondColor.r | (a1->m_originalSecondColor.b << 16)));
GJRobotSprite::updateColor02(
a1->m_spiderSprite,
(cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_originalSecondColor.r | (a1->m_originalSecondColor.b << 16)));
if ( a1->m_hasGroundParticles )
cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles);
a1->m_hasGroundParticles = 0;
cocos2d::CCParticleSystem::stopSystem(a1->m_trailingParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_vehicleGroundParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_robotBurstParticles);
a1->m_stateForce = 0;
*(_OWORD *)&a1->m_stateNoAutoJump = 0;
*(_OWORD *)&a1->m_stateOnGround = 0;
*(_QWORD *)&a1->m_maybeStateForce2 = 0;
sub_10028CC90(&a1->m_stateForceVector, &dbl_1009A1558);
sub_100054D90((__int64)&a1->m_jumpPadRelated, (_QWORD *)a1->m_jumpPadRelated.__tree_.__pair1_.__value_.__left_);
a1->m_jumpPadRelated.__tree_.__begin_node_ = &a1->m_jumpPadRelated.__tree_.__pair1_.__value_;
*(_OWORD *)&a1->m_jumpPadRelated.__tree_.__pair1_.__value_.__left_ = 0;
sub_100720270(a1->m_touchingRings);
if ( a1->m_touchedRings.__table_.__p2_.__value_ )
{
next = a1->m_touchedRings.__table_.__p1_.__value_.__next_;
if ( next )
{
do
{
v3 = next->__next_;
operator delete(next);
next = v3;
}
while ( v3 );
}
a1->m_touchedRings.__table_.__p1_.__value_.__next_ = nullptr;
value = a1->m_touchedRings.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;
if ( value )
__bzero(a1->m_touchedRings.__table_.__bucket_list_.__ptr_.__value_, 8 * value);
a1->m_touchedRings.__table_.__p2_.__value_ = 0;
}
begin = a1->m_playerFollowFloats.__begin_;
if ( (char *)a1->m_playerFollowFloats.__end_ - (char *)begin > 0 )
__bzero(begin, (char *)a1->m_playerFollowFloats.__end_ - (char *)begin);
a1->m_followRelated = 0;
a1->m_unk838 = 0.0;
PlayerObject::stopDashing(a1);
PlayerObject::deactivateStreak(a1, 0);
m_pendingCheckpoint = a1->m_pendingCheckpoint;
if ( m_pendingCheckpoint )
{
Object = CheckpointObject::getObject(m_pendingCheckpoint);
GameObject::removeGlow(Object);
((void (__fastcall *)(GameObject *))Object->removeMeAndCleanup)(Object);
cocos2d::CCObject::release(a1->m_pendingCheckpoint);
a1->m_pendingCheckpoint = nullptr;
}
cocos2d::CCNode::stopActionByTag(a1->m_spiderSprite, 10);
((void (__fastcall *)(GJSpiderSprite *, float))a1->m_spiderSprite->setScale)(a1->m_spiderSprite, 1.0);
a1->m_checkpointTimeout = 0;
a1->m_canPlaceCheckpoint = 0;
sub_10028CC90(&a1->m_lastGroundedPos, &dbl_1009A1558);
a1->m_lastActivatedPortal = nullptr;
sub_10028CC90(&a1->m_lastPortalPos, &dbl_1009A1558);
a1->m_isLocked = 0;
a1->m_objectSnappedTo = nullptr;
a1->m_shouldTryPlacingCheckpoint = 0;
*(_WORD *)&a1->m_isOnSlope = 0;
a1->m_slopeVelocity = 0.0;
a1->m_collidingWithSlopeId = -1;
a1->m_isAccelerating = 0;
v8 = 0;
*(_OWORD *)&a1->m_currentPotentialSlope = 0;
*(_OWORD *)&a1->m_slopeRotation = 0;
if ( a1->m_potentialSlopeMap.__table_.__p2_.__value_ )
{
v9 = a1->m_potentialSlopeMap.__table_.__p1_.__value_.__next_;
if ( v9 )
{
do
{
v10 = v9->__next_;
operator delete(v9);
v9 = v10;
}
while ( v10 );
}
a1->m_potentialSlopeMap.__table_.__p1_.__value_.__next_ = nullptr;
v11 = a1->m_potentialSlopeMap.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_;
if ( v11 )
__bzero(a1->m_potentialSlopeMap.__table_.__bucket_list_.__ptr_.__value_, 8 * v11);
a1->m_potentialSlopeMap.__table_.__p2_.__value_ = 0;
v8 = 0;
}
a1->m_unk669 = 0;
*(_OWORD *)&a1->m_collidedTopMinY = v8;
*(_OWORD *)&a1->m_collidedLeftMaxX = v8;
a1->m_totalTime = 0.0;
a1->m_maybeIsBoosted = 0;
a1->m_yVelocity = 0.0;
PlayerObject::flipGravity(a1, 0, 0);
PlayerObject::switchedToMode(a1, CubePortal);
a1->m_vehicleSize = 0.60000002;
PlayerObject::togglePlayerScale(a1, 0, 0);
*(_WORD *)&a1->m_isRotating = 0;
a1->m_isBallRotating = 0;
a1->m_rotationSpeed = 0.0;
((void (__fastcall *)(PlayerObject *, double))a1->setRotation)(a1, 0.0);
a1->m_isDead = 0;
cocos2d::CCNode::stopActionByTag(a1, 4);
((void (__fastcall *)(PlayerObject *, __int64))a1->setOpacity)(a1, 255);
PlayerObject::toggleGhostEffect(a1, (GhostType)0);
PlayerObject::updateTimeMod(a1, 0.89999998, 0);
PlayerObject::resetStreak(a1);
PlayerObject::levelFlipFinished(a1);
a1->m_maybeReducedEffects = 0;
if ( a1->m_alwaysShowStreak )
PlayerObject::activateStreak(a1);
}