//
// GJOptionsLayer::GJOptionsLayer from 0x4aa0a0 to 0x4aa196 (246 bytes)
//
// 6 xrefs:
// > GJOptionsLayer::create @ 0x4ab7d2
// > EditorOptionsLayer::create @ 0x4ab824
// > GameOptionsLayer::create @ 0x4b17be
// > GameLevelOptionsLayer::create @ 0x4b1ac2
// > LevelOptionsLayer::create @ 0x573066
// > LevelOptionsLayer2::create @ 0x5731d6
//
// 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
//
// Alternative name is '_ZN14GJOptionsLayerC1Ev'
GJOptionsLayer *GJOptionsLayer::GJOptionsLayer(GJOptionsLayer *a1)
{
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::size_type v2; // r0
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::__bucket_type *p_M_single_bucket; // r6
size_t v4; // r5
SetupTriggerPopup::SetupTriggerPopup(a1);
a1->m_togglesPerPage = 10;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJOptionsLayer_vtbl *)&off_A6C068;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&off_A6C35C;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_A6C394;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&off_A6C3A0;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_A6C3B0;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&off_A6C3C0;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_A6C3D4;
a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&off_A6C414;
a1->SetupTriggerPopup::TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&off_A6C424;
a1->SetupTriggerPopup::ConfigureValuePopupDelegate::__vftable = (ConfigureValuePopupDelegate_vtbl *)&off_A6C448;
a1->SetupTriggerPopup::SliderDelegate::__vftable = (SliderDelegate_vtbl *)&off_A6C454;
a1->m_maxLabelScale = 0.5;
a1->m_gap = 48.0;
a1->m_maxLabelWidth = 130.0;
a1->m_page = -1;
a1->m_offset = 0.0;
a1->m_toggleCount = 0;
a1->m_maxPage = 0;
a1->m_toggleButtons._M_h._M_before_begin._M_nxt = nullptr;
a1->m_toggleButtons._M_h._M_element_count = 0;
a1->m_toggleButtons._M_h._M_rehash_policy._M_max_load_factor = 1.0;
a1->m_toggleButtons._M_h._M_rehash_policy._M_next_resize = 0;
v2 = sub_773A14(&a1->m_toggleButtons._M_h._M_rehash_policy, 10);
a1->m_toggleButtons._M_h._M_bucket_count = v2;
if ( v2 == 1 )
{
p_M_single_bucket = &a1->m_toggleButtons._M_h._M_single_bucket;
a1->m_toggleButtons._M_h._M_single_bucket = nullptr;
}
else
{
if ( v2 >= 0x40000000 )
sub_772FB4(v2);
v4 = 4 * v2;
p_M_single_bucket = (std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::__bucket_type *)operator new(4 * v2);
memset(p_M_single_bucket, 0, v4);
}
a1->m_toggleButtons._M_h._M_buckets = p_M_single_bucket;
return a1;
}