{"type": "func", "start": 4296762448, "end": 4296762858, "name": "AnimatedGameObject::init", "pseudocode": "// \n// AnimatedGameObject::init from 0x1001b6450 to 0x1001b65ea (410 bytes)\n// \n// 1 xrefs:\n// > AnimatedGameObject::create @ 0x1001b6411\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 __fastcall AnimatedGameObject::init(AnimatedGameObject *a1, int a2)\n{\n  bool v3; // r15\n  const char *v4; // rdi\n  CCAnimatedSprite *v5; // rax\n  CCAnimatedSprite *m_animatedSprite; // rdi\n  cocos2d::CCTexture2D *v7; // rax\n  __int64 v8; // rax\n  CCAnimatedSprite *v9; // r14\n  _BYTE v11[8]; // [rsp+8h] [rbp-28h] BYREF\n  float v12[8]; // [rsp+10h] [rbp-20h] BYREF\n\n  a1->m_classType = Animated;\n  a1->m_objectID = a2;\n  v3 = 0;\n  if ( a2 > 1327 )\n  {\n    switch ( a2 )\n    {\n      case 1328:\n        v4 = \"GJBeast03\";\n        break;\n      case 1584:\n        a1->m_notGrounded = 1;\n        v4 = \"GJBeast04\";\n        break;\n      case 2012:\n        a1->m_notGrounded = 1;\n        v4 = \"GJBeast05\";\n        break;\n      default:\n        return v3;\n    }\n  }\n  else\n  {\n    switch ( a2 )\n    {\n      case 918:\n        a1->m_notGrounded = 1;\n        v4 = \"GJBeast01\";\n        break;\n      case 919:\n        v4 = \"BlackSludge\";\n        break;\n      case 1327:\n        v4 = \"GJBeast02\";\n        break;\n      default:\n        return v3;\n    }\n  }\n  v3 = 0;\n  v5 = CCAnimatedSprite::createWithType(v4, nullptr, 0);\n  a1->m_animatedSprite = v5;\n  SpriteAnimationManager::stopAnimations(v5->m_animationManager);\n  m_animatedSprite = a1->m_animatedSprite;\n  m_animatedSprite->m_delegate = &a1->AnimatedSpriteDelegate;\n  v7 = (cocos2d::CCTexture2D *)((__int64 (__fastcall *)(CCAnimatedSprite *))m_animatedSprite->getTexture)(m_animatedSprite);\n  if ( GameObject::initWithTexture(a1, v7) )\n  {\n    AnimatedGameObject::setupAnimatedSize(a1, a2);\n    ((void (__fastcall *)(AnimatedGameObject *, CCAnimatedSprite *))a1->addChild)(a1, a1->m_animatedSprite);\n    v8 = ((__int64 (__fastcall *)(AnimatedGameObject *))a1->getContentSize)(a1);\n    sub_10028CFC0(v12, v8);\n    v9 = a1->m_animatedSprite;\n    sub_10028CBE0(v11, v12[0] * 0.5, 0.5 * v12[1]);\n    ((void (__fastcall *)(CCAnimatedSprite *, _BYTE *))v9->setPosition)(v9, v11);\n    a1->m_unk367 = 1;\n    a1->m_bUnkBool2 = 0;\n    AnimatedGameObject::setupChildSprites(a1);\n    return 1;\n  }\n  return v3;\n}", "assembly": "; \n; AnimatedGameObject::init from 0x1001b6450 to 0x1001b65ea (410 bytes)\n; \n; 1 xrefs:\n; > AnimatedGameObject::create @ 0x1001b6411\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\npush    rbp                                                            ; +0x0, 0x1001b6450\nmov     rbp, rsp                                                       ; +0x1, 0x1001b6451\npush    r15                                                            ; +0x4, 0x1001b6454\npush    r14                                                            ; +0x6, 0x1001b6456\npush    rbx                                                            ; +0x8, 0x1001b6458\nsub     rsp, 18h                                                       ; +0x9, 0x1001b6459\nmov     r14d, esi                                                      ; +0xd, 0x1001b645d\nmov     rbx, rdi                                                       ; +0x10, 0x1001b6460\nmov     dword ptr [rdi+4E0h], 2                                        ; +0x13, 0x1001b6463\nmov     [rdi+404h], esi                                                ; +0x1d, 0x1001b646d\nxor     r15d, r15d                                                     ; +0x23, 0x1001b6473\ncmp     esi, 52Fh                                                      ; +0x26, 0x1001b6476\njg      short loc_1001B64A6                                            ; +0x2c, 0x1001b647c\ncmp     r14d, 396h                                                     ; +0x2e, 0x1001b647e\njz      short loc_1001B64D5                                            ; +0x35, 0x1001b6485\ncmp     r14d, 397h                                                     ; +0x37, 0x1001b6487\njz      short loc_1001B64EE                                            ; +0x3e, 0x1001b648e\ncmp     r14d, 52Fh                                                     ; +0x40, 0x1001b6490\njnz     loc_1001B65DC                                                  ; +0x47, 0x1001b6497\nlea     rdi, aGjbeast02; \"GJBeast02\"                                   ; +0x4d, 0x1001b649d\njmp     short loc_1001B6505                                            ; +0x54, 0x1001b64a4\ncmp     r14d, 530h                                                     ; +0x56, 0x1001b64a6\njz      short loc_1001B64E5                                            ; +0x5d, 0x1001b64ad\ncmp     r14d, 630h                                                     ; +0x5f, 0x1001b64af\njz      short loc_1001B64F7                                            ; +0x66, 0x1001b64b6\ncmp     r14d, 7DCh                                                     ; +0x68, 0x1001b64b8\njnz     loc_1001B65DC                                                  ; +0x6f, 0x1001b64bf\nmov     byte ptr [rbx+5F0h], 1                                         ; +0x75, 0x1001b64c5\nlea     rdi, aGjbeast05; \"GJBeast05\"                                   ; +0x7c, 0x1001b64cc\njmp     short loc_1001B6505                                            ; +0x83, 0x1001b64d3\nmov     byte ptr [rbx+5F0h], 1                                         ; +0x85, 0x1001b64d5\nlea     rdi, aGjbeast01; \"GJBeast01\"                                   ; +0x8c, 0x1001b64dc\njmp     short loc_1001B6505                                            ; +0x93, 0x1001b64e3\nlea     rdi, aGjbeast03; \"GJBeast03\"                                   ; +0x95, 0x1001b64e5\njmp     short loc_1001B6505                                            ; +0x9c, 0x1001b64ec\nlea     rdi, aBlacksludge; \"BlackSludge\"                               ; +0x9e, 0x1001b64ee\njmp     short loc_1001B6505                                            ; +0xa5, 0x1001b64f5\nmov     byte ptr [rbx+5F0h], 1                                         ; +0xa7, 0x1001b64f7\nlea     rdi, aGjbeast04; \"GJBeast04\"                                   ; +0xae, 0x1001b64fe\nxor     r15d, r15d                                                     ; +0xb5, 0x1001b6505\nxor     esi, esi                                                       ; +0xb8, 0x1001b6508\nxor     edx, edx                                                       ; +0xba, 0x1001b650a\ncall    CCAnimatedSprite__createWithType                               ; +0xbc, 0x1001b650c\nmov     [rbx+5B8h], rax                                                ; +0xc1, 0x1001b6511\nmov     rdi, [rax+288h]                                                ; +0xc8, 0x1001b6518\ncall    SpriteAnimationManager__stopAnimations                         ; +0xcf, 0x1001b651f\nmov     rdi, [rbx+5B8h]                                                ; +0xd4, 0x1001b6524\nlea     rax, [rbx+5A8h]                                                ; +0xdb, 0x1001b652b\nmov     [rdi+2C8h], rax                                                ; +0xe2, 0x1001b6532\nmov     rax, [rdi]                                                     ; +0xe9, 0x1001b6539\ncall    qword ptr [rax+420h]                                           ; +0xec, 0x1001b653c\nmov     rdi, rbx                                                       ; +0xf2, 0x1001b6542\nmov     rsi, rax                                                       ; +0xf5, 0x1001b6545\ncall    GameObject__initWithTexture                                    ; +0xf8, 0x1001b6548\ntest    al, al                                                         ; +0xfd, 0x1001b654d\njz      loc_1001B65DC                                                  ; +0xff, 0x1001b654f\nmov     rdi, rbx                                                       ; +0x105, 0x1001b6555\nmov     esi, r14d                                                      ; +0x108, 0x1001b6558\ncall    AnimatedGameObject__setupAnimatedSize                          ; +0x10b, 0x1001b655b\nmov     rsi, [rbx+5B8h]                                                ; +0x110, 0x1001b6560\nmov     rax, [rbx]                                                     ; +0x117, 0x1001b6567\nmov     rdi, rbx                                                       ; +0x11a, 0x1001b656a\ncall    qword ptr [rax+1B8h]                                           ; +0x11d, 0x1001b656d\nmov     rax, [rbx]                                                     ; +0x123, 0x1001b6573\nmov     rdi, rbx                                                       ; +0x126, 0x1001b6576\ncall    qword ptr [rax+138h]                                           ; +0x129, 0x1001b6579\nlea     rdi, [rbp+var_20]                                              ; +0x12f, 0x1001b657f\nmov     rsi, rax                                                       ; +0x133, 0x1001b6583\ncall    sub_10028CFC0                                                  ; +0x136, 0x1001b6586\nmov     r14, [rbx+5B8h]                                                ; +0x13b, 0x1001b658b\nmovss   xmm1, cs:dword_100814FA8                                       ; +0x142, 0x1001b6592\nmovss   xmm0, [rbp+var_20]                                             ; +0x14a, 0x1001b659a\nmulss   xmm0, xmm1                                                     ; +0x14f, 0x1001b659f\nmulss   xmm1, [rbp+var_1C]                                             ; +0x153, 0x1001b65a3\nlea     r15, [rbp+var_28]                                              ; +0x158, 0x1001b65a8\nmov     rdi, r15                                                       ; +0x15c, 0x1001b65ac\ncall    sub_10028CBE0                                                  ; +0x15f, 0x1001b65af\nmov     rax, [r14]                                                     ; +0x164, 0x1001b65b4\nmov     rdi, r14                                                       ; +0x167, 0x1001b65b7\nmov     rsi, r15                                                       ; +0x16a, 0x1001b65ba\ncall    qword ptr [rax+0B8h]                                           ; +0x16d, 0x1001b65bd\nmov     byte ptr [rbx+377h], 1                                         ; +0x173, 0x1001b65c3\nmov     byte ptr [rbx+139h], 0                                         ; +0x17a, 0x1001b65ca\nmov     rdi, rbx                                                       ; +0x181, 0x1001b65d1\ncall    AnimatedGameObject__setupChildSprites                          ; +0x184, 0x1001b65d4\nmov     r15b, 1                                                        ; +0x189, 0x1001b65d9\nmov     eax, r15d                                                      ; +0x18c, 0x1001b65dc\nadd     rsp, 18h                                                       ; +0x18f, 0x1001b65df\npop     rbx                                                            ; +0x193, 0x1001b65e3\npop     r14                                                            ; +0x194, 0x1001b65e4\npop     r15                                                            ; +0x196, 0x1001b65e6\npop     rbp                                                            ; +0x198, 0x1001b65e8\nretn                                                                   ; +0x199, 0x1001b65e9", "xrefs": ["AnimatedGameObject::create @ 0x1001b6411"], "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"}