//
// CCSpriteGrayscale::createWithSpriteFrame from 0x1001a3e98 to 0x1001a3f68 (208 bytes)
//
// 1 xrefs:
// > CCSpriteGrayscale::createWithSpriteFrameName @ 0x1001a3fb4
//
// 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
//
CCSpriteGrayscale *__fastcall CCSpriteGrayscale::createWithSpriteFrame(cocos2d::CCSpriteFrame *a1)
{
CCSpriteGrayscale *v2; // x0
CCSpriteGrayscale *v3; // x19
__int64 (__fastcall **v4)(); // x8
cocos2d::CCTexture2D *Texture; // x0
char v6; // w21
v2 = (CCSpriteGrayscale *)operator new(0x298u, &std::nothrow);
v3 = v2;
if ( v2 )
{
bzero(v2, 0x298u);
cocos2d::CCSprite::CCSprite(v3);
v4 = &off_1007ACFD0;
v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCSpriteGrayscale_vtbl *)&off_1007ACFD0;
v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_1007AD4C0;
v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_1007AD540;
if ( a1 )
{
Texture = cocos2d::CCSpriteFrame::getTexture(a1);
v6 = ((__int64 (__fastcall *)(CCSpriteGrayscale *, cocos2d::CCTexture2D *, cocos2d::CCRect *))v3->initWithTexture_0)(
v3,
Texture,
&a1->m_obRect);
((void (__fastcall *)(CCSpriteGrayscale *, cocos2d::CCSpriteFrame *))v3->setDisplayFrame)(v3, a1);
if ( (v6 & 1) != 0 )
{
cocos2d::CCObject::autorelease(v3);
return v3;
}
v4 = (__int64 (__fastcall **)())v3->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
}
((void (__fastcall *)(CCSpriteGrayscale *))v4[2])(v3);
return nullptr;
}
return v3;
}