{"type": "func", "start": 3674344, "end": 3674456, "name": "EditorUI::getSnapAngle", "pseudocode": "// \n// EditorUI::getSnapAngle from 0x3810e8 to 0x381158 (112 bytes)\n// \n// 3 xrefs:\n// > EditorUI::transformObject @ 0x3858cc\n// > EditorUI::transformObjectCall @ 0x39fec0\n// > EditorUI::transformObjectCall @ 0x39ff86\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\nfloat EditorUI::getSnapAngle(EditorUI *a1, GameObject *a2, cocos2d::CCArray *a3)\n{\n  unsigned int i; // r4\n  GameObject *v7; // r0\n  float v8; // s15\n\n  if ( a3 && cocos2d::CCArray::count(a3) )\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(a3); ++i )\n    {\n      v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, i);\n      v8 = LevelEditorLayer::rotationForSlopeNearObject(a1->m_editorLayer, v7);\n      if ( v8 != -1.0 )\n        return v8;\n    }\n  }\n  else if ( a2 )\n  {\n    return LevelEditorLayer::rotationForSlopeNearObject(a1->m_editorLayer, a2);\n  }\n  return -1.0;\n}", "assembly": "; \n; EditorUI::getSnapAngle from 0x3810e8 to 0x381158 (112 bytes)\n; \n; 3 xrefs:\n; > EditorUI::transformObject @ 0x3858cc\n; > EditorUI::transformObjectCall @ 0x39fec0\n; > EditorUI::transformObjectCall @ 0x39ff86\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-R6,LR}                                             ; +0x0, 0x3810e8\nMOV             R6, R0                                                 ; +0x2, 0x3810ea\nVPUSH           {D8}                                                   ; +0x4, 0x3810ec\nMOV             R4, R1                                                 ; +0x8, 0x3810f0\nMOV             R5, R2                                                 ; +0xa, 0x3810f2\nCBZ             R2, loc_381138                                         ; +0xc, 0x3810f4\nMOV             R0, R2; this                                           ; +0xe, 0x3810f6\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x10, 0x3810f8\nCBZ             R0, loc_381138                                         ; +0x14, 0x3810fc\nVMOV.F32        S16, #-1.0                                             ; +0x16, 0x3810fe\nMOVS            R4, #0                                                 ; +0x1a, 0x381102\nMOV             R0, R5; this                                           ; +0x1c, 0x381104\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1e, 0x381106\nCMP             R4, R0                                                 ; +0x22, 0x38110a\nBCS             loc_381132                                             ; +0x24, 0x38110c\nMOV             R1, R4; unsigned int                                   ; +0x26, 0x38110e\nMOV             R0, R5; this                                           ; +0x28, 0x381110\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x2a, 0x381112\nMOV             R1, R0; GameObject *                                   ; +0x2e, 0x381116\nLDR.W           R0, [R6,#0x340]; this                                  ; +0x30, 0x381118\nBL              _ZN16LevelEditorLayer26rotationForSlopeNearObjectEP10GameObject; LevelEditorLayer::rotationForSlopeNearObject(GameObject *) ; +0x34, 0x38111c\nVMOV            S15, R0                                                ; +0x38, 0x381120\nVCMP.F32        S15, S16                                               ; +0x3c, 0x381124\nVMRS            APSR_nzcv, FPSCR                                       ; +0x40, 0x381128\nBNE             loc_38114E                                             ; +0x44, 0x38112c\nADDS            R4, #1                                                 ; +0x46, 0x38112e\nB               loc_381104                                             ; +0x48, 0x381130\nVMOV.F32        S15, #-1.0                                             ; +0x4a, 0x381132\nB               loc_38114E                                             ; +0x4e, 0x381136\nCMP             R4, #0                                                 ; +0x50, 0x381138\nBEQ             loc_381132                                             ; +0x52, 0x38113a\nVPOP            {D8}                                                   ; +0x54, 0x38113c\nMOV             R1, R4; GameObject *                                   ; +0x58, 0x381140\nLDR.W           R0, [R6,#0x340]; this                                  ; +0x5a, 0x381142\nPOP.W           {R4-R6,LR}                                             ; +0x5e, 0x381146\nB.W             _ZN16LevelEditorLayer26rotationForSlopeNearObjectEP10GameObject; LevelEditorLayer::rotationForSlopeNearObject(GameObject *) ; +0x62, 0x38114a\nVPOP            {D8}                                                   ; +0x66, 0x38114e\nVMOV            R0, S15                                                ; +0x6a, 0x381152\nPOP             {R4-R6,PC}                                             ; +0x6e, 0x381156", "xrefs": ["EditorUI::transformObject @ 0x3858cc", "EditorUI::transformObjectCall @ 0x39fec0", "EditorUI::transformObjectCall @ 0x39ff86"], "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"}