//
// GJRateLevelLayer::createStatPillar from 0x82190c to 0x821c74 (872 bytes)
//
// 3 xrefs:
// > GJRateLevelLayer::setupRateInfo @ 0x821e9c
// > GJRateLevelLayer::setupRateInfo @ 0x82215c
// > ??> @ 0x5b650
//
// 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
//
__int64 __fastcall GJRateLevelLayer::createStatPillar(
__int64 a1,
int a2,
int a3,
int a4,
__int64 a5,
__int64 a6,
__int64 a7,
_QWORD *a8)
{
int v10; // w20
float v11; // s9
cocos2d::CCSprite *v12; // x27
cocos2d::CCSprite *v13; // x28
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26
void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // x26
float *v16; // x0
void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // x26
__int64 v18; // x0
float v19; // s8
float v20; // s8
float height; // s8
float v22; // s0
float v23; // s2
float v24; // s1
float v25; // s0
float v26; // s1
cocos2d::CCLabelBMFont *v28; // x20
void (__fastcall *v29)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21
__int64 v34; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v35; // [xsp+C8h] [xbp+C8h] BYREF
cocos2d::CCPoint v36; // [xsp+D0h] [xbp+D0h] BYREF
cocos2d::CCPoint v37; // [xsp+D8h] [xbp+D8h] BYREF
cocos2d::CCPoint v38; // [xsp+E0h] [xbp+E0h] BYREF
cocos2d::CCPoint v39; // 0:kr00_8.8
v35 = a5;
v34 = a6;
if ( a4 > 0 )
{
v10 = 0;
cocos2d::CCPoint::CCPoint(&v36);
v11 = (float)a3;
do
{
v12 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v13 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v12->addChild_0(v12, v13, 1);
setPosition = v13->setPosition;
v39 = cocos2d::CCNode::convertToNodeSpace(v12, &stru_1242A90);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, float, float))setPosition)(v13, &v38, v39.x, v39.y);
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 448LL))(
*(_QWORD *)(a1 + 576),
v12,
3);
v12->setColor(v12, (const cocos2d::ccColor3B *)&v34);
v13->setColor(v13, (const cocos2d::ccColor3B *)&v35);
setScaleX = v12->setScaleX;
v16 = (float *)v12->getContentSize(v12);
setScaleX(v12, (float)a2 / *v16);
setScaleY = v12->setScaleY;
v18 = (__int64)v12->getContentSize(v12);
setScaleY(v12, v11 / *(float *)(v18 + 4));
v19 = v12->getScaleX(v12);
v20 = v19 / v12->getScaleY(v12);
v13->setScaleX(v13, 0.75);
v13->setScaleY(v13, 0.75 / v20);
height = v12->getContentSize(v12)->height;
v22 = v12->getScaleY(v12);
v23 = (float)v10++;
v24 = (float)(height * v22) * 0.25 * 0.5;
cocos2d::CCPoint::CCPoint(&v37, 0.0, (float)(v11 - v24) * v23);
cocos2d::CCPoint::operator+(&v38, a7, &v37);
cocos2d::CCPoint::operator=(&v36, v25, v26);
v12->setPosition(v12, &v36);
}
while ( v10 != a4 );
if ( *(_QWORD *)(*a8 - 24LL) )
{
v28 = cocos2d::CCLabelBMFont::create();
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 448LL))(
*(_QWORD *)(a1 + 576),
v28,
3);
v28->setColor(v28, (const cocos2d::ccColor3B *)&unk_EEA030);
v28->setOpacity(v28, 125);
v28->setScale(v28, 0.8);
v29 = v28->setPosition;
cocos2d::CCPoint::CCPoint(&v38, v36.x, v36.y + 13.0);
v29(v28, &v38);
}
}
return _stack_chk_guard;
}