//
// GJDifficultySprite::updateDifficultyFrame from 0x1402a5150 to 0x1402a526e (286 bytes)
//
// 4 xrefs:
// > GJRateLevelLayer::selectRating @ 0x1402f6aa2
// > LevelInfoLayer::updateLabelValues @ 0x1402ffb19
// > RateStarsLayer::selectRating @ 0x1403caaf2
// > ??> @ 0x1406d2078
//
// 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
//
// Hidden C++ exception states: #wind=1
void GJDifficultySprite::updateDifficultyFrame(GJDifficultySprite *a1, int a2, GJDifficultyName a3)
{
float v3; // xmm0_4
void **DifficultyFrame; // rax
__int64 v6; // rcx
const char *v7; // rsi
GJDifficultySprite_vtbl *v8; // rbx
cocos2d::CCSpriteFrameCache *v9; // rax
struct cocos2d::CCSpriteFrame *v10; // rax
const cocos2d::CCSize *v11; // rax
unsigned int i; // ebx
struct cocos2d::CCObject *v13; // rax
char v14; // [rsp+20h] [rbp-58h] BYREF
void *Src[4]; // [rsp+28h] [rbp-50h] BYREF
DifficultyFrame = GJDifficultySprite::getDifficultyFrame(Src, a2, a3);
v7 = (const char *)DifficultyFrame;
if ( (unsigned __int64)DifficultyFrame[3] > 0xF )
v7 = (const char *)*DifficultyFrame;
v8 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v9 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6);
v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v7);
v8->setDisplayFrame(a1, v10);
sub_14003A830((__int64)Src);
if ( a1->m_pChildren )
{
a1->getContentSize(a1);
v11 = a1->getContentSize(a1);
cocos2d::CCPoint::CCPoint(v3, v11->width * 0.5);
for ( i = 0; i < cocos2d::CCArray::count(a1->m_pChildren); ++i )
{
v13 = cocos2d::CCArray::objectAtIndex(a1->m_pChildren, i);
v13->__vftable[2].encodeWithCoder(v13, (DS_Dictionary *)&v14);
}
}
}