{"type": "func", "start": 4770664, "end": 4770920, "name": "GJBaseGameLayer::playerTouchedTrigger", "pseudocode": "// \n// GJBaseGameLayer::playerTouchedTrigger from 0x48cb68 to 0x48cc68 (256 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::collisionCheckObjects @ 0x492a96\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::playerTouchedTrigger(GJBaseGameLayer *a1, PlayerObject *a2, EffectGameObject *a3)\n{\n  int m_uniqueID; // r3\n  GJBaseGameLayer *v7; // r0\n  int v8; // [sp+0h] [bp-1Ch] BYREF\n  int v9; // [sp+4h] [bp-18h]\n  std::vector<int> v10; // [sp+8h] [bp-14h] BYREF\n\n  if ( a3->m_objectID == 3640 )\n    a3->powerOnObject(a3, a1->m_gameState.m_commandIndex);\n  if ( a3->m_isTouchTriggered )\n  {\n    if ( a3->m_isSinglePTouch )\n      m_uniqueID = 0;\n    else\n      m_uniqueID = a2->m_uniqueID;\n    v8 = a3->m_uniqueID;\n    v9 = m_uniqueID;\n    v7 = (GJBaseGameLayer *)std::_Rb_tree<std::pair<int,int>,std::pair<std::pair<int,int> const,int>,std::_Select1st<std::pair<std::pair<int,int> const,int>>,std::less<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::find(\n                              (int)&a1->m_gameState.m_activatedObjectIDs,\n                              &v8);\n    if ( a3->m_isMultiTriggered )\n    {\n      if ( v7 == (GJBaseGameLayer *)&a1->m_gameState.m_activatedObjectIDs.m_header )\n        GJEffectManager::removeTriggeredID(a1->m_effectManager, v8, v9);\n      *(_DWORD *)std::map<std::pair<int,int>,int>::operator[](&a1->m_gameState.m_activatedObjectIDs.compare.pad, &v8) = a1->m_gameState.m_commandIndex;\n    }\n    if ( !GJEffectManager::hasBeenTriggered(a1->m_effectManager, v8, v9) )\n    {\n      GJEffectManager::storeTriggeredID(a1->m_effectManager, v8, v9);\n      if ( a3->m_objectID == 1268 )\n      {\n        memset(&v10, 0, sizeof(v10));\n        SpawnTriggerGameObject::updateRemapKeys((SpawnTriggerGameObject *)a3, &v10);\n        std::_Vector_base<int>::~_Vector_base((void **)&v10.m_start);\n      }\n      a3->triggerObject(a3, a1, a2->m_uniqueID, nullptr);\n    }\n    ((void (__fastcall *)(EffectGameObject *, _DWORD))a3->triggerActivated)(a3, 0);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::playerTouchedTrigger from 0x48cb68 to 0x48cc68 (256 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::collisionCheckObjects @ 0x492a96\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 - 0x48CB72)                ; +0x0, 0x48cb68\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x48cb6a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x48cb6e\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x48cb70\nMOV             R4, R2                                                 ; +0xa, 0x48cb72\nSUB             SP, SP, #0x1C                                          ; +0xc, 0x48cb74\nLDR             R2, [R3]                                               ; +0xe, 0x48cb76\nMOV             R8, R1                                                 ; +0x10, 0x48cb78\nLDR.W           R1, [R4,#0x374]                                        ; +0x12, 0x48cb7a\nMOV             R5, R0                                                 ; +0x16, 0x48cb7e\nMOV             R7, R3                                                 ; +0x18, 0x48cb80\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x1a, 0x48cb82\nMOVW            R2, #0xE38                                             ; +0x1c, 0x48cb84\nCMP             R1, R2                                                 ; +0x20, 0x48cb88\nBNE             loc_48CB9A                                             ; +0x22, 0x48cb8a\nLDR             R3, [R4]                                               ; +0x24, 0x48cb8c\nMOV             R0, R4                                                 ; +0x26, 0x48cb8e\nLDR.W           R1, [R5,#0x338]                                        ; +0x28, 0x48cb90\nLDR.W           R3, [R3,#0x388]                                        ; +0x2c, 0x48cb94\nBLX             R3                                                     ; +0x30, 0x48cb98\nLDRB.W          R3, [R4,#0x504]                                        ; +0x32, 0x48cb9a\nCMP             R3, #0                                                 ; +0x36, 0x48cb9e\nBEQ             loc_48CC56                                             ; +0x38, 0x48cba0\nLDRB.W          R3, [R4,#0x60C]                                        ; +0x3a, 0x48cba2\nCBNZ            R3, loc_48CBAE                                         ; +0x3e, 0x48cba6\nLDR.W           R3, [R8,#0x304]                                        ; +0x40, 0x48cba8\nB               loc_48CBB0                                             ; +0x44, 0x48cbac\nMOVS            R3, #0                                                 ; +0x46, 0x48cbae\nLDR.W           R2, [R4,#0x304]                                        ; +0x48, 0x48cbb0\nADD.W           R9, R5, #0x3EC                                         ; +0x4c, 0x48cbb4\nMOV             R1, SP                                                 ; +0x50, 0x48cbb8\nMOV             R6, SP                                                 ; +0x52, 0x48cbba\nMOV             R0, R9                                                 ; +0x54, 0x48cbbc\nSTMEA.W         SP, {R2,R3}                                            ; +0x56, 0x48cbbe\nBL              _ZNKSt8_Rb_treeISt4pairIiiES0_IKS1_iESt10_Select1stIS3_ESt4lessIS1_ESaIS3_EE4findERS2_; std::_Rb_tree<std::pair<int,int>,std::pair<std::pair<int,int> const,int>,std::_Select1st<std::pair<std::pair<int,int> const,int>>,std::less<std::pair<int,int>>,std::allocator<std::pair<std::pair<int,int> const,int>>>::find(std::pair<int,int> const&) ; +0x5a, 0x48cbc2\nLDRB.W          R3, [R4,#0x5C4]                                        ; +0x5e, 0x48cbc6\nCBZ             R3, loc_48CBEE                                         ; +0x62, 0x48cbca\nADD.W           R3, R5, #0x3F0                                         ; +0x64, 0x48cbcc\nCMP             R0, R3                                                 ; +0x68, 0x48cbd0\nBNE             loc_48CBE0                                             ; +0x6a, 0x48cbd2\nLDR.W           R0, [R5,#0x690]; this                                  ; +0x6c, 0x48cbd4\nLDMFD.W         SP, {R1,R2}; int                                       ; +0x70, 0x48cbd8\nBL              _ZN15GJEffectManager17removeTriggeredIDEii; GJEffectManager::removeTriggeredID(int,int) ; +0x74, 0x48cbdc\nMOV             R0, R9                                                 ; +0x78, 0x48cbe0\nMOV             R1, R6                                                 ; +0x7a, 0x48cbe2\nBL              _ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_; std::map<std::pair<int,int>,int>::operator[](std::pair<int,int> const&) ; +0x7c, 0x48cbe4\nLDR.W           R3, [R5,#0x338]                                        ; +0x80, 0x48cbe8\nSTR             R3, [R0]                                               ; +0x84, 0x48cbec\nLDR.W           R0, [R5,#0x690]; this                                  ; +0x86, 0x48cbee\nLDMFD.W         SP, {R1,R2}; int                                       ; +0x8a, 0x48cbf2\nBL              _ZN15GJEffectManager16hasBeenTriggeredEii; GJEffectManager::hasBeenTriggered(int,int) ; +0x8e, 0x48cbf6\nMOV             R6, R0                                                 ; +0x92, 0x48cbfa\nCBNZ            R0, loc_48CC3E                                         ; +0x94, 0x48cbfc\nLDMFD.W         SP, {R1,R2}; int                                       ; +0x96, 0x48cbfe\nLDR.W           R0, [R5,#0x690]; this                                  ; +0x9a, 0x48cc02\nBL              _ZN15GJEffectManager16storeTriggeredIDEii; GJEffectManager::storeTriggeredID(int,int) ; +0x9e, 0x48cc06\nLDR.W           R2, [R4,#0x374]                                        ; +0xa2, 0x48cc0a\nMOVW            R3, #0x4F4                                             ; +0xa6, 0x48cc0e\nCMP             R2, R3                                                 ; +0xaa, 0x48cc12\nBNE             loc_48CC2C                                             ; +0xac, 0x48cc14\nSTR             R6, [SP,#0x1C+var_14]                                  ; +0xae, 0x48cc16\nMOV             R0, R4                                                 ; +0xb0, 0x48cc18\nSTR             R6, [SP,#0x1C+var_10]                                  ; +0xb2, 0x48cc1a\nSTR             R6, [SP,#0x1C+var_C]                                   ; +0xb4, 0x48cc1c\nADD             R6, SP, #0x1C+var_14                                   ; +0xb6, 0x48cc1e\nMOV             R1, R6                                                 ; +0xb8, 0x48cc20\nBL              _ZN22SpawnTriggerGameObject15updateRemapKeysERKSt6vectorIiSaIiEE; SpawnTriggerGameObject::updateRemapKeys(std::vector<int> const&) ; +0xba, 0x48cc22\nMOV             R0, R6                                                 ; +0xbe, 0x48cc26\nBL              _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() ; +0xc0, 0x48cc28\nLDR             R3, [R4]                                               ; +0xc4, 0x48cc2c\nMOV             R0, R4                                                 ; +0xc6, 0x48cc2e\nMOV             R1, R5                                                 ; +0xc8, 0x48cc30\nLDR.W           R2, [R8,#0x304]                                        ; +0xca, 0x48cc32\nLDR.W           R6, [R3,#0x280]                                        ; +0xce, 0x48cc36\nMOVS            R3, #0                                                 ; +0xd2, 0x48cc3a\nBLX             R6                                                     ; +0xd4, 0x48cc3c\nLDR             R3, [R4]                                               ; +0xd6, 0x48cc3e\nMOV             R0, R4                                                 ; +0xd8, 0x48cc40\nMOVS            R1, #0                                                 ; +0xda, 0x48cc42\nLDR.W           R3, [R3,#0x2E0]                                        ; +0xdc, 0x48cc44\nBLX             R3                                                     ; +0xe0, 0x48cc48\nB               loc_48CC56                                             ; +0xe2, 0x48cc4a\nMOV             R0, R6                                                 ; +0xe4, 0x48cc4c\nBL              _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() ; +0xe6, 0x48cc4e\nBL              __cxa_end_cleanup                                      ; +0xea, 0x48cc52\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xee, 0x48cc56\nLDR             R3, [R7]                                               ; +0xf0, 0x48cc58\nCMP             R2, R3                                                 ; +0xf2, 0x48cc5a\nBEQ             loc_48CC62                                             ; +0xf4, 0x48cc5c\nBLX             __stack_chk_fail                                       ; +0xf6, 0x48cc5e\nADD             SP, SP, #0x1C                                          ; +0xfa, 0x48cc62\nPOP.W           {R4-R9,PC}                                             ; +0xfc, 0x48cc64", "xrefs": ["GJBaseGameLayer::collisionCheckObjects @ 0x492a96"], "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"}