// // PlayerObject::pushButton from 0x100413fb0 to 0x10041439c (1004 bytes) // // 4 xrefs: // > GJBaseGameLayer::handleButton @ 0x10014ac48 // > GJBaseGameLayer::handleButton @ 0x10014ac8a // > PlayerObject::enablePlayerControls @ 0x10041aa49 // > MenuGameLayer::tryJump @ 0x1004fa084 // // 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 // bool __fastcall PlayerObject::pushButton(PlayerObject *a1, PlayerButton a2) { std::__tree_end_node *>::pointer left; // rax std::__compressed_pair *>> *p_pair1; // r12 std::__compressed_pair *>> *v5; // r14 std::__compressed_pair *>> *v6; // r13 std::__tree_end_node *> *v7; // rax bool v8; // r14 GameManager *v10; // rax HardStreak *m_waveTrail; // r14 double *v12; // rax cocos2d::CCPoint v13; // xmm0_8 std::__hash_node_base *>::__next_pointer next; // rdi std::__hash_node_base *> *v15; // r14 unsigned __int64 value; // rsi unsigned __int8 m_jumpBuffered; // cl bool m_stateRingJump; // al int v19; // eax unsigned int v20; // r15d __int64 v21; // r12 cocos2d::CCArray *m_touchingRings; // rax cocos2d::ccArray *data; // rax RingObject **arr; // r15 RingObject *v25; // r13 int v26; // eax __int64 v27; // rdi unsigned int *v28; // rax RingObject **v29; // r15 unsigned __int64 v30; // r12 unsigned int *v31; // rax RingObject **v32; // r15 unsigned __int64 v33; // r12 __int64 v34; // [rsp+0h] [rbp-40h] BYREF unsigned __int64 v35; // [rsp+8h] [rbp-38h] __int64 v36; // [rsp+10h] [rbp-30h] if ( !a1->m_inputsLocked ) { left = a1->m_holdingButtons.__tree_.__pair1_.__value_.__left_; if ( left ) { while ( 1 ) { while ( 1 ) { v5 = (std::__compressed_pair *>> *)left; if ( *((_DWORD *)left + 7) <= a2 ) break; left = *(std::__tree_end_node *>::pointer *)left; p_pair1 = v5; if ( !v5->__value_.__left_ ) goto LABEL_9; } if ( *((_DWORD *)left + 7) >= a2 ) break; left = *((std::__tree_end_node *>::pointer *)left + 1); if ( !left ) { p_pair1 = v5 + 1; goto LABEL_9; } } } else { p_pair1 = &a1->m_holdingButtons.__tree_.__pair1_; v5 = &a1->m_holdingButtons.__tree_.__pair1_; LABEL_9: v6 = v5; v5 = (std::__compressed_pair *>> *)operator new(0x28u); HIDWORD(v5[3].__value_.__left_) = a2; LOBYTE(v5[4].__value_.__left_) = 0; *(_OWORD *)&v5->__value_.__left_ = 0; v5[2].__value_.__left_ = (std::__tree_end_node *>::pointer)v6; p_pair1->__value_.__left_ = (std::__tree_end_node *>::pointer)v5; v7 = (std::__tree_end_node *> *)a1->m_holdingButtons.__tree_.__begin_node_->__left_; if ( v7 ) a1->m_holdingButtons.__tree_.__begin_node_ = v7; sub_100054DD0((__int64 *)a1->m_holdingButtons.__tree_.__pair1_.__value_.__left_, (__int64 *)v5); ++a1->m_holdingButtons.__tree_.__pair3_.__value_; } LOBYTE(v5[4].__value_.__left_) = 1; } if ( a1->m_isLocked || a1->m_controlsDisabled ) return 0; if ( a2 == Jump ) { if ( !a1->m_jumpBuffered ) { if ( !a1->m_maybeReducedEffects && a1->m_isDart && a1->m_fadeOutStreak ) { if ( !a1->m_playEffects || (v10 = GameManager::sharedState(), !GJBaseGameLayer::isFlipping(v10->m_playLayer)) ) { m_waveTrail = a1->m_waveTrail; v12 = (double *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1); *(double *)&v13 = sub_10028CC60(&v34, v12); HardStreak::addPoint(m_waveTrail, v13); } } a1->m_justPlacedStreak = 0; } *(_WORD *)&a1->m_jumpBuffered = 257; a1->m_padRingRelated = 0; if ( a1->m_ringRelatedSet.__table_.__p2_.__value_ ) { next = a1->m_ringRelatedSet.__table_.__p1_.__value_.__next_; if ( next ) { do { v15 = next->__next_; operator delete(next); next = v15; } while ( v15 ); } a1->m_ringRelatedSet.__table_.__p1_.__value_.__next_ = nullptr; value = a1->m_ringRelatedSet.__table_.__bucket_list_.__ptr_.__value_.__data_.__value_; if ( value ) __bzero(a1->m_ringRelatedSet.__table_.__bucket_list_.__ptr_.__value_, 8 * value); a1->m_ringRelatedSet.__table_.__p2_.__value_ = 0; m_jumpBuffered = a1->m_jumpBuffered; m_stateRingJump = a1->m_stateRingJump; } else { m_stateRingJump = 1; m_jumpBuffered = 1; } a1->m_stateJumpBuffered = m_jumpBuffered; a1->m_stateRingJump2 = m_stateRingJump; *(_DWORD *)&a1->m_touchedRing = 0; if ( (unsigned int)sub_100720070(a1->m_touchingRings) ) { v19 = sub_100720070(a1->m_touchingRings); v8 = 1; if ( v19 > 0 ) { v20 = v19; v21 = sub_10071FD00((unsigned int)v19); v36 = sub_10071FD00(v20); m_touchingRings = a1->m_touchingRings; if ( m_touchingRings ) { data = m_touchingRings->data; if ( data->num ) { arr = (RingObject **)data->arr; v35 = (unsigned __int64)&arr[data->num - 1]; do { v25 = *arr; if ( !*arr ) break; if ( v25->m_claimTouch ) { PlayerObject::ringJump(a1, *arr, 0); a1->m_jumpBuffered = 0; return v8; } v26 = ((__int64 (__fastcall *)(RingObject *))v25->getType)(*arr); v27 = v36; if ( v26 == 36 ) v27 = v21; sub_10071FCD0(v27, v25); ++arr; } while ( (unsigned __int64)arr <= v35 ); } } if ( v21 ) { v28 = *(unsigned int **)(v21 + 56); if ( *v28 ) { v29 = *((RingObject ***)v28 + 2); v30 = (unsigned __int64)&v29[*v28 - 1]; do { if ( !*v29 ) break; PlayerObject::ringJump(a1, *v29++, 0); } while ( (unsigned __int64)v29 <= v30 ); } } if ( v36 ) { v31 = *(unsigned int **)(v36 + 56); if ( *v31 ) { v32 = *((RingObject ***)v31 + 2); v33 = (unsigned __int64)&v32[*v31 - 1]; do { if ( !*v32 ) break; PlayerObject::ringJump(a1, *v32++, 0); } while ( (unsigned __int64)v32 <= v33 ); } } } } else { if ( a1->m_isBall ) { v8 = 1; } else { v8 = 1; if ( a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing || !a1->m_jumpBuffered ) return v8; } if ( a1->m_isOnGround ) PlayerObject::updateJump(a1, 0.0); } } else { v8 = 1; if ( (a2 & 0xFFFFFFFE) == 2 ) PlayerObject::switchedDirTo(a1, a2); } return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source