{"type": "func", "start": 4097332, "end": 4097526, "name": "AnimatedGameObject::playAnimation", "pseudocode": "// \n// AnimatedGameObject::playAnimation from 0x3e8534 to 0x3e85f6 (194 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::loadActiveSaveObjects @ 0x312ecc\n// > GJBaseGameLayer::playAnimationCommand @ 0x470e9c\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\nvoid AnimatedGameObject::playAnimation(AnimatedGameObject *a1, int a2)\n{\n  float TweenTime; // s16\n  CCAnimatedSprite *m_animatedSprite; // r7\n  std::string *v6; // r4\n  CCAnimatedSprite *v7; // r7\n  int v8; // r2\n  int v9; // [sp+0h] [bp-14h] BYREF\n  std::string v10; // [sp+4h] [bp-10h] BYREF\n  _BYTE v11[4]; // [sp+8h] [bp-Ch] BYREF\n\n  AnimatedGameObject::animationForID((AnimatedGameObject *)&v9, a2, a1->m_objectID);\n  if ( *(_DWORD *)(v9 - 12) )\n  {\n    a1->m_animationID = a2;\n    sub_775D40(&a1->m_currentAnimation, &v9);\n    a1->m_playingAnimation = 1;\n    if ( a1->m_isActivated && (TweenTime = AnimatedGameObject::getTweenTime(a2, a1->m_objectID), TweenTime > 0.0) )\n    {\n      m_animatedSprite = a1->m_animatedSprite;\n      v6 = &v10;\n      sub_775C20(&v10);\n      CCAnimatedSprite::tweenToAnimation((int)m_animatedSprite, &v10, TweenTime);\n    }\n    else\n    {\n      v7 = a1->m_animatedSprite;\n      v6 = (std::string *)v11;\n      sub_775C20(v11);\n      CCAnimatedSprite::runAnimationForced((int)v7, (int)v11, v8);\n    }\n    sub_774008(v6);\n  }\n  sub_774008(&v9);\n}", "assembly": "; \n; AnimatedGameObject::playAnimation from 0x3e8534 to 0x3e85f6 (194 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::loadActiveSaveObjects @ 0x312ecc\n; > GJBaseGameLayer::playAnimationCommand @ 0x470e9c\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            {R4-R7,LR}                                             ; +0x0, 0x3e8534\nMOV             R4, R0                                                 ; +0x2, 0x3e8536\nVPUSH           {D8}                                                   ; +0x4, 0x3e8538\nMOV             R7, R1                                                 ; +0x8, 0x3e853c\nLDR             R6, =(__stack_chk_guard_ptr - 0x3E8548)                ; +0xa, 0x3e853e\nLDR.W           R2, [R4,#0x374]; int                                   ; +0xc, 0x3e8540\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x3e8544\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x3e8546\nSUB             SP, SP, #0x14                                          ; +0x14, 0x3e8548\nLDR             R3, [R6]                                               ; +0x16, 0x3e854a\nMOV             R0, SP; this                                           ; +0x18, 0x3e854c\nMOV             R5, SP                                                 ; +0x1a, 0x3e854e\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1c, 0x3e8550\nBL              _ZN18AnimatedGameObject14animationForIDEii; AnimatedGameObject::animationForID(int,int) ; +0x1e, 0x3e8552\nLDR             R3, [SP,#0x14+var_14]                                  ; +0x22, 0x3e8556\nLDR.W           R3, [R3,#-0xC]                                         ; +0x24, 0x3e8558\nCBZ             R3, loc_3E85C8                                         ; +0x28, 0x3e855c\nSTR.W           R7, [R4,#0x50C]                                        ; +0x2a, 0x3e855e\nADDW            R0, R4, #0x504                                         ; +0x2e, 0x3e8562\nMOV             R1, SP                                                 ; +0x32, 0x3e8566\nBL              sub_775D40                                             ; +0x34, 0x3e8568\nMOVS            R3, #1                                                 ; +0x38, 0x3e856c\nSTRB.W          R3, [R4,#0x501]                                        ; +0x3a, 0x3e856e\nLDRB.W          R3, [R4,#0x291]                                        ; +0x3e, 0x3e8572\nCBZ             R3, loc_3E85AC                                         ; +0x42, 0x3e8576\nMOV             R0, R7; this                                           ; +0x44, 0x3e8578\nLDR.W           R1, [R4,#0x374]; int                                   ; +0x46, 0x3e857a\nBL              _ZN18AnimatedGameObject12getTweenTimeEii; AnimatedGameObject::getTweenTime(int,int) ; +0x4a, 0x3e857e\nVMOV            S16, R0                                                ; +0x4e, 0x3e8582\nVCMPE.F32       S16, #0.0                                              ; +0x52, 0x3e8586\nVMRS            APSR_nzcv, FPSCR                                       ; +0x56, 0x3e858a\nBLE             loc_3E85AC                                             ; +0x5a, 0x3e858e\nLDR.W           R7, [R4,#0x4F4]                                        ; +0x5c, 0x3e8590\nADD             R4, SP, #0x14+var_10                                   ; +0x60, 0x3e8594\nMOV             R1, SP                                                 ; +0x62, 0x3e8596\nMOV             R0, R4                                                 ; +0x64, 0x3e8598\nBL              sub_775C20                                             ; +0x66, 0x3e859a\nMOV             R0, R7                                                 ; +0x6a, 0x3e859e\nMOV             R1, R4                                                 ; +0x6c, 0x3e85a0\nVMOV            R2, S16                                                ; +0x6e, 0x3e85a2\nBL              _ZN16CCAnimatedSprite16tweenToAnimationESsf; CCAnimatedSprite::tweenToAnimation(std::string,float) ; +0x72, 0x3e85a6\nB               loc_3E85C2                                             ; +0x76, 0x3e85aa\nLDR.W           R7, [R4,#0x4F4]                                        ; +0x78, 0x3e85ac\nADD             R4, SP, #0x14+var_C                                    ; +0x7c, 0x3e85b0\nMOV             R1, R5                                                 ; +0x7e, 0x3e85b2\nMOV             R0, R4                                                 ; +0x80, 0x3e85b4\nBL              sub_775C20                                             ; +0x82, 0x3e85b6\nMOV             R0, R7                                                 ; +0x86, 0x3e85ba\nMOV             R1, R4                                                 ; +0x88, 0x3e85bc\nBL              _ZN16CCAnimatedSprite18runAnimationForcedESs; CCAnimatedSprite::runAnimationForced(std::string) ; +0x8a, 0x3e85be\nMOV             R0, R4                                                 ; +0x8e, 0x3e85c2\nBL              sub_774008                                             ; +0x90, 0x3e85c4\nMOV             R0, R5                                                 ; +0x94, 0x3e85c8\nBL              sub_774008                                             ; +0x96, 0x3e85ca\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x9a, 0x3e85ce\nLDR             R3, [R6]                                               ; +0x9c, 0x3e85d0\nCMP             R2, R3                                                 ; +0x9e, 0x3e85d2\nBEQ             loc_3E85EE                                             ; +0xa0, 0x3e85d4\nBLX             __stack_chk_fail                                       ; +0xa2, 0x3e85d6\nB               loc_3E85DC                                             ; +0xa6, 0x3e85da\nMOV             R0, R4                                                 ; +0xa8, 0x3e85dc\nBL              sub_774008                                             ; +0xaa, 0x3e85de\nB               loc_3E85E4                                             ; +0xae, 0x3e85e2\nMOV             R0, R5                                                 ; +0xb0, 0x3e85e4\nBL              sub_774008                                             ; +0xb2, 0x3e85e6\nBL              __cxa_end_cleanup                                      ; +0xb6, 0x3e85ea\nADD             SP, SP, #0x14                                          ; +0xba, 0x3e85ee\nVPOP            {D8}                                                   ; +0xbc, 0x3e85f0\nPOP             {R4-R7,PC}                                             ; +0xc0, 0x3e85f4", "xrefs": ["PlayLayer::loadActiveSaveObjects @ 0x312ecc", "GJBaseGameLayer::playAnimationCommand @ 0x470e9c"], "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"}