// // RateStarsLayer::init from 0x569550 to 0x569a24 (1236 bytes) // // 1 xrefs: // > RateStarsLayer::create @ 0x569b98 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:52:30 +0000 // GameManager *__fastcall RateStarsLayer::init(RateStarsLayer *this, int a2, int a3, bool a4) { GameManager *v8; // r0 int v9; // r7 void (__fastcall *v10)(int, _DWORD *); // r9 void (__fastcall *v11)(int, _DWORD *); // r8 unsigned int v12; // r1 cocos2d::CCLabelBMFont *v13; // r1 const char *v14; // r3 cocos2d::CCLabelBMFont *v15; // r2 int v16; // t1 int v17; // r3 int v18; // r3 char *v19; // r1 const char *v20; // r2 cocos2d::CCLabelBMFont *v21; // r0 int v22; // r7 void (__fastcall *v23)(int, _DWORD *); // r8 cocos2d::CCArray *v24; // r0 cocos2d::CCObject *v25; // r0 cocos2d::CCArray *v26; // r0 cocos2d::CCArray *v27; // r7 cocos2d::CCMenu *v28; // r10 int v29; // r0 const char *v30; // r8 cocos2d::CCObject *StarsButton; // r11 cocos2d::CCArray *v32; // r0 const cocos2d::CCPoint *v33; // r11 const cocos2d::CCPoint *v34; // r11 int v35; // r0 int v36; // r0 int v37; // r5 void (__fastcall *v38)(int, _DWORD *); // r11 const char *v39; // r1 ButtonSprite *v40; // r0 cocos2d::CCObject *v41; // r5 const char *v42; // r1 ButtonSprite *v43; // r0 int v44; // r0 const cocos2d::CCPoint *v45; // r8 GameManager *v47; // [sp+14h] [bp-68h] float v48; // [sp+20h] [bp-5Ch] BYREF float v49; // [sp+24h] [bp-58h] _BYTE v50[8]; // [sp+28h] [bp-54h] BYREF char v51[8]; // [sp+30h] [bp-4Ch] BYREF _BYTE v52[8]; // [sp+38h] [bp-44h] BYREF int (__fastcall *v53)(RateStarsLayer *, cocos2d::CCObject *); // [sp+40h] [bp-3Ch] int v54; // [sp+44h] [bp-38h] int (__fastcall *v55)(RateStarsLayer *, cocos2d::CCObject *); // [sp+48h] [bp-34h] int v56; // [sp+4Ch] [bp-30h] _DWORD v57[2]; // [sp+50h] [bp-2Ch] BYREF int v58; // [sp+58h] [bp-24h] BYREF int v59; // [sp+5Ch] [bp-20h] cocos2d::CCLabelBMFont *v60; // [sp+60h] [bp-1Ch] _DWORD v61[4]; // [sp+64h] [bp-18h] BYREF v8 = FLAlertLayer::init(this, 75); v47 = v8; if ( !v8 ) return v47; *((_BYTE *)this + 529) = a4; *((_DWORD *)this + 135) = a2; *((_DWORD *)this + 136) = -1; cocos2d::CCDirector::sharedDirector(v8); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v48); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v61, 0.0, 0.0, 80.0, 80.0); v9 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v61); v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v61, 380.0, 180.0); v10(v9, v61); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v9, -1); v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, v48 * 0.5, v49 * 0.5); v11(v9, v61); v58 = 0; v59 = 0; v60 = nullptr; std::string::__init(&v58, "Rate ", 5u); if ( *((_BYTE *)this + 529) ) { if ( (v58 & 1) != 0 ) { v12 = (v58 & 0xFFFFFFFE) - 1; if ( v12 > 0x10 ) { v13 = v60; v14 = "Advisor: Suggest "; v15 = v60; do { v16 = *(_DWORD *)v14; v14 += 4; *(_DWORD *)v15 = v16; v15 = (cocos2d::CCLabelBMFont *)((char *)v15 + 4); } while ( v14 != " " ); *(_BYTE *)v15 = *v14; *((_BYTE *)&word_10 + (_DWORD)v13 + 1) = 0; if ( (v58 & 1) != 0 ) v17 = 17; else v17 = 34; if ( (v58 & 1) != 0 ) v59 = v17; else LOBYTE(v58) = v17; goto LABEL_15; } v18 = v59; } else { v18 = (int)(unsigned __int8)v58 >> 1; v12 = 10; } std::string::__grow_by_and_replace((int)&v58, v12, 17 - v12, v18, 0, v18, 0x11u, "Advisor: Suggest "); } LABEL_15: if ( a3 ) v19 = "Moons"; else v19 = "Stars"; std::string::append(&v58, v19); if ( (v58 & 1) != 0 ) v21 = v60; else v21 = (cocos2d::CCLabelBMFont *)((char *)&v58 + 1); v22 = cocos2d::CCLabelBMFont::create(v21, "bigFont.fnt", v20); v23 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v22 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, v48 * 0.5, (float)((float)(v49 * 0.5) + 90.0) - 20.0); v23(v22, v61); v24 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))( *((_DWORD *)this + 115), v22); v25 = (cocos2d::CCObject *)cocos2d::CCArray::create(v24); *((_DWORD *)this + 134) = v25; v26 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v25); v27 = (cocos2d::CCArray *)cocos2d::CCArray::create(v26); v28 = (cocos2d::CCMenu *)cocos2d::CCArray::create(v27); v29 = cocos2d::CCMenu::create(v28); *((_DWORD *)this + 111) = v29; (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v29, 10); v30 = (_BYTE *)(&dword_0 + 1); do { v53 = RateStarsLayer::selectRating; v54 = 0; StarsButton = (cocos2d::CCObject *)RateStarsLayer::getStarsButton( (int)this, v30, COERCE_FLOAT(RateStarsLayer::selectRating), 0, *((_DWORD *)this + 111), COERCE_INT(1.0)); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 134), StarsButton); (*(void (__fastcall **)(cocos2d::CCObject *, const char *))(*(_DWORD *)StarsButton + 36))(StarsButton, v30); if ( (int)v30 > 5 ) v32 = v28; else v32 = v27; cocos2d::CCArray::addObject(v32, StarsButton); ++v30; } while ( v30 != &byte_9[2] ); v33 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v57, (float)(v48 * 0.5) - 30.0, (float)((float)(v49 * 0.5) + 23.0) + 3.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v61, v33); GameToolbox::alignItemsHorisontally(*(float *)&v27, 18.0, (int)v61, 0); v34 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v57, (float)(v48 * 0.5) - 30.0, (float)((float)(v49 * 0.5) - 23.0) + 3.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v61, v34); GameToolbox::alignItemsHorisontally(*(float *)&v28, 18.0, (int)v61, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, (float)(v48 * 0.5) - 30.0, v49 * 0.5); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 172.0, 2.0); cocos2d::CCPoint::operator+(v50, v57, v61); v35 = GJDifficultySprite::create(0, 1); *((_DWORD *)this + 140) = v35; (*(void (__fastcall **)(int, int))(*(_DWORD *)v35 + 80))(v35, 1067030938); if ( *((_BYTE *)this + 529) ) { v36 = *((_DWORD *)this + 140); v56 = 0; v55 = RateStarsLayer::onFeature; v37 = CCMenuItemSpriteExtra::create(v36, 0, (int)this, (int)RateStarsLayer::onFeature, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v37); v38 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v37 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v61, *((const cocos2d::CCPoint **)this + 111)); v38(v37, v61); } else { (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))( *((_DWORD *)this + 115), *((_DWORD *)this + 140), 11); (*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 140) + 92))(*((_DWORD *)this + 140), v50); } cocos2d::CCArray::removeAllObjects(v27); v40 = ButtonSprite::create((ButtonSprite *)"Cancel", v39); v57[1] = 0; v57[0] = RateStarsLayer::onClose; v41 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v40, 0, (int)this, (int)RateStarsLayer::onClose, 0); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v41); cocos2d::CCArray::addObject(v27, v41); v43 = ButtonSprite::create((ButtonSprite *)"Submit", v42); v61[1] = 0; v61[0] = RateStarsLayer::onRate; v44 = CCMenuItemSpriteExtra::create((int)v43, 0, (int)this, (int)RateStarsLayer::onRate, 0); *((_DWORD *)this + 133) = v44; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v44); cocos2d::CCArray::addObject(v27, *((cocos2d::CCObject **)this + 133)); v45 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, v48 * 0.5, (float)((float)(v49 * 0.5) - 90.0) + 25.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v52, v45); GameToolbox::alignItemsHorisontally(*(float *)&v27, 15.0, (int)v52, 0); RateStarsLayer::selectRating(this, nullptr); std::string::~string((int)&v58); return v47; }
GD Web Decomp Icon

GD Web Decomp

Raw Source