//
// GJDropDownLayer::hideLayer from 0x1402574b0 to 0x1402575f9 (329 bytes)
//
// 14 xrefs:
// > ??> @ 0x14053ac28
// > ??> @ 0x14053b118
// > ??> @ 0x14053b700
// > ??> @ 0x14053c3b0
// > ??> @ 0x140555480
// > ??> @ 0x14056c638
// > ??> @ 0x140576e38
// > ??> @ 0x14057f9f8
// > ??> @ 0x1405c4850
// > ??> @ 0x1405cd2a0
// > ??> @ 0x14060d288
// > ??> @ 0x140620680
// > ??> @ 0x140621220
// > ??> @ 0x1406cfa20
//
// 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 GJDropDownLayer::hideLayer(GJDropDownLayer *a1, bool a2)
{
float v2; // xmm3_4
GJDropDownLayerDelegate *m_delegate; // rcx
GameManager *v6; // rcx
struct cocos2d::CCMoveTo *v7; // rax
struct cocos2d::CCEaseInOut *v8; // rbx
__int64 v9; // rax
struct cocos2d::CCSequence *v10; // rax
cocos2d::ccColor3B *v11; // r8
struct cocos2d::CCFadeTo *v12; // rax
cocos2d::ccColor3B *v13; // r8
float v14; // [rsp+20h] [rbp-8h]
void *v15; // [rsp+30h] [rbp+8h]
float v16; // [rsp+50h] [rbp+28h]
if ( a1->m_closeOnHide )
{
m_delegate = a1->m_delegate;
if ( m_delegate )
m_delegate->dropDownLayerWillClose(m_delegate, a1);
}
cocos2d::CCNode::stopAllActions(a1->m_mainLayer);
v6 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v15 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v6, "0168") || a2 )
{
a1->m_mainLayer->setPosition_0(a1->m_mainLayer, &a1->m_startPosition);
a1->setOpacity(&a1->cocos2d::CCRGBAProtocol, 0);
a1->layerHidden(a1);
}
else
{
v7 = cocos2d::CCMoveTo::create(0.5, &a1->m_startPosition);
v8 = cocos2d::CCEaseInOut::create(v7, 2.0);
v9 = cocos2d::CCCallFunc::create(a1, sub_140257644);
v10 = cocos2d::CCSequence::create(v8, v9, 0);
cocos2d::CCNode::runAction((CCLightFlash *)a1->m_mainLayer, (cocos2d::CCPoint)v10, v11, v2, v14);
v12 = cocos2d::CCFadeTo::create(0.5, 0);
cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v12, v13, v2, v16);
}
}