// // GJRateLevelLayer::selectRating from 0x4531f4 to 0x4532f0 (252 bytes) // // 1 xrefs: // > GJRateLevelLayer::init @ 0x454d0c // // 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 GJRateLevelLayer::selectRating(GJRateLevelLayer *a1, cocos2d::CCObject *a2) { unsigned int v3; // r5 int v4; // r0 int v5; // r6 int v6; // r0 int m_stars; // r10 ButtonSprite *v8; // r7 const char *v9; // r1 int (*getNormalImage)(void); // r3 ButtonSprite *v11; // r0 int v12; // r3 int v13; // r1 int v14; // r3 int v15; // r1 if ( a2 ) a1->m_stars = a2->getTag(a2); else a1->m_stars = -1; v3 = 0; while ( v3 < cocos2d::CCArray::count(a1->m_starButtons) ) { v4 = cocos2d::CCArray::objectAtIndex(a1->m_starButtons, v3++); v5 = v4; v6 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 528))(v4); m_stars = a1->m_stars; v8 = (ButtonSprite *)v6; if ( m_stars == (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 32))(v5) ) v9 = "GJ_button_01.png"; else v9 = "GJ_button_04.png"; ButtonSprite::updateBGImage(v8, v9); } getNormalImage = (int (*)(void))a1->m_submitButton->getNormalImage; if ( a1->m_stars == -1 ) { v11 = (ButtonSprite *)getNormalImage(); v12 = 42662; v13 = 166; } else { v11 = (ButtonSprite *)getNormalImage(); v12 = 0xFFFF; v13 = 255; } ButtonSprite::setColor(v11, (cocos2d::ccColor3B)(v12 | (v13 << 16))); v14 = a1->m_stars; if ( v14 <= 1 ) { v15 = 0; } else if ( v14 == 2 ) { v15 = 1; } else if ( v14 == 3 ) { v15 = 2; } else if ( v14 <= 5 ) { v15 = 3; } else if ( v14 <= 7 ) { v15 = 4; } else if ( v14 <= 9 ) { v15 = 5; } else if ( v14 == 10 ) { v15 = 6; } else { v15 = 0; } if ( v14 == 1 ) v15 = -1; GJDifficultySprite::updateDifficultyFrame(a1->m_difficultySprite, v15, Short); }
GD Web Decomp Icon

GD Web Decomp

Raw Source