//
// CCSpriteGrayscale::createWithTexture_1 from 0x1005f0e70 to 0x1005f0f47 (215 bytes)
//
// 0 xrefs:
//
// 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::createWithTexture_1(cocos2d::CCTexture2D *a1)
{
CCSpriteGrayscale *v1; // rax
CCSpriteGrayscale *v2; // rbx
double v3; // xmm0_8
__m128 v5; // [rsp+8h] [rbp-38h] BYREF
_QWORD v6[5]; // [rsp+18h] [rbp-28h] BYREF
v1 = (CCSpriteGrayscale *)operator new(0x298u, &std::nothrow);
if ( !v1 )
return nullptr;
v2 = v1;
__bzero(v1, 664);
cocos2d::CCSprite::CCSprite((__int64)v2, 664);
v2->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCSpriteGrayscale_vtbl *)off_10097A760;
v2->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_10097AC50;
v2->CCSpriteWithHue::cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_10097ACD0;
v3 = sub_10028D180(&v5, (unsigned __int64 *)&unk_1009A3148);
((void (__fastcall *)(_QWORD *, cocos2d::CCTexture2D *, double))a1->getContentSize)(v6, a1, v3);
sub_10028CFF0(&v5.i64[1], v6);
if ( !((unsigned __int8 (__fastcall *)(CCSpriteGrayscale *, cocos2d::CCTexture2D *, __m128 *))v2->initWithTexture_0)(
v2,
a1,
&v5) )
{
((void (__fastcall *)(CCSpriteGrayscale *))v2->~CCSpriteGrayscale_0)(v2);
return nullptr;
}
cocos2d::CCObject::autorelease(v2);
return v2;
}