{"type": "func", "start": 4726296, "end": 4726622, "name": "GJBaseGameLayer::triggerRotateCommand", "pseudocode": "// \n// GJBaseGameLayer::triggerRotateCommand from 0x481e18 to 0x481f5e (326 bytes)\n// \n// 1 xrefs:\n// > EffectGameObject::triggerObject @ 0x3edfce\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 GJBaseGameLayer::triggerRotateCommand(GJBaseGameLayer *a1, EnhancedTriggerObject *a2)\n{\n  float *p_m_duration; // r7\n  float RotateCommandAngleDelta; // s16\n  GameObject *v6; // r8\n  GameObject *v7; // r9\n  GameObject *v8; // r10\n  GameObject *v9; // r11\n  GameObject *v10; // r0\n  GameObject *v11; // [sp+20h] [bp-1Ch]\n  GameObject *Object; // [sp+24h] [bp-18h]\n  GameObject *v13; // [sp+28h] [bp-14h] BYREF\n  GameObject *v14; // [sp+2Ch] [bp-10h] BYREF\n  GameObject *v15; // [sp+30h] [bp-Ch] BYREF\n\n  p_m_duration = &a2->m_duration;\n  RotateCommandAngleDelta = a2->m_rotationDegrees + (float)((float)a2->m_times360 * 360.0);\n  if ( !a2->m_isDynamicMode || *p_m_duration == 0.0 )\n  {\n    if ( a2->m_useMoveTarget )\n      goto LABEL_8;\n    goto LABEL_5;\n  }\n  if ( !a2->m_useMoveTarget && !a2->m_isDirectionFollowSnap360 )\n  {\nLABEL_5:\n    if ( !a2->m_isDirectionFollowSnap360 )\n    {\nLABEL_10:\n      GJEffectManager::createRotateCommand(\n        a1->m_effectManager,\n        RotateCommandAngleDelta,\n        *p_m_duration,\n        a2->m_targetGroupID,\n        a2->m_centerGroupID,\n        a2->m_easingType,\n        a2->m_easingRate,\n        a2->m_lockObjectRotation,\n        0,\n        0,\n        a2->m_uniqueID,\n        a2->m_controlID);\n      return;\n    }\nLABEL_8:\n    GJBaseGameLayer::getRotateCommandTargets(a1, a2, &v14, &v15, &v13);\n    v6 = v14;\n    if ( v14 )\n    {\n      v7 = v13;\n      if ( v13 )\n      {\n        v8 = v15;\n        if ( v15 )\n        {\n          Object = GJBaseGameLayer::tryGetObject(a1, a2->m_minXID);\n          v11 = GJBaseGameLayer::tryGetObject(a1, a2->m_minYID);\n          v9 = GJBaseGameLayer::tryGetObject(a1, a2->m_maxXID);\n          v10 = GJBaseGameLayer::tryGetObject(a1, a2->m_maxYID);\n          RotateCommandAngleDelta = getRotateCommandAngleDelta((int)a2, (int)v6, (int)v8, (int)v7, Object, v11, v9, v10);\n        }\n      }\n    }\n    goto LABEL_10;\n  }\n  GJBaseGameLayer::triggerDynamicRotateCommand(a1, a2);\n}", "assembly": "; \n; GJBaseGameLayer::triggerRotateCommand from 0x481e18 to 0x481f5e (326 bytes)\n; \n; 1 xrefs:\n; > EffectGameObject::triggerObject @ 0x3edfce\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x481E22)                ; +0x0, 0x481e18\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x481e1a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x481e1e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x481e20\nVPUSH           {D8}                                                   ; +0xa, 0x481e22\nMOV             R4, R1                                                 ; +0xe, 0x481e26\nLDR             R2, [R3]                                               ; +0x10, 0x481e28\nMOV             R6, R3                                                 ; +0x12, 0x481e2a\nMOV             R5, R0                                                 ; +0x14, 0x481e2c\nADD.W           R7, R4, #0x4F0                                         ; +0x16, 0x481e2e\nVLDR            S14, =360.0                                            ; +0x1a, 0x481e32\nSUB             SP, SP, #0x3C                                          ; +0x1e, 0x481e36\nLDRB.W          R3, [R4,#0x528]                                        ; +0x20, 0x481e38\nSTR             R2, [SP,#0x3C+var_8]                                   ; +0x24, 0x481e3c\nADDW            R2, R1, #0x54C                                         ; +0x26, 0x481e3e\nLDR.W           R1, [R1,#0x550]                                        ; +0x2a, 0x481e42\nVLDR            S16, [R2]                                              ; +0x2e, 0x481e46\nLDRB.W          R2, [R4,#0x544]                                        ; +0x32, 0x481e4a\nVMOV            S15, R1                                                ; +0x36, 0x481e4e\nVCVT.F32.S32    S15, S15                                               ; +0x3a, 0x481e52\nVMLA.F32        S16, S15, S14                                          ; +0x3e, 0x481e56\nCBZ             R2, loc_481E7E                                         ; +0x42, 0x481e5a\nVLDR            S15, [R7]                                              ; +0x44, 0x481e5c\nVCMP.F32        S15, #0.0                                              ; +0x48, 0x481e60\nVMRS            APSR_nzcv, FPSCR                                       ; +0x4c, 0x481e64\nBEQ             loc_481E7E                                             ; +0x50, 0x481e68\nCMP             R3, #0                                                 ; +0x52, 0x481e6a\nBNE             loc_481EE6                                             ; +0x54, 0x481e6c\nLDRB.W          R3, [R4,#0x539]                                        ; +0x56, 0x481e6e\nCMP             R3, #0                                                 ; +0x5a, 0x481e72\nBNE             loc_481EE6                                             ; +0x5c, 0x481e74\nLDRB.W          R3, [R4,#0x539]                                        ; +0x5e, 0x481e76\nCBNZ            R3, loc_481E82                                         ; +0x62, 0x481e7a\nB               loc_481EA6                                             ; +0x64, 0x481e7c\nCMP             R3, #0                                                 ; +0x66, 0x481e7e\nBEQ             loc_481E76                                             ; +0x68, 0x481e80\nADD             R3, SP, #0x3C+var_14                                   ; +0x6a, 0x481e82\nMOV             R0, R5; this                                           ; +0x6c, 0x481e84\nSTR             R3, [SP,#0x3C+var_3C]; int                             ; +0x6e, 0x481e86\nMOV             R1, R4; int                                            ; +0x70, 0x481e88\nADD             R2, SP, #0x3C+var_10; int                              ; +0x72, 0x481e8a\nADD             R3, SP, #0x3C+var_C; int                               ; +0x74, 0x481e8c\nBL              _ZN15GJBaseGameLayer23getRotateCommandTargetsEP21EnhancedTriggerObjectRP10GameObjectS4_S4_; GJBaseGameLayer::getRotateCommandTargets(EnhancedTriggerObject *,GameObject *&,GameObject *&,GameObject *&) ; +0x76, 0x481e8e\nLDR.W           R8, [SP,#0x3C+var_10]                                  ; +0x7a, 0x481e92\nCMP.W           R8, #0                                                 ; +0x7e, 0x481e96\nBEQ             loc_481EA6                                             ; +0x82, 0x481e9a\nLDR.W           R9, [SP,#0x3C+var_14]                                  ; +0x84, 0x481e9c\nCMP.W           R9, #0                                                 ; +0x88, 0x481ea0\nBNE             loc_481EF0                                             ; +0x8c, 0x481ea4\nLDR.W           R3, [R4,#0x500]                                        ; +0x8e, 0x481ea6\nLDR.W           R0, [R5,#0x690]; this                                  ; +0x92, 0x481eaa\nVMOV            R1, S16; float                                         ; +0x96, 0x481eae\nSTR             R3, [SP,#0x3C+var_3C]; int                             ; +0x9a, 0x481eb2\nLDR.W           R3, [R4,#0x51C]                                        ; +0x9c, 0x481eb4\nSTR             R3, [SP,#0x3C+var_38]; int                             ; +0xa0, 0x481eb8\nADD.W           R3, R4, #0x520                                         ; +0xa2, 0x481eba\nLDR             R3, [R3]                                               ; +0xa6, 0x481ebe\nSTR             R3, [SP,#0x3C+var_34]; float                           ; +0xa8, 0x481ec0\nLDRB.W          R3, [R4,#0x554]                                        ; +0xaa, 0x481ec2\nSTR             R3, [SP,#0x3C+var_30]; bool                            ; +0xae, 0x481ec6\nMOVS            R3, #0                                                 ; +0xb0, 0x481ec8\nSTR             R3, [SP,#0x3C+var_2C]; double                          ; +0xb2, 0x481eca\nSTR             R3, [SP,#0x3C+var_2C+4]                                ; +0xb4, 0x481ecc\nLDR.W           R3, [R4,#0x304]                                        ; +0xb6, 0x481ece\nSTR             R3, [SP,#0x3C+var_24]; bool                            ; +0xba, 0x481ed2\nLDR.W           R3, [R4,#0x5CC]                                        ; +0xbc, 0x481ed4\nSTR             R3, [SP,#0x3C+var_20]; int                             ; +0xc0, 0x481ed8\nLDR             R2, [R7]; float                                        ; +0xc2, 0x481eda\nLDR.W           R3, [R4,#0x4FC]; int                                   ; +0xc4, 0x481edc\nBL              _ZN15GJEffectManager19createRotateCommandEffiiifbbbii; GJEffectManager::createRotateCommand(float,float,int,int,int,float,bool,bool,bool,int,int) ; +0xc8, 0x481ee0\nB               loc_481F48                                             ; +0xcc, 0x481ee4\nMOV             R0, R5; this                                           ; +0xce, 0x481ee6\nMOV             R1, R4; EnhancedTriggerObject *                        ; +0xd0, 0x481ee8\nBL              _ZN15GJBaseGameLayer27triggerDynamicRotateCommandEP21EnhancedTriggerObject; GJBaseGameLayer::triggerDynamicRotateCommand(EnhancedTriggerObject *) ; +0xd2, 0x481eea\nB               loc_481F48                                             ; +0xd6, 0x481eee\nLDR.W           R10, [SP,#0x3C+var_C]                                  ; +0xd8, 0x481ef0\nCMP.W           R10, #0                                                ; +0xdc, 0x481ef4\nBEQ             loc_481EA6                                             ; +0xe0, 0x481ef8\nLDR.W           R1, [R4,#0x664]; int                                   ; +0xe2, 0x481efa\nMOV             R0, R5; this                                           ; +0xe6, 0x481efe\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0xe8, 0x481f00\nLDR.W           R1, [R4,#0x668]; int                                   ; +0xec, 0x481f04\nSTR             R0, [SP,#0x3C+var_18]                                  ; +0xf0, 0x481f08\nMOV             R0, R5; this                                           ; +0xf2, 0x481f0a\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0xf4, 0x481f0c\nLDR.W           R1, [R4,#0x66C]; int                                   ; +0xf8, 0x481f10\nSTR             R0, [SP,#0x3C+var_1C]                                  ; +0xfc, 0x481f14\nMOV             R0, R5; this                                           ; +0xfe, 0x481f16\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x100, 0x481f18\nLDR.W           R1, [R4,#0x670]; int                                   ; +0x104, 0x481f1c\nMOV             R11, R0                                                ; +0x108, 0x481f20\nMOV             R0, R5; this                                           ; +0x10a, 0x481f22\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x10c, 0x481f24\nLDR             R2, [SP,#0x3C+var_18]                                  ; +0x110, 0x481f28\nLDR             R3, [SP,#0x3C+var_1C]                                  ; +0x112, 0x481f2a\nMOV             R1, R8                                                 ; +0x114, 0x481f2c\nSTR.W           R11, [SP,#0x3C+var_34]                                 ; +0x116, 0x481f2e\nSTR             R2, [SP,#0x3C+var_3C]                                  ; +0x11a, 0x481f32\nMOV             R2, R10                                                ; +0x11c, 0x481f34\nSTR             R3, [SP,#0x3C+var_38]                                  ; +0x11e, 0x481f36\nMOV             R3, R9                                                 ; +0x120, 0x481f38\nSTR             R0, [SP,#0x3C+var_30]                                  ; +0x122, 0x481f3a\nMOV             R0, R4                                                 ; +0x124, 0x481f3c\nBL              _Z26getRotateCommandAngleDeltaP21EnhancedTriggerObjectP10GameObjectS2_S2_S2_S2_S2_S2_; getRotateCommandAngleDelta(EnhancedTriggerObject *,GameObject *,GameObject *,GameObject *,GameObject *,GameObject *,GameObject *,GameObject *) ; +0x126, 0x481f3e\nVMOV            S16, R0                                                ; +0x12a, 0x481f42\nB               loc_481EA6                                             ; +0x12e, 0x481f46\nLDR             R2, [SP,#0x3C+var_8]                                   ; +0x130, 0x481f48\nLDR             R3, [R6]                                               ; +0x132, 0x481f4a\nCMP             R2, R3                                                 ; +0x134, 0x481f4c\nBEQ             loc_481F54                                             ; +0x136, 0x481f4e\nBLX             __stack_chk_fail                                       ; +0x138, 0x481f50\nADD             SP, SP, #0x3C ; '<'                                    ; +0x13c, 0x481f54\nVPOP            {D8}                                                   ; +0x13e, 0x481f56\nPOP.W           {R4-R11,PC}                                            ; +0x142, 0x481f5a", "xrefs": ["EffectGameObject::triggerObject @ 0x3edfce"], "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"}