//
// GJMapObject::createMonster from 0x63fd88 to 0x63ff50 (456 bytes)
//
// 2 xrefs:
// > MapSelectLayer::init @ 0x640d32
// > MapSelectLayer::init @ 0x640db6
//
// 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 11:55:27 +0000
//
int *__fastcall GJMapObject::createMonster(GJMapObject *this, int a2)
{
float v3; // s16
GameObject *v4; // r4
void (__fastcall *v5)(GameObject *, _DWORD *); // r2
void (__fastcall *v6)(GameObject *, _DWORD *); // r2
int v7; // r9
cocos2d::CCNode *v8; // r1
void (__fastcall *v9)(GameObject *, _DWORD); // r8
unsigned int v10; // r0
int *v11; // r4
unsigned int v12; // r0
float v13; // r1
cocos2d::CCSequence *v14; // r0
cocos2d::CCSequence *v15; // r8
cocos2d::CCFiniteTimeAction *v16; // r0
cocos2d::CCAction *v17; // r0
_DWORD v19[2]; // [sp+8h] [bp-1Ch] BYREF
int v20[3]; // [sp+10h] [bp-14h] BYREF
if ( this == (GJMapObject *)((char *)&stru_38C.st_size + 2) )
v3 = (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 0.4) + 0.7;
else
v3 = 1.0;
v4 = GameObject::createWithKey(this, a2);
v5 = *(void (__fastcall **)(GameObject *, _DWORD *))(*(_DWORD *)v4 + 792);
LOWORD(v19[0]) = 0;
BYTE2(v19[0]) = 0;
v5(v4, v19);
v6 = *(void (__fastcall **)(GameObject *, _DWORD *))(*(_DWORD *)v4 + 796);
LOWORD(v19[0]) = -1;
BYTE2(v19[0]) = -1;
v6(v4, v19);
(*(void (__fastcall **)(_DWORD, int, int, void *, int, int))(**((_DWORD **)v4 + 320) + 540))(
*((_DWORD *)v4 + 320),
770,
1,
&unk_BEEFF0,
770,
1);
v7 = *(_DWORD *)(*((_DWORD *)v4 + 319) + 532);
std::string::basic_string(v20, *((_DWORD *)v4 + 319) + 552);
SpriteAnimationManager::runAnimation(v7, (unsigned __int8 *)v20);
std::string::~string((int)v20);
if ( this == (GJMapObject *)((char *)&stru_38C.st_size + 2) )
{
SpriteAnimationManager::updateAnimationSpeed(*(_DWORD *)(*((_DWORD *)v4 + 319) + 532), 0.9);
v9 = *(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)v4 + 180);
v10 = rand();
v9(v4, (float)(vcvts_n_f32_s32(v10, 0x1Fu) * 10.0) + 10.0);
(*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)v4 + 80))(v4, v3 * 0.35);
}
else if ( this == (GJMapObject *)((char *)&stru_52C.st_name + 3) )
{
(*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)v4 + 80))(v4, v3 * 0.6);
}
v11 = GJMapObject::create(v4, v8);
if ( this == (GJMapObject *)((char *)&stru_38C.st_size + 2) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, 0.0, v3 * -11.0);
GJMapObject::updateShadow((int)v11, COERCE_INT(v3 * 0.18), COERCE_INT(v3 * 0.5), (int)v19);
v12 = rand();
v14 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(
COERCE_COCOS2D_CCDELAYTIME_(vcvts_n_f32_s32(v12, 0x1Fu) * 0.4),
v13);
v19[1] = 0;
v19[0] = GJMapObject::startMonsterJumpLoop;
v15 = v14;
v16 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v11, GJMapObject::startMonsterJumpLoop, 0);
v17 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v15, v16, 0);
cocos2d::CCNode::runAction((cocos2d::CCNode *)v11, v17);
}
return v11;
}