//
// GJBigSprite::init from 0xac3bb8 to 0xac3f38 (896 bytes)
//
// 3 xrefs:
// > GJBigSprite::create @ 0xac3f8c
// > ??> @ 0x79648
// > ??> @ 0x14ab360
//
// 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:06 +0000
//
__int64 __fastcall GJBigSprite::init(GJBigSprite *this)
{
cocos2d::CCObject *v3; // x0
unsigned __int64 v4; // x20
signed int v5; // w22
const char *v6; // x1
__int64 v7; // x0
float v8; // s9
float v9; // s10
size_t v10; // x25
size_t v11; // x0
__int64 v12; // x1
GJBigSpriteNode *v13; // x0
int v14; // w24
__int64 *v15; // x23
float v16; // s8
void (__fastcall *v17)(__int64 *, _QWORD *); // x25
size_t v18; // x25
size_t v19; // x24
unsigned __int8 v20; // [xsp+AFh] [xbp+AFh]
const void *v21; // [xsp+B8h] [xbp+B8h]
_BYTE v22[8]; // [xsp+C8h] [xbp+C8h] BYREF
_BYTE v23[8]; // [xsp+D0h] [xbp+D0h] BYREF
_QWORD v24[2]; // [xsp+D8h] [xbp+D8h] BYREF
size_t v25; // [xsp+E8h] [xbp+E8h] BYREF
unsigned __int64 v26; // [xsp+F0h] [xbp+F0h]
_BYTE *v27; // [xsp+F8h] [xbp+F8h]
_BYTE v28[21]; // [xsp+100h] [xbp+100h] BYREF
__int16 v29; // [xsp+115h] [xbp+115h]
v20 = cocos2d::CCNode::init(this);
if ( v20 )
{
v3 = (cocos2d::CCObject *)cocos2d::CCArray::create((cocos2d::CCArray *)v20);
*((_QWORD *)this + 43) = v3;
v4 = 0;
cocos2d::CCObject::retain(v3);
v5 = 1;
std::vector::resize((const void **)this + 40, 0x384u, 0);
v7 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"mapimages/image_small.png", v6);
v8 = *(float *)(v7 + 432) / 30.0;
v9 = *(float *)(v7 + 436) / 30.0;
*((float *)this + 88) = 1.0 / (float)(v8 / 120.0);
*((float *)this + 89) = 1.0 / (float)(v9 / 50.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, 0.0, 1500.0);
do
{
v12 = *((_QWORD *)this + 40);
v13 = (GJBigSpriteNode *)(*(_QWORD *)(v12 + 8 * (v4 >> 6)) & ~(1LL << (v4 & 0x3F)));
*(_QWORD *)(v12 + 8 * (v4 >> 6)) = v13;
v14 = vcvtms_s32_f32((float)((int)v4 / 30));
v15 = (__int64 *)GJBigSpriteNode::create(v13);
v16 = (float)((int)v4 % 30);
v17 = *(void (__fastcall **)(__int64 *, _QWORD *))(*v15 + 184);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v23,
(float)(v16 * 120.0) + 60.0,
(float)((float)-v14 * 50.0) + -25.0);
cocos2d::CCPoint::operator+(v24, v22);
v17(v15, v24);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v24, v8 * v16, (float)v14 * v9, v8, v9);
cocos2d::CCRect::operator=(v15 + 44, v24);
v26 = 500;
v27 = v28;
v25 = 21;
qmemcpy(v28, "mapimages/image_part_", sizeof(v28));
if ( v5 <= 9 )
{
v29 = 12336;
v25 = 23;
}
else if ( v5 <= 99 )
{
LOBYTE(v29) = aAssertionFaile_0[72];
v25 = 22;
}
LODWORD(v24[0]) = v5;
fmt::BasicWriter::FormatInt,char>>(&v25, v5);
v18 = v25;
v19 = v25 + 4;
if ( v25 + 4 > v26 )
fmt::internal::Array::grow(&v25, v25 + 4);
v25 = v19;
*(_DWORD *)&v27[v18] = *(_DWORD *)".png";
v10 = v25;
if ( v26 < v25 + 1 )
fmt::internal::Array::grow(&v25, v25 + 1);
v27[v10] = 0;
v21 = v27;
v11 = strlen(v27);
std::string::assign(v15 + 40, v21, v11);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 43), (cocos2d::CCObject *)v15);
if ( v27 != v28 && v27 )
operator delete[](v27);
++v4;
++v5;
}
while ( v4 != 900 );
}
return v20;
}