//
// GJRateLevelLayer::createStatPillar from 0x453c5c to 0x453e96 (570 bytes)
//
// 2 xrefs:
// > GJRateLevelLayer::setupRateInfo @ 0x454106
// > GJRateLevelLayer::setupRateInfo @ 0x4543e4
//
// 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
//
int __fastcall GJRateLevelLayer::createStatPillar(
int result,
int a2,
int a3,
int a4,
cocos2d::ccColor3B a5,
cocos2d::ccColor3B a6,
int a7,
int *a8)
{
int v8; // r7
int v11; // r6
cocos2d::CCSprite *v12; // r4
cocos2d::CCSprite *v13; // r9
float *v14; // r0
int v15; // r0
float v16; // s16
float v17; // s16
float height; // s16
float v19; // s14
int v20; // s15
int v21; // r2
cocos2d::CCLabelBMFont *v22; // r4
void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
int v25; // [sp+4h] [bp-30h]
int *v26; // [sp+8h] [bp-2Ch]
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-28h]
void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // [sp+Ch] [bp-28h]
void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // [sp+Ch] [bp-28h]
cocos2d::CCPoint v30; // [sp+14h] [bp-20h] BYREF
cocos2d::CCPoint v31; // [sp+1Ch] [bp-18h] BYREF
cocos2d::CCPoint v32; // [sp+24h] [bp-10h] BYREF
v8 = result;
v25 = a7;
v26 = a8;
if ( a4 > 0 )
{
cocos2d::CCPoint::CCPoint(&v30);
v11 = 0;
do
{
v12 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v13 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v12->addChild_0(v12, v13, 1);
setPosition = v13->setPosition;
cocos2d::CCNode::convertToNodeSpace(&v32, v12, &stru_AC65F8);
setPosition(v13, &v32);
(*(void (__fastcall **)(_DWORD, cocos2d::CCSprite *, int))(**(_DWORD **)(v8 + 456) + 224))(
*(_DWORD *)(v8 + 456),
v12,
3);
v12->setColor(v12, &a6);
v13->setColor(v13, &a5);
setScaleX = v12->setScaleX;
v14 = (float *)v12->getContentSize(v12);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScaleX)(v12, (float)a2 / *v14);
setScaleY = v12->setScaleY;
v15 = (int)v12->getContentSize(v12);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScaleY)(v12, (float)a3 / *(float *)(v15 + 4));
v16 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v12->getScaleX)(v12));
v17 = v16 / COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCSprite *))v12->getScaleY)(v12));
((void (__fastcall *)(cocos2d::CCSprite *, int))v13->setScaleX)(v13, 1061158912);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v13->setScaleY)(v13, 0.75 / v17);
height = v12->getContentSize(v12)->height;
v19 = (float)(height * v12->getScaleY(v12)) * 0.25 * 0.5;
v20 = v11++;
cocos2d::CCPoint::CCPoint(&v31, 0.0, (float)((float)a3 - v19) * (float)v20);
cocos2d::CCPoint::operator+(&v32, v25, &v31);
cocos2d::CCPoint::operator=((PlayerObject *)&v30, COERCE_FLOAT(&v32), v21, (bool)&v30);
v12->setPosition(v12, &v30);
}
while ( v11 != a4 );
result = *v26;
if ( *(_DWORD *)(*v26 - 12) )
{
v22 = cocos2d::CCLabelBMFont::create();
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**(_DWORD **)(v8 + 456) + 224))(
*(_DWORD *)(v8 + 456),
v22,
3);
v22->setColor(v22, (const cocos2d::ccColor3B *)&unk_9AB776);
v22->setOpacity(v22, 125);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v22->setScale)(v22, 1061997773);
v23 = v22->setPosition;
cocos2d::CCPoint::CCPoint(&v32, v30.x, v30.y + 13.0);
return ((int (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))v23)(v22, &v32);
}
}
return result;
}