//
// cocos2d::CCSprite::initWithTexture from 0x7f1794 to 0x7f18c0 (300 bytes)
//
// 1 xrefs:
// > CCSpriteWithHue::initWithTexture @ 0x3f30ac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:01:05 +0000
//
int __fastcall cocos2d::CCSprite::initWithTexture(
cocos2d::CCSprite *this,
cocos2d::CCTexture2D *a2,
const cocos2d::CCRect *a3,
int a4)
{
int v8; // r10
int v9; // r3
int v10; // r3
cocos2d::CCShaderCache *v11; // r0
void (__fastcall *v12)(cocos2d::CCSprite *, int); // r11
cocos2d::CCShaderCache *v13; // r0
int v14; // r0
void (__fastcall *v16)(cocos2d::CCSprite *, float *); // [sp+4h] [bp-18h]
float v17[2]; // [sp+Ch] [bp-10h] BYREF
v8 = cocos2d::CCNodeRGBA::init(this);
if ( v8 )
{
v9 = *(_DWORD *)this;
*((_DWORD *)this + 73) = 0;
*((_BYTE *)this + 297) = 0;
(*(void (__fastcall **)(cocos2d::CCSprite *, _DWORD))(v9 + 600))(this, 0);
*((_BYTE *)this + 468) = 1;
*((_DWORD *)this + 81) = 1;
*((_DWORD *)this + 82) = 771;
v10 = *(_DWORD *)this;
*((_BYTE *)this + 470) = 0;
*((_BYTE *)this + 469) = 0;
v16 = *(void (__fastcall **)(cocos2d::CCSprite *, float *))(v10 + 148);
cocos2d::CCPoint::CCPoint(v17, 0.5, 0.5);
v16(this, v17);
cocos2d::CCPoint::operator=((float *)this + 89, flt_D2FA58);
*((_BYTE *)this + 298) = 0;
v11 = (cocos2d::CCShaderCache *)memset((char *)this + 372, 0, 0x60u);
*((_BYTE *)this + 408) = -1;
*((_BYTE *)this + 409) = -1;
*((_BYTE *)this + 410) = -1;
*((_BYTE *)this + 411) = -1;
*((_BYTE *)this + 456) = -1;
*((_BYTE *)this + 457) = -1;
*((_BYTE *)this + 458) = -1;
*((_BYTE *)this + 459) = -1;
*((_BYTE *)this + 384) = -1;
*((_BYTE *)this + 385) = -1;
*((_BYTE *)this + 386) = -1;
*((_BYTE *)this + 387) = -1;
*((_BYTE *)this + 432) = -1;
*((_BYTE *)this + 433) = -1;
*((_BYTE *)this + 434) = -1;
*((_BYTE *)this + 435) = -1;
v12 = *(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)this + 332);
v13 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache(v11);
v14 = cocos2d::CCShaderCache::programForKey(v13, "ShaderPositionTextureColor");
v12(this, v14);
(*(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCTexture2D *))(*(_DWORD *)this + 532))(this, a2);
(*(void (__fastcall **)(cocos2d::CCSprite *, const cocos2d::CCRect *, int, char *))(*(_DWORD *)this + 572))(
this,
a3,
a4,
(char *)a3 + 8);
(*(void (__fastcall **)(cocos2d::CCSprite *, _DWORD))(*(_DWORD *)this + 560))(this, 0);
*((_BYTE *)this + 471) = 0;
}
return v8;
}