//
// GJBaseGameLayer::createPlayerCollisionBlock from 0x9aeabc to 0x9aecf8 (572 bytes)
//
// 3 xrefs:
// > PlayLayer::setupHasCompleted @ 0x7081f8
// > LevelEditorLayer::init @ 0x7af098
// > ??> @ 0xeb1e0
//
// 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 12:58:14 +0000
//
__int64 __fastcall GJBaseGameLayer::createPlayerCollisionBlock(GJBaseGameLayer *this)
{
int i; // w23
cocos2d::CCObject *v4; // x20
void (__fastcall *v5)(cocos2d::CCObject *, __int64 *); // x25
__int64 v6; // x25
void (__fastcall *v7)(__int64, _BYTE *); // x28
const cocos2d::CCPoint *v8; // x0
__int64 v9; // x25
void (__fastcall *v10)(__int64, _BYTE *); // x28
const cocos2d::CCPoint *v11; // x0
_BYTE v12[8]; // [xsp+68h] [xbp+68h] BYREF
__int64 v13; // [xsp+70h] [xbp+70h] BYREF
__int64 v14; // [xsp+78h] [xbp+78h]
void *v15; // [xsp+80h] [xbp+80h]
if ( !*((_QWORD *)this + 1530) )
{
for ( i = 1; ; i = 2 )
{
v4 = (cocos2d::CCObject *)GameObject::createWithKey((GameObject *)&elf_hash_bucket[328]);
cocos2d::CCObject::retain(v4);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v4 + 1264LL))(v4);
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, "edit_eCollisionBlock01_001.png", 0x1Eu);
GameObject::addColorSprite((cocos2d::CCObject **)v4, (unsigned __int8 *)&v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
v5 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v4 + 1272LL);
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, "edit_eCollisionBlock01_001.png", 0x1Eu);
v5(v4, &v13);
if ( (v13 & 1) != 0 )
operator delete(v15);
if ( i != 1 )
break;
*((_QWORD *)this + 1530) = v4;
*((_DWORD *)v4 + 420) = 10000;
v9 = *((_QWORD *)this + 1530);
v10 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 1368LL);
v11 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 407) + 192LL))(*((_QWORD *)this + 407));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, v11);
v10(v9, v12);
*((_BYTE *)v4 + 559) = 1;
*((_BYTE *)v4 + 1303) = 1;
(*(void (__fastcall **)(GJBaseGameLayer *, cocos2d::CCObject *))(*(_QWORD *)this + 1344LL))(this, v4);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 411), v4);
}
*((_QWORD *)this + 1531) = v4;
*((_DWORD *)v4 + 420) = 10001;
v6 = *((_QWORD *)this + 1531);
v7 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v6 + 1368LL);
v8 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 408) + 192LL))(*((_QWORD *)this + 408));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, v8);
v7(v6, v12);
*((_BYTE *)v4 + 559) = 1;
*((_BYTE *)v4 + 1303) = 1;
(*(void (__fastcall **)(GJBaseGameLayer *, cocos2d::CCObject *))(*(_QWORD *)this + 1344LL))(this, v4);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 411), v4);
}
return _stack_chk_guard;
}