//
// cocos2d::CCImage::_initWithRawData from 0x18007b920 to 0x18007b9b7 (151 bytes)
//
// 6 xrefs:
// > cocos2d::CCImage::initWithImageData @ 0x18007ca55
// > ??> @ 0x18013c050
// > ??> @ 0x18013c064
// > ??> @ 0x18013c074
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b4d4c
//
// 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
//
bool __fastcall cocos2d::CCImage::_initWithRawData(
cocos2d::CCImage *this,
void *a2,
__int64 a3,
int a4,
int a5,
int a6,
bool a7)
{
size_t v9; // rdi
unsigned __int8 *v10; // rax
if ( a4 && a5 )
{
this->m_nWidth = a4;
this->m_nBitsPerComponent = a6;
this->m_nHeight = a5;
v9 = 4 * a5 * a4;
this->m_bHasAlpha = 1;
this->m_bPreMulti = a7;
v10 = (unsigned __int8 *)operator new(v9);
this->m_pData = v10;
if ( v10 )
{
memcpy(v10, a2, v9);
LOBYTE(v10) = 1;
}
}
else
{
LOBYTE(v10) = 0;
}
return (char)v10;
}