{"type": "func", "start": 4674056, "end": 4674340, "name": "GJBaseGameLayer::getFollowSpeedVal", "pseudocode": "// \n// GJBaseGameLayer::getFollowSpeedVal from 0x475208 to 0x475324 (284 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::modifyObjectPhysics @ 0x475402\n// > GJBaseGameLayer::processAdvancedFollowAction @ 0x48a3d2\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\ncocos2d::CCPoint *GJBaseGameLayer::getFollowSpeedVal(\n        cocos2d::CCPoint *__return_ptr retstr,\n        GJBaseGameLayer *a2,\n        GameObject *a3,\n        int a4,\n        int a5,\n        float a6,\n        float a7)\n{\n  float v11; // s16\n  GameObject *Object; // r0\n  GameObject *v13; // r11\n  const cocos2d::CCPoint *LastPosition; // r5\n  GameObject *v15; // r10\n  int v16; // r2\n  bool v17; // r3\n  float v18; // s14\n  cocos2d::CCPoint v20; // [sp+4h] [bp-18h] BYREF\n  _BYTE v21[8]; // [sp+Ch] [bp-10h] BYREF\n  cocos2d::CCPoint v22; // [sp+14h] [bp-8h] BYREF\n  cocos2d::CCPoint v23; // [sp+1Ch] [bp+0h] BYREF\n\n  v11 = (float)(90.0 - a6) * 0.017453;\n  cocos2d::CCPoint::CCPoint(&v20, &stru_AC68C0);\n  if ( a4 > 0 )\n  {\n    Object = GJBaseGameLayer::tryGetObject(a2, a4);\n    v13 = Object;\n    if ( Object )\n    {\n      LastPosition = GameObject::getLastPosition(Object);\n      v13->getRealPosition(&v22, v13);\nLABEL_7:\n      cocos2d::CCPoint::operator-(&v23, LastPosition, &v22);\n      cocos2d::CCPoint::operator=((PlayerObject *)&v20, COERCE_FLOAT(&v23), v16, v17);\n      goto LABEL_8;\n    }\n  }\n  if ( a5 > 0 )\n  {\n    v15 = GJBaseGameLayer::tryGetObject(a2, a5);\n    if ( v15 )\n    {\n      LastPosition = (const cocos2d::CCPoint *)v21;\n      a3->getRealPosition((cocos2d::CCPoint *)v21, a3);\n      v15->getRealPosition(&v22, v15);\n      goto LABEL_7;\n    }\n  }\nLABEL_8:\n  if ( v20.x != 0.0 || v20.y != 0.0 )\n  {\n    v18 = atan2(v20.y, v20.x) + 1.57079633;\n    v11 = v11 + v18;\n  }\n  cocos2d::ccpForAngle(&v23, v11);\n  cocos2d::CCPoint::operator*(retstr, &v23, LODWORD(a7));\n  return retstr;\n}", "assembly": "; \n; GJBaseGameLayer::getFollowSpeedVal from 0x475208 to 0x475324 (284 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::modifyObjectPhysics @ 0x475402\n; > GJBaseGameLayer::processAdvancedFollowAction @ 0x48a3d2\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.W          {R4-R11,LR}                                            ; +0x0, 0x475208\nMOV             R10, R1                                                ; +0x4, 0x47520c\nVPUSH           {D8}                                                   ; +0x6, 0x47520e\nMOV             R11, R3                                                ; +0xa, 0x475212\nLDR             R6, =(__stack_chk_guard_ptr - 0x475224)                ; +0xc, 0x475214\nMOV             R9, R0                                                 ; +0xe, 0x475216\nLDR             R1, =(qword_AC68B8 - 0x47522A)                         ; +0x10, 0x475218\nMOV             R4, R2                                                 ; +0x12, 0x47521a\nVLDR            S15, =90.0                                             ; +0x14, 0x47521c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x18, 0x475220\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x1a, 0x475222\nSUB             SP, SP, #0x2C                                          ; +0x1c, 0x475224\nADD             R1, PC; qword_AC68B8                                   ; +0x1e, 0x475226\nLDR             R3, [R6]                                               ; +0x20, 0x475228\nADD.W           R8, SP, #0x2C+var_28                                   ; +0x22, 0x47522a\nVLDR            S14, [SP,#0x2C+arg_4]                                  ; +0x26, 0x47522e\nADDS            R1, #(stru_AC68C0 - 0xAC68B8); cocos2d::CCPoint *      ; +0x2a, 0x475232\nMOV             R0, R8; this                                           ; +0x2c, 0x475234\nLDR             R5, [SP,#0x2C+arg_0]                                   ; +0x2e, 0x475236\nSTR             R3, [SP,#0x2C+var_8]                                   ; +0x30, 0x475238\nADD             R7, SP, #0x1C                                          ; +0x32, 0x47523a\nVLDR            S16, =0.017453                                         ; +0x34, 0x47523c\nVSUB.F32        S15, S15, S14                                          ; +0x38, 0x475240\nVMUL.F32        S16, S15, S16                                          ; +0x3c, 0x475244\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x40, 0x475248\nCMP.W           R11, #0                                                ; +0x44, 0x47524c\nBLE             loc_475274                                             ; +0x48, 0x475250\nMOV             R1, R11; int                                           ; +0x4a, 0x475252\nMOV             R0, R10; this                                          ; +0x4c, 0x475254\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x4e, 0x475256\nMOV             R11, R0                                                ; +0x52, 0x47525a\nCBZ             R0, loc_475274                                         ; +0x54, 0x47525c\nBL              _ZN10GameObject15getLastPositionEv; GameObject::getLastPosition(void) ; +0x56, 0x47525e\nLDR.W           R3, [R11]                                              ; +0x5a, 0x475262\nADD             R4, SP, #0x2C+var_18                                   ; +0x5e, 0x475266\nMOV             R1, R11                                                ; +0x60, 0x475268\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x62, 0x47526a\nMOV             R5, R0                                                 ; +0x66, 0x47526e\nMOV             R0, R4                                                 ; +0x68, 0x475270\nB               loc_4752A0                                             ; +0x6a, 0x475272\nCMP             R5, #0                                                 ; +0x6c, 0x475274\nBLE             loc_4752B4                                             ; +0x6e, 0x475276\nMOV             R0, R10; this                                          ; +0x70, 0x475278\nMOV             R1, R5; int                                            ; +0x72, 0x47527a\nBL              _ZN15GJBaseGameLayer12tryGetObjectEi; GJBaseGameLayer::tryGetObject(int) ; +0x74, 0x47527c\nMOV             R10, R0                                                ; +0x78, 0x475280\nCBZ             R0, loc_4752B4                                         ; +0x7a, 0x475282\nLDR             R3, [R4]                                               ; +0x7c, 0x475284\nADD             R5, SP, #0x2C+var_20                                   ; +0x7e, 0x475286\nMOV             R1, R4                                                 ; +0x80, 0x475288\nADD             R4, SP, #0x2C+var_18                                   ; +0x82, 0x47528a\nMOV             R0, R5                                                 ; +0x84, 0x47528c\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x86, 0x47528e\nBLX             R3                                                     ; +0x8a, 0x475292\nLDR.W           R3, [R10]                                              ; +0x8c, 0x475294\nMOV             R0, R4                                                 ; +0x90, 0x475298\nMOV             R1, R10                                                ; +0x92, 0x47529a\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x94, 0x47529c\nBLX             R3                                                     ; +0x98, 0x4752a0\nMOV             R0, R7                                                 ; +0x9a, 0x4752a2\nMOV             R1, R5                                                 ; +0x9c, 0x4752a4\nMOV             R2, R4                                                 ; +0x9e, 0x4752a6\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xa0, 0x4752a8\nMOV             R0, R8                                                 ; +0xa4, 0x4752ac\nMOV             R1, R7                                                 ; +0xa6, 0x4752ae\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xa8, 0x4752b0\nVLDR            S15, [SP,#0x2C+var_28]                                 ; +0xac, 0x4752b4\nVLDR            S14, [SP,#0x2C+var_24]                                 ; +0xb0, 0x4752b8\nVCMP.F32        S15, #0.0                                              ; +0xb4, 0x4752bc\nVMRS            APSR_nzcv, FPSCR                                       ; +0xb8, 0x4752c0\nBNE             loc_4752D0                                             ; +0xbc, 0x4752c4\nVCMP.F32        S14, #0.0                                              ; +0xbe, 0x4752c6\nVMRS            APSR_nzcv, FPSCR                                       ; +0xc2, 0x4752ca\nBEQ             loc_4752F8                                             ; +0xc6, 0x4752ce\nVCVT.F64.F32    D6, S14                                                ; +0xc8, 0x4752d0\nVCVT.F64.F32    D7, S15                                                ; +0xcc, 0x4752d4\nVMOV            R0, R1, D6; y                                          ; +0xd0, 0x4752d8\nVMOV            R2, R3, D7; x                                          ; +0xd4, 0x4752dc\nBLX             atan2                                                  ; +0xd8, 0x4752e0\nVLDR            D7, =1.57079633                                        ; +0xdc, 0x4752e4\nVMOV            D6, R0, R1                                             ; +0xe0, 0x4752e8\nVADD.F64        D7, D6, D7                                             ; +0xe4, 0x4752ec\nVCVT.F32.F64    S14, D7                                                ; +0xe8, 0x4752f0\nVADD.F32        S16, S16, S14                                          ; +0xec, 0x4752f4\nMOV             R0, R7; this                                           ; +0xf0, 0x4752f8\nVMOV            R1, S16; x                                             ; +0xf2, 0x4752fa\nBL              _ZN7cocos2d11ccpForAngleEf; cocos2d::ccpForAngle(float) ; +0xf6, 0x4752fe\nMOV             R0, R9                                                 ; +0xfa, 0x475302\nLDR             R2, [SP,#0x2C+arg_8]                                   ; +0xfc, 0x475304\nMOV             R1, R7                                                 ; +0xfe, 0x475306\nBL              _ZNK7cocos2d7CCPointmlEf; cocos2d::CCPoint::operator*(float) ; +0x100, 0x475308\nLDR             R2, [SP,#0x2C+var_8]                                   ; +0x104, 0x47530c\nLDR             R3, [R6]                                               ; +0x106, 0x47530e\nMOV             R0, R9                                                 ; +0x108, 0x475310\nCMP             R2, R3                                                 ; +0x10a, 0x475312\nBEQ             loc_47531A                                             ; +0x10c, 0x475314\nBLX             __stack_chk_fail                                       ; +0x10e, 0x475316\nADD             SP, SP, #0x2C ; ','                                    ; +0x112, 0x47531a\nVPOP            {D8}                                                   ; +0x114, 0x47531c\nPOP.W           {R4-R11,PC}                                            ; +0x118, 0x475320", "xrefs": ["GJBaseGameLayer::modifyObjectPhysics @ 0x475402", "GJBaseGameLayer::processAdvancedFollowAction @ 0x48a3d2"], "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"}