//
// GJMGLayer::create from 0x1005ebc50 to 0x1005ebd4a (250 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::swapMiddleground @ 0x100114a96
// > GJBaseGameLayer::createMiddleground @ 0x100114b66
// > GJBaseGameLayer::asyncMGLoaded @ 0x100114c06
// > GJBaseGameLayer::syncBGTextures @ 0x10015900f
//
// 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
//
GJMGLayer *__fastcall GJMGLayer::create(int a1)
{
char *v1; // rbx
v1 = (char *)operator new(0x1E8u);
cocos2d::CCLayer::CCLayer((__int64)v1);
*(_QWORD *)v1 = off_100979BA0;
*((_QWORD *)v1 + 40) = off_10097A028;
*((_QWORD *)v1 + 41) = &off_10097A098;
*((_QWORD *)v1 + 42) = off_10097A0B0;
*((_QWORD *)v1 + 43) = off_10097A0D0;
*((_QWORD *)v1 + 44) = off_10097A0F0;
*((_QWORD *)v1 + 54) = 0;
v1[440] = 0;
*((_DWORD *)v1 + 111) = 0;
*(_OWORD *)(v1 + 408) = 0;
*((_DWORD *)v1 + 106) = 0;
*((_WORD *)v1 + 224) = 257;
*((_DWORD *)v1 + 113) = 0;
*(_DWORD *)(v1 + 455) = 0;
*((_OWORD *)v1 + 29) = 0;
*((_QWORD *)v1 + 60) = 0;
if ( GJMGLayer::init((GJMGLayer *)v1, a1) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v1);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v1 + 16LL))(v1);
return nullptr;
}
return (GJMGLayer *)v1;
}