//
// GJSmartBlockPreview::init from 0xb10354 to 0xb10420 (204 bytes)
//
// 2 xrefs:
// > GJSmartBlockPreview::create @ 0xb104b0
// > ??> @ 0x54df0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:01:28 +0000
//
__int64 __fastcall GJSmartBlockPreview::init(cocos2d::CCNode *a1, __int64 a2)
{
unsigned __int8 v4; // w0
unsigned int v5; // w21
void (__fastcall *v7)(cocos2d::CCNode *, _BYTE *); // x23
__int64 *v8; // x0
_BYTE v9[8]; // [xsp+50h] [xbp+50h] BYREF
v4 = cocos2d::CCNode::init(a1);
v5 = v4;
if ( v4 )
{
v7 = *(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_QWORD *)a1 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v9, 90.0, 90.0);
v7(a1, v9);
v8 = (__int64 *)((char *)a1 + 320);
if ( (cocos2d::CCNode *)((char *)a1 + 320) != (cocos2d::CCNode *)a2 )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
std::string::assign(v8, *(const void **)(a2 + 16), *(_QWORD *)(a2 + 8));
else
std::string::assign(v8, (const void *)(a2 + 1), *(_BYTE *)a2 >> 1);
}
}
return v5;
}