//
// GJUINode::toggleModeB from 0x1004caff0 to 0x1004cb0ee (254 bytes)
//
// 3 xrefs:
// > UIOptionsLayer::valueDidChange @ 0x1002b4a34
// > GJUINode::loadFromConfig @ 0x1004c8997
// > GJUINode::init @ 0x1004cad29
//
// 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 __fastcall GJUINode::toggleModeB(GJUINode *a1, bool a2)
{
cocos2d::CCSprite *m_firstSprite; // r14
cocos2d::CCSpriteFrameCache *v3; // rax
const char *v4; // rsi
cocos2d::CCSpriteFrame *v5; // rax
cocos2d::CCSprite *m_secondSprite; // r14
cocos2d::CCSpriteFrameCache *v7; // rax
const char *v8; // rsi
cocos2d::CCSpriteFrame *v9; // rax
if ( a1->m_secondSprite )
{
a1->m_modeB = a2;
((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_firstSprite->setVisible)(a1->m_firstSprite, !a2);
((void (__fastcall *)(cocos2d::CCSprite *, bool))a1->m_secondSprite->setVisible)(a1->m_secondSprite, !a1->m_modeB);
m_firstSprite = a1->m_firstSprite;
v3 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( a1->m_modeB )
{
v4 = "PBtn_Arrow_001.png";
}
else if ( a1->m_oneButton )
{
v4 = "PBtn_Jump_001.png";
}
else
{
v4 = "PBtn_Move_001.png";
if ( a1->m_split )
v4 = "PBtn_Jump_001.png";
}
v5 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v3, v4);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_firstSprite->setDisplayFrame)(
m_firstSprite,
v5);
m_secondSprite = a1->m_secondSprite;
if ( m_secondSprite )
{
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "PBtn_Move_001.png";
if ( a1->m_split )
v8 = "PBtn_Jump_001.png";
v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, v8);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_secondSprite->setDisplayFrame)(
m_secondSprite,
v9);
}
}
}