{"type": "func", "start": 4680316, "end": 4680724, "name": "GJBaseGameLayer::checkRepellPlayer", "pseudocode": "// \n// GJBaseGameLayer::checkRepellPlayer from 0x476a7c to 0x476c14 (408 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x497a7a\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::checkRepellPlayer(GJBaseGameLayer *a1)\n{\n  PlayerObject *m_player1; // r0\n  PlayerObject *m_player2; // r3\n  float v4; // s17\n  float v5; // s16\n  float y; // s18\n  PlayerObject *v7; // r5\n  PlayerObject *v8; // r0\n  _BOOL4 m_isEditor; // r7\n  GLubyte g; // r11\n  GLubyte b; // r10\n  const cocos2d::CCPoint *v12; // r0\n  CCCircleWave *v13; // r0\n  CCCircleWave *v14; // r6\n  CCCircleWave_vtbl *v15; // r3\n  bool v16; // [sp+4h] [bp-20h]\n  GLubyte r; // [sp+Ch] [bp-18h]\n  cocos2d::CCPoint v18; // [sp+14h] [bp-10h] BYREF\n\n  if ( a1->m_gameState.m_isDualMode )\n  {\n    m_player1 = a1->m_player1;\n    if ( m_player1->m_isBall )\n    {\n      m_player2 = a1->m_player2;\n      if ( m_player2->m_isBall\n        && !a1->m_levelSettings->m_twoPlayerMode\n        && m_player1->m_isUpsideDown == m_player2->m_isUpsideDown )\n      {\n        v4 = (float)(COERCE_FLOAT(((int (__fastcall *)(PlayerObject *))m_player1->getScaleX)(m_player1)) * 30.0) * 0.5;\n        v5 = (float)(COERCE_FLOAT(((int (__fastcall *)(PlayerObject *))a1->m_player2->getScaleX)(a1->m_player2)) * 30.0)\n           * 0.5;\n        y = a1->m_player1->getPosition(a1->m_player1)->y;\n        if ( fabsf(y - a1->m_player2->getPosition(a1->m_player2)->y) < (float)((float)(v4 + v5) + 5.0) )\n        {\n          v7 = a1->m_player1;\n          v8 = a1->m_player2;\n          if ( v7->m_isOnGround2 || v8->m_isOnGround2 )\n          {\n            if ( !v7->m_isOnGround2 && v8->m_isOnGround2 )\n            {\n              v4 = v5;\n              v7 = a1->m_player2;\n              v8 = a1->m_player1;\n            }\n            PlayerObject::hardFlipGravity(v8);\n            m_isEditor = a1->m_isEditor;\n            if ( !a1->m_isEditor )\n            {\n              g = v7->m_playerColor1.g;\n              r = v7->m_playerColor1.r;\n              b = v7->m_playerColor1.b;\n              v12 = v7->getPosition(v7);\n              cocos2d::CCPoint::CCPoint(&v18, v12);\n              v13 = CCCircleWave::create(\n                      COERCE_CCCIRCLEWAVE_(v4 + 2.0),\n                      v4 * 4.0,\n                      0.3,\n                      *(float *)&m_isEditor,\n                      m_isEditor,\n                      v16);\n              v13->m_lineWidth = 4;\n              v14 = v13;\n              v15 = v13->__vftable;\n              v13->m_color.r = r;\n              v13->m_color.g = g;\n              v13->m_color.b = b;\n              v15->setPosition(v13, &v18);\n              a1->m_objectLayer->addChild_0(a1->m_objectLayer, v14, m_isEditor);\n              v14->m_circleMode = Outline;\n              CCCircleWave::followObject(v14, v7, m_isEditor);\n            }\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::checkRepellPlayer from 0x476a7c to 0x476c14 (408 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x497a7a\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 - 0x476A86)                ; +0x0, 0x476a7c\nPUSH.W          {R4-R11,LR}                                            ; +0x2, 0x476a7e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x476a82\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x476a84\nVPUSH           {D8-D9}                                                ; +0xa, 0x476a86\nMOV             R4, R0                                                 ; +0xe, 0x476a8a\nLDR             R2, [R3]                                               ; +0x10, 0x476a8c\nMOV             R8, R3                                                 ; +0x12, 0x476a8e\nSUB             SP, SP, #0x24                                          ; +0x14, 0x476a90\nSTR             R2, [SP,#0x24+var_8]                                   ; +0x16, 0x476a92\nLDRB.W          R2, [R0,#0x372]                                        ; +0x18, 0x476a94\nCMP             R2, #0                                                 ; +0x1c, 0x476a98\nBEQ.W           loc_476BFC                                             ; +0x1e, 0x476a9a\nLDR.W           R0, [R0,#0x8B8]                                        ; +0x22, 0x476a9e\nLDRB.W          R3, [R0,#0x7B3]                                        ; +0x26, 0x476aa2\nCMP             R3, #0                                                 ; +0x2a, 0x476aa6\nBEQ.W           loc_476BFC                                             ; +0x2c, 0x476aa8\nLDR.W           R3, [R4,#0x8BC]                                        ; +0x30, 0x476aac\nLDRB.W          R2, [R3,#0x7B3]                                        ; +0x34, 0x476ab0\nCMP             R2, #0                                                 ; +0x38, 0x476ab4\nBEQ.W           loc_476BFC                                             ; +0x3a, 0x476ab6\nLDR.W           R2, [R4,#0x8C0]                                        ; +0x3e, 0x476aba\nLDRB.W          R2, [R2,#0x118]                                        ; +0x42, 0x476abe\nCMP             R2, #0                                                 ; +0x46, 0x476ac2\nBNE.W           loc_476BFC                                             ; +0x48, 0x476ac4\nLDRB.W          R2, [R0,#0x7B7]                                        ; +0x4c, 0x476ac8\nLDRB.W          R3, [R3,#0x7B7]                                        ; +0x50, 0x476acc\nCMP             R2, R3                                                 ; +0x54, 0x476ad0\nBNE.W           loc_476BFC                                             ; +0x56, 0x476ad2\nLDR             R3, [R0]                                               ; +0x5a, 0x476ad6\nVMOV.F32        S16, #30.0                                             ; +0x5c, 0x476ad8\nLDR             R3, [R3,#0x44]                                         ; +0x60, 0x476adc\nBLX             R3                                                     ; +0x62, 0x476ade\nVMOV.F32        S18, #0.5                                              ; +0x64, 0x476ae0\nVMOV            S15, R0                                                ; +0x68, 0x476ae4\nLDR.W           R0, [R4,#0x8BC]                                        ; +0x6c, 0x476ae8\nVMUL.F32        S17, S15, S16                                          ; +0x70, 0x476aec\nLDR             R3, [R0]                                               ; +0x74, 0x476af0\nLDR             R3, [R3,#0x44]                                         ; +0x76, 0x476af2\nBLX             R3                                                     ; +0x78, 0x476af4\nVMUL.F32        S17, S17, S18                                          ; +0x7a, 0x476af6\nVMOV            S15, R0                                                ; +0x7e, 0x476afa\nLDR.W           R0, [R4,#0x8B8]                                        ; +0x82, 0x476afe\nVMUL.F32        S16, S15, S16                                          ; +0x86, 0x476b02\nLDR             R3, [R0]                                               ; +0x8a, 0x476b06\nLDR             R3, [R3,#0x60]                                         ; +0x8c, 0x476b08\nBLX             R3                                                     ; +0x8e, 0x476b0a\nVMUL.F32        S16, S16, S18                                          ; +0x90, 0x476b0c\nVLDR            S18, [R0,#4]                                           ; +0x94, 0x476b10\nLDR.W           R0, [R4,#0x8BC]                                        ; +0x98, 0x476b14\nLDR             R3, [R0]                                               ; +0x9c, 0x476b18\nLDR             R3, [R3,#0x60]                                         ; +0x9e, 0x476b1a\nBLX             R3                                                     ; +0xa0, 0x476b1c\nVMOV.F32        S14, #5.0                                              ; +0xa2, 0x476b1e\nVLDR            S15, [R0,#4]                                           ; +0xa6, 0x476b22\nVSUB.F32        S18, S18, S15                                          ; +0xaa, 0x476b26\nVADD.F32        S15, S17, S16                                          ; +0xae, 0x476b2a\nVADD.F32        S15, S15, S14                                          ; +0xb2, 0x476b2e\nVABS.F32        S18, S18                                               ; +0xb6, 0x476b32\nVCMPE.F32       S18, S15                                               ; +0xba, 0x476b36\nVMRS            APSR_nzcv, FPSCR                                       ; +0xbe, 0x476b3a\nBPL             loc_476BFC                                             ; +0xc2, 0x476b3e\nLDR.W           R5, [R4,#0x8B8]                                        ; +0xc4, 0x476b40\nLDR.W           R0, [R4,#0x8BC]                                        ; +0xc8, 0x476b44\nLDRB.W          R3, [R5,#0x804]                                        ; +0xcc, 0x476b48\nCBNZ            R3, loc_476B56                                         ; +0xd0, 0x476b4c\nLDRB.W          R2, [R0,#0x804]                                        ; +0xd2, 0x476b4e\nCMP             R2, #0                                                 ; +0xd6, 0x476b52\nBEQ             loc_476BFC                                             ; +0xd8, 0x476b54\nCBNZ            R3, loc_476B68                                         ; +0xda, 0x476b56\nLDRB.W          R3, [R0,#0x804]                                        ; +0xdc, 0x476b58\nCBZ             R3, loc_476B68                                         ; +0xe0, 0x476b5c\nVMOV.F32        S17, S16                                               ; +0xe2, 0x476b5e\nMOV             R3, R5                                                 ; +0xe6, 0x476b62\nMOV             R5, R0                                                 ; +0xe8, 0x476b64\nMOV             R0, R3; this                                           ; +0xea, 0x476b66\nBL              _ZN12PlayerObject15hardFlipGravityEv; PlayerObject::hardFlipGravity(void) ; +0xec, 0x476b68\nMOVW            R3, #0x2A10                                            ; +0xf0, 0x476b6c\nLDRB            R7, [R4,R3]                                            ; +0xf4, 0x476b70\nCMP             R7, #0                                                 ; +0xf6, 0x476b72\nBNE             loc_476BFC                                             ; +0xf8, 0x476b74\nLDRB.W          R12, [R5,#0x852]                                       ; +0xfa, 0x476b76\nMOV             R0, R5                                                 ; +0xfe, 0x476b7a\nLDR             R3, [R5]                                               ; +0x100, 0x476b7c\nADD.W           R9, SP, #0x24+var_10                                   ; +0x102, 0x476b7e\nLDRB.W          R11, [R5,#0x853]                                       ; +0x106, 0x476b82\nSTR.W           R12, [SP,#0x24+var_18]                                 ; +0x10a, 0x476b86\nLDR             R3, [R3,#0x60]                                         ; +0x10e, 0x476b8a\nLDRB.W          R10, [R5,#0x854]                                       ; +0x110, 0x476b8c\nBLX             R3                                                     ; +0x114, 0x476b90\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x116, 0x476b92\nMOV             R0, R9; this                                           ; +0x118, 0x476b94\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x11a, 0x476b96\nVMOV.F32        S15, #2.0                                              ; +0x11e, 0x476b9a\nLDR             R2, flt_476C14; float                                  ; +0x122, 0x476b9e\nMOV             R3, R7; float                                          ; +0x124, 0x476ba0\nSTR             R7, [SP,#0x24+var_24]; bool                            ; +0x126, 0x476ba2\nVADD.F32        S15, S17, S15                                          ; +0x128, 0x476ba4\nVMOV            R0, S15; this                                          ; +0x12c, 0x476ba8\nVMOV.F32        S15, #4.0                                              ; +0x130, 0x476bac\nVMUL.F32        S15, S17, S15                                          ; +0x134, 0x476bb0\nVMOV            R1, S15; float                                         ; +0x138, 0x476bb4\nBL              _ZN12CCCircleWave6createEfffbb; CCCircleWave::create(float,float,float,bool,bool) ; +0x13c, 0x476bb8\nLDR.W           R12, [SP,#0x24+var_18]                                 ; +0x140, 0x476bbc\nMOVS            R3, #4                                                 ; +0x144, 0x476bc0\nMOV             R1, R9                                                 ; +0x146, 0x476bc2\nSTR.W           R3, [R0,#0x128]                                        ; +0x148, 0x476bc4\nMOV             R6, R0                                                 ; +0x14c, 0x476bc8\nLDR             R3, [R0]                                               ; +0x14e, 0x476bca\nSTRB.W          R12, [R0,#0x118]                                       ; +0x150, 0x476bcc\nSTRB.W          R11, [R0,#0x119]                                       ; +0x154, 0x476bd0\nSTRB.W          R10, [R0,#0x11A]                                       ; +0x158, 0x476bd4\nLDR             R3, [R3,#0x5C]                                         ; +0x15c, 0x476bd8\nBLX             R3                                                     ; +0x15e, 0x476bda\nLDR.W           R0, [R4,#0x9F0]                                        ; +0x160, 0x476bdc\nMOV             R1, R6                                                 ; +0x164, 0x476be0\nMOV             R2, R7                                                 ; +0x166, 0x476be2\nLDR             R3, [R0]                                               ; +0x168, 0x476be4\nLDR.W           R3, [R3,#0xE0]                                         ; +0x16a, 0x476be6\nBLX             R3                                                     ; +0x16e, 0x476bea\nMOVS            R3, #1                                                 ; +0x170, 0x476bec\nMOV             R0, R6; this                                           ; +0x172, 0x476bee\nSTR.W           R3, [R6,#0x124]                                        ; +0x174, 0x476bf0\nMOV             R1, R5; cocos2d::CCNode *                              ; +0x178, 0x476bf4\nMOV             R2, R7; bool                                           ; +0x17a, 0x476bf6\nBL              _ZN12CCCircleWave12followObjectEPN7cocos2d6CCNodeEb; CCCircleWave::followObject(cocos2d::CCNode *,bool) ; +0x17c, 0x476bf8\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x180, 0x476bfc\nLDR.W           R3, [R8]                                               ; +0x182, 0x476bfe\nCMP             R2, R3                                                 ; +0x186, 0x476c02\nBEQ             loc_476C0A                                             ; +0x188, 0x476c04\nBLX             __stack_chk_fail                                       ; +0x18a, 0x476c06\nADD             SP, SP, #0x24 ; '$'                                    ; +0x18e, 0x476c0a\nVPOP            {D8-D9}                                                ; +0x190, 0x476c0c\nPOP.W           {R4-R11,PC}                                            ; +0x194, 0x476c10", "xrefs": ["GJBaseGameLayer::update @ 0x497a7a"], "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"}