{"type": "func", "start": 7695088, "end": 7695560, "name": "AnimatedGameObject::init", "pseudocode": "// \n// AnimatedGameObject::init from 0x756af0 to 0x756cc8 (472 bytes)\n// \n// 2 xrefs:\n// > AnimatedGameObject::create @ 0x7571f8\n// > <???> @ 0x997e0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nbool AnimatedGameObject::init(AnimatedGameObject *a1, int a2)\n{\n  bool v4; // w22\n  const char *v5; // x0\n  CCAnimatedSprite *v6; // x0\n  cocos2d::CCTexture2D *v7; // x0\n  const cocos2d::CCSize *v8; // x0\n  CCAnimatedSprite *m_animatedSprite; // x23\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21\n  cocos2d::CCSize v12; // [xsp+58h] [xbp+58h] BYREF\n  cocos2d::CCPoint v13; // [xsp+60h] [xbp+60h] BYREF\n\n  a1->m_objectID = a2;\n  a1->m_classType = Animated;\n  if ( a2 == 1327 )\n  {\n    v5 = \"GJBeast02\";\n  }\n  else if ( a2 <= 1327 )\n  {\n    if ( a2 == 918 )\n    {\n      v5 = \"GJBeast01\";\n      a1->m_notGrounded = 1;\n    }\n    else\n    {\n      if ( a2 != 919 )\n        return 0;\n      v5 = \"BlackSludge\";\n    }\n  }\n  else\n  {\n    switch ( a2 )\n    {\n      case 1584:\n        v5 = \"GJBeast04\";\n        a1->m_notGrounded = 1;\n        break;\n      case 2012:\n        v5 = \"GJBeast05\";\n        a1->m_notGrounded = 1;\n        break;\n      case 1328:\n        v5 = \"GJBeast03\";\n        break;\n      default:\n        return 0;\n    }\n  }\n  v6 = CCAnimatedSprite::createWithType(v5, nullptr, 0);\n  a1->m_animatedSprite = v6;\n  SpriteAnimationManager::stopAnimations(v6->m_animationManager);\n  a1->m_animatedSprite->m_delegate = &a1->AnimatedSpriteDelegate;\n  v7 = a1->m_animatedSprite->getTexture(a1->m_animatedSprite);\n  v4 = GameObject::initWithTexture(a1, v7);\n  if ( v4 )\n  {\n    AnimatedGameObject::setupAnimatedSize(a1, a2);\n    a1->addChild(a1, a1->m_animatedSprite);\n    v8 = a1->getContentSize(a1);\n    cocos2d::CCSize::CCSize(&v12, v8);\n    m_animatedSprite = a1->m_animatedSprite;\n    setPosition = m_animatedSprite->setPosition;\n    cocos2d::CCPoint::CCPoint(&v13, v12.width * 0.5, v12.height * 0.5);\n    setPosition(m_animatedSprite, &v13);\n    a1->m_bUnkBool2 = 0;\n    a1->m_unk367 = 1;\n    AnimatedGameObject::setupChildSprites(a1);\n  }\n  return v4;\n}", "assembly": "; \n; AnimatedGameObject::init from 0x756af0 to 0x756cc8 (472 bytes)\n; \n; 2 xrefs:\n; > AnimatedGameObject::create @ 0x7571f8\n; > <???> @ 0x997e0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x756af0\nCMP             W1, #0x52F                                             ; +0x4, 0x756af4\nMOV             X29, SP                                                ; +0x8, 0x756af8\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0xc, 0x756afc\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x756b00\nMOV             X19, X0                                                ; +0x14, 0x756b04\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x18, 0x756b08\nSTR             X23, [SP,#0x70+var_40]                                 ; +0x1c, 0x756b0c\nMOV             W21, W1                                                ; +0x20, 0x756b10\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x756b14\nMOV             W1, #2                                                 ; +0x28, 0x756b18\nSTR             W21, [X19,#0x3F4]                                      ; +0x2c, 0x756b1c\nSTR             W1, [X19,#0x4D0]                                       ; +0x30, 0x756b20\nLDR             X0, [X0]                                               ; +0x34, 0x756b24\nSTR             X0, [X29,#0x70+var_8]                                  ; +0x38, 0x756b28\nB.EQ            loc_756CB8                                             ; +0x3c, 0x756b2c\nB.LE            loc_756B54                                             ; +0x40, 0x756b30\nCMP             W21, #0x630                                            ; +0x44, 0x756b34\nB.EQ            loc_756C70                                             ; +0x48, 0x756b38\nCMP             W21, #0x7DC                                            ; +0x4c, 0x756b3c\nB.EQ            loc_756CA4                                             ; +0x50, 0x756b40\nCMP             W21, #0x530                                            ; +0x54, 0x756b44\nB.EQ            loc_756C84                                             ; +0x58, 0x756b48\nMOV             W22, #0                                                ; +0x5c, 0x756b4c\nB               loc_756C44                                             ; +0x60, 0x756b50\nCMP             W21, #0x396                                            ; +0x64, 0x756b54\nB.EQ            loc_756C90                                             ; +0x68, 0x756b58\nCMP             W21, #0x397                                            ; +0x6c, 0x756b5c\nB.NE            loc_756B4C                                             ; +0x70, 0x756b60\nADRL            X0, aBlacksludge; \"BlackSludge\"                        ; +0x74, 0x756b64\nMOV             W2, #0; cocos2d::CCTexture2D *                         ; +0x7c, 0x756b6c\nMOV             X1, #0; char *                                         ; +0x80, 0x756b70\nBL              _ZN16CCAnimatedSprite14createWithTypeEPKcPN7cocos2d11CCTexture2DEb; CCAnimatedSprite::createWithType(char const*,cocos2d::CCTexture2D *,bool) ; +0x84, 0x756b74\nSTR             X0, [X19,#0x5A8]                                       ; +0x88, 0x756b78\nLDR             X0, [X0,#0x268]; this                                  ; +0x8c, 0x756b7c\nBL              _ZN22SpriteAnimationManager14stopAnimationsEv; SpriteAnimationManager::stopAnimations(void) ; +0x90, 0x756b80\nLDR             X0, [X19,#0x5A8]                                       ; +0x94, 0x756b84\nADD             X1, X19, #0x598                                        ; +0x98, 0x756b88\nSTR             X1, [X0,#0x298]                                        ; +0x9c, 0x756b8c\nLDR             X1, [X19,#0x5A8]                                       ; +0xa0, 0x756b90\nMOV             X0, X1                                                 ; +0xa4, 0x756b94\nLDR             X1, [X1]                                               ; +0xa8, 0x756b98\nLDR             X1, [X1,#0x420]                                        ; +0xac, 0x756b9c\nBLR             X1                                                     ; +0xb0, 0x756ba0\nMOV             X1, X0; cocos2d::CCTexture2D *                         ; +0xb4, 0x756ba4\nMOV             X0, X19; this                                          ; +0xb8, 0x756ba8\nBL              _ZN10GameObject15initWithTextureEPN7cocos2d11CCTexture2DE; GameObject::initWithTexture(cocos2d::CCTexture2D *) ; +0xbc, 0x756bac\nUXTB            W22, W0                                                ; +0xc0, 0x756bb0\nCBZ             W22, loc_756C44                                        ; +0xc4, 0x756bb4\nMOV             W1, W21; int                                           ; +0xc8, 0x756bb8\nMOV             X0, X19; this                                          ; +0xcc, 0x756bbc\nADD             X21, X29, #0x70+var_10                                 ; +0xd0, 0x756bc0\nBL              _ZN18AnimatedGameObject17setupAnimatedSizeEi; AnimatedGameObject::setupAnimatedSize(int) ; +0xd4, 0x756bc4\nLDR             X2, [X19]                                              ; +0xd8, 0x756bc8\nMOV             X0, X19                                                ; +0xdc, 0x756bcc\nLDR             X1, [X19,#0x5A8]                                       ; +0xe0, 0x756bd0\nLDR             X2, [X2,#0x1B8]                                        ; +0xe4, 0x756bd4\nBLR             X2                                                     ; +0xe8, 0x756bd8\nLDR             X1, [X19]                                              ; +0xec, 0x756bdc\nMOV             X0, X19                                                ; +0xf0, 0x756be0\nLDR             X1, [X1,#0x138]                                        ; +0xf4, 0x756be4\nBLR             X1                                                     ; +0xf8, 0x756be8\nMOV             X1, X0; cocos2d::CCSize *                              ; +0xfc, 0x756bec\nADD             X0, X29, #0x70+var_18; this                            ; +0x100, 0x756bf0\nBL              _ZN7cocos2d6CCSizeC1ERKS0_; cocos2d::CCSize::CCSize(cocos2d::CCSize const&) ; +0x104, 0x756bf4\nLDR             X23, [X19,#0x5A8]                                      ; +0x108, 0x756bf8\nLDR             S2, [X29,#0x70+var_14]                                 ; +0x10c, 0x756bfc\nMOV             X0, X21; this                                          ; +0x110, 0x756c00\nFMOV            S1, #0.5                                               ; +0x114, 0x756c04\nSTR             X21, [X29,#0x70+var_28]                                ; +0x118, 0x756c08\nLDR             S0, [X29,#0x70+var_18]                                 ; +0x11c, 0x756c0c\nLDR             X2, [X23]                                              ; +0x120, 0x756c10\nFMUL            S0, S0, S1; float                                      ; +0x124, 0x756c14\nFMUL            S1, S2, S1; float                                      ; +0x128, 0x756c18\nLDR             X21, [X2,#0xB8]                                        ; +0x12c, 0x756c1c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x130, 0x756c20\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x134, 0x756c24\nMOV             X0, X23                                                ; +0x138, 0x756c28\nBLR             X21                                                    ; +0x13c, 0x756c2c\nSTRB            WZR, [X19,#0x139]                                      ; +0x140, 0x756c30\nMOV             W1, #1                                                 ; +0x144, 0x756c34\nMOV             X0, X19; this                                          ; +0x148, 0x756c38\nSTRB            W1, [X19,#0x367]                                       ; +0x14c, 0x756c3c\nBL              _ZN18AnimatedGameObject17setupChildSpritesEv; AnimatedGameObject::setupChildSprites(void) ; +0x150, 0x756c40\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x154, 0x756c44\nMOV             W0, W22                                                ; +0x158, 0x756c48\nLDR             X19, [X29,#0x70+var_8]                                 ; +0x15c, 0x756c4c\nLDR             X1, [X20]                                              ; +0x160, 0x756c50\nCMP             X19, X1                                                ; +0x164, 0x756c54\nB.NE            loc_756CC4                                             ; +0x168, 0x756c58\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x16c, 0x756c5c\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x170, 0x756c60\nLDR             X23, [SP,#0x70+var_40]                                 ; +0x174, 0x756c64\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x178, 0x756c68\nRET                                                                    ; +0x17c, 0x756c6c\nADRP            X0, #aGjbeast04@PAGE; \"GJBeast04\"                      ; +0x180, 0x756c70\nMOV             W1, #1                                                 ; +0x184, 0x756c74\nADD             X0, X0, #aGjbeast04@PAGEOFF; \"GJBeast04\"               ; +0x188, 0x756c78\nSTRB            W1, [X19,#0x5D0]                                       ; +0x18c, 0x756c7c\nB               loc_756B6C                                             ; +0x190, 0x756c80\nADRL            X0, aGjbeast03; \"GJBeast03\"                            ; +0x194, 0x756c84\nB               loc_756B6C                                             ; +0x19c, 0x756c8c\nADRP            X0, #aGjbeast01@PAGE; \"GJBeast01\"                      ; +0x1a0, 0x756c90\nMOV             W1, #1                                                 ; +0x1a4, 0x756c94\nADD             X0, X0, #aGjbeast01@PAGEOFF; \"GJBeast01\"               ; +0x1a8, 0x756c98\nSTRB            W1, [X19,#0x5D0]                                       ; +0x1ac, 0x756c9c\nB               loc_756B6C                                             ; +0x1b0, 0x756ca0\nADRP            X0, #aGjbeast05@PAGE; \"GJBeast05\"                      ; +0x1b4, 0x756ca4\nMOV             W1, #1                                                 ; +0x1b8, 0x756ca8\nADD             X0, X0, #aGjbeast05@PAGEOFF; \"GJBeast05\"               ; +0x1bc, 0x756cac\nSTRB            W1, [X19,#0x5D0]                                       ; +0x1c0, 0x756cb0\nB               loc_756B6C                                             ; +0x1c4, 0x756cb4\nADRL            X0, aGjbeast02; \"GJBeast02\"                            ; +0x1c8, 0x756cb8\nB               loc_756B6C                                             ; +0x1d0, 0x756cc0\nBL              .__stack_chk_fail                                      ; +0x1d4, 0x756cc4", "xrefs": ["AnimatedGameObject::create @ 0x7571f8", "<???> @ 0x997e0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}