//
// GJChestSprite::create from 0x1001c5b20 to 0x1001c5ba8 (136 bytes)
//
// 15 xrefs:
// > DailyLevelNode::init @ 0x1001bb500
// > GauntletNode::generateNode @ 0x1001c1fd0
// > GauntletNode::generateNode @ 0x1001c2048
// > GauntletNode::generateNode @ 0x1001c228c
// > GauntletNode::generateNode @ 0x1001c2308
// > RewardUnlockLayer::init @ 0x1001c54a0
// > SecretRewardsLayer::init @ 0x1002e8a58
// > SecretRewardsLayer::init @ 0x1002e8fb8
// > SecretRewardsLayer::generateChestItems @ 0x1002eb120
// > SecretLayer3::init @ 0x10030ea14
// > SecretLayer3::init @ 0x10030ec38
// > SecretLayer4::init @ 0x1003546e4
// > GJPathRewardPopup::init @ 0x1003bbad0
// > GJPathRewardPopup::init @ 0x1003bbb40
// > FollowRewardPage::init @ 0x100425024
//
// 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
//
GJChestSprite *__fastcall GJChestSprite::create(int a1)
{
char *v2; // x19
v2 = (char *)operator new(0x260u);
cocos2d::CCSprite::CCSprite(v2);
*(_QWORD *)v2 = &off_1007B8A48;
*((_QWORD *)v2 + 40) = off_1007B8F20;
*((_QWORD *)v2 + 43) = off_1007B8FA0;
v2[604] = 0;
*(_QWORD *)(v2 + 596) = 0;
if ( GJChestSprite::init((GJChestSprite *)v2, a1) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v2);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v2 + 16LL))(v2);
return nullptr;
}
return (GJChestSprite *)v2;
}