// // AnimatedGameObject::init from 0x1001b6450 to 0x1001b65ea (410 bytes) // // 1 xrefs: // > AnimatedGameObject::create @ 0x1001b6411 // // 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 AnimatedGameObject::init(AnimatedGameObject *a1, int a2) { bool v3; // r15 const char *v4; // rdi CCAnimatedSprite *v5; // rax CCAnimatedSprite *m_animatedSprite; // rdi cocos2d::CCTexture2D *v7; // rax __int64 v8; // rax CCAnimatedSprite *v9; // r14 _BYTE v11[8]; // [rsp+8h] [rbp-28h] BYREF float v12[8]; // [rsp+10h] [rbp-20h] BYREF a1->m_classType = Animated; a1->m_objectID = a2; v3 = 0; if ( a2 > 1327 ) { switch ( a2 ) { case 1328: v4 = "GJBeast03"; break; case 1584: a1->m_notGrounded = 1; v4 = "GJBeast04"; break; case 2012: a1->m_notGrounded = 1; v4 = "GJBeast05"; break; default: return v3; } } else { switch ( a2 ) { case 918: a1->m_notGrounded = 1; v4 = "GJBeast01"; break; case 919: v4 = "BlackSludge"; break; case 1327: v4 = "GJBeast02"; break; default: return v3; } } v3 = 0; v5 = CCAnimatedSprite::createWithType(v4, nullptr, 0); a1->m_animatedSprite = v5; SpriteAnimationManager::stopAnimations(v5->m_animationManager); m_animatedSprite = a1->m_animatedSprite; m_animatedSprite->m_delegate = &a1->AnimatedSpriteDelegate; v7 = (cocos2d::CCTexture2D *)((__int64 (__fastcall *)(CCAnimatedSprite *))m_animatedSprite->getTexture)(m_animatedSprite); if ( GameObject::initWithTexture(a1, v7) ) { AnimatedGameObject::setupAnimatedSize(a1, a2); ((void (__fastcall *)(AnimatedGameObject *, CCAnimatedSprite *))a1->addChild)(a1, a1->m_animatedSprite); v8 = ((__int64 (__fastcall *)(AnimatedGameObject *))a1->getContentSize)(a1); sub_10028CFC0(v12, v8); v9 = a1->m_animatedSprite; sub_10028CBE0(v11, v12[0] * 0.5, 0.5 * v12[1]); ((void (__fastcall *)(CCAnimatedSprite *, _BYTE *))v9->setPosition)(v9, v11); a1->m_unk367 = 1; a1->m_bUnkBool2 = 0; AnimatedGameObject::setupChildSprites(a1); return 1; } return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source