//
// GJDropDownLayer::hideLayer from 0x1005e8700 to 0x1005e87f8 (248 bytes)
//
// 14 xrefs:
// > ??> @ 0x1008b57f8
// > ??> @ 0x1008b88e8
// > ??> @ 0x1008b9080
// > ??> @ 0x1008fd468
// > ??> @ 0x10091d518
// > ??> @ 0x100922320
// > ??> @ 0x10094f380
// > ??> @ 0x100958498
// > ??> @ 0x10095e640
// > ??> @ 0x100973e78
// > ??> @ 0x100978680
// > ??> @ 0x10097d928
// > ??> @ 0x10098cbf0
// > ??> @ 0x100990778
//
// 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 GJDropDownLayer::hideLayer(GJDropDownLayer *a1, bool a2)
{
GJDropDownLayerDelegate *m_delegate; // rdi
GameManager *v4; // rax
cocos2d::CCMoveTo *v5; // rax
cocos2d::CCEaseInOut *v6; // r14
cocos2d::CCCallFunc *v7; // rax
cocos2d::CCSequence *v8; // rax
cocos2d::CCFadeTo *v9; // rax
if ( a1->m_closeOnHide )
{
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(GJDropDownLayerDelegate *, GJDropDownLayer *))m_delegate->dropDownLayerWillClose)(
m_delegate,
a1);
}
cocos2d::CCNode::stopAllActions(a1->m_mainLayer);
v4 = GameManager::sharedState();
if ( (a2 | GameManager::getGameVariable(v4, "0168")) == 1 )
{
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCPoint *))a1->m_mainLayer->setPosition)(
a1->m_mainLayer,
&a1->m_startPosition);
((void (__fastcall *)(GJDropDownLayer *, _QWORD))a1->setOpacity)(a1, 0);
((void (__fastcall *)(GJDropDownLayer *))a1->layerHidden)(a1);
}
else
{
v5 = cocos2d::CCMoveTo::create(0.5, &a1->m_startPosition);
v6 = cocos2d::CCEaseInOut::create(v5, 2.0);
v7 = cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)0x539uLL);
v8 = sub_1003B5760(v6, v7, 0);
cocos2d::CCNode::runAction(a1->m_mainLayer, v8);
v9 = cocos2d::CCFadeTo::create(0.5, 0);
cocos2d::CCNode::runAction(a1, v9);
}
}