// // RateStarsLayer::selectRating from 0x1403ca910 to 0x1403caaf7 (487 bytes) // // 6 xrefs: // > RateStarsLayer::init @ 0x1403ca880 // > RateStarsLayer::init @ 0x1403ca479 // > @ 0x14069badc // > @ 0x14069bb18 // > @ 0x14069bb28 // > @ 0x1406d7a90 // // 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 RateStarsLayer::selectRating(RateStarsLayer *a1, cocos2d::CCObject *a2) { int v3; // eax int v4; // esi unsigned int i; // r14d struct cocos2d::CCObject *v6; // rbx ButtonSprite *v7; // rdi int v8; // eax const char *v9; // rdx CCMenuItemSpriteExtra *m_submitButton; // rcx char v11; // al cocos2d::CCNode *v12; // rbx cocos2d::CCComponentContainer *m_pComponentContainer; // rcx __int64 v14; // rcx cocos2d::CCNode_vtbl *v15; // rcx int m_starsRate; // eax bool v17; // zf __int16 v18; // [rsp+50h] [rbp+8h] BYREF char v19; // [rsp+52h] [rbp+Ah] if ( a2 ) v3 = a2->getTag(a2); else v3 = -1; v4 = 0; a1->m_starsRate = v3; for ( i = 0; i < cocos2d::CCArray::count(a1->m_buttons); ++i ) { v6 = cocos2d::CCArray::objectAtIndex(a1->m_buttons, i); v7 = (ButtonSprite *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v6->__vftable[13].copyWithZone)(v6); v8 = v6->getTag(v6); v9 = "GJ_button_04.png"; if ( a1->m_starsRate == v8 ) v9 = "GJ_button_01.png"; ButtonSprite::updateBGImage(v7, v9); } m_submitButton = a1->m_submitButton; if ( a1->m_starsRate == -1 ) { v18 = -22874; v11 = -90; } else { v18 = -1; v11 = -1; } v19 = v11; v12 = m_submitButton->getNormalImage(m_submitButton); m_pComponentContainer = v12[1].m_pComponentContainer; if ( m_pComponentContainer ) ((void (__fastcall *)(cocos2d::CCDictionary **, __int16 *))m_pComponentContainer[15].m_pComponents->__vftable)( &m_pComponentContainer[15].m_pComponents, &v18); v14 = *(_QWORD *)&v12[1].m_bUseChildIndex; if ( v14 ) (**(void (__fastcall ***)(__int64, __int16 *))(v14 + 320))(v14 + 320, &v18); v15 = *(cocos2d::CCNode_vtbl **)&v12[2].m_uID; if ( v15 || (v15 = v12[2].__vftable) != nullptr ) (*(void (__fastcall **)(__int64, __int16 *))v15->setVisible)((__int64)&v15->setVisible, &v18); m_starsRate = a1->m_starsRate; v17 = m_starsRate == 1; if ( m_starsRate > 1 ) { if ( m_starsRate == 2 ) { v4 = 1; } else if ( m_starsRate == 3 ) { v4 = 2; } else if ( m_starsRate > 5 ) { if ( m_starsRate > 7 ) { if ( m_starsRate > 9 ) { if ( m_starsRate == 10 ) v4 = 6; } else { v4 = 5; } } else { v4 = 4; } } else { v4 = 3; } v17 = m_starsRate == 1; } if ( v17 ) v4 = -1; GJDifficultySprite::updateDifficultyFrame(a1->m_difficultySprite, v4, Short); }
GD Web Decomp Icon

GD Web Decomp

Raw Source