{"type": "func", "start": 8982240, "end": 8982468, "name": "GJBaseGameLayer::addPickupTrigger", "pseudocode": "// \n// GJBaseGameLayer::addPickupTrigger from 0x890ee0 to 0x890fc4 (228 bytes)\n// \n// 2 xrefs:\n// > CountTriggerGameObject::triggerObject @ 0x770818\n// > <???> @ 0x43350\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::addPickupTrigger(GJBaseGameLayer *a1, CountTriggerGameObject *a2)\n{\n  int m_pickupTriggerMode; // w0\n  int m_itemID; // w19\n  int v6; // w0\n  int v7; // w0\n  float m_pickupTriggerMultiplier; // s1\n  int v9; // w0\n\n  m_pickupTriggerMode = a2->m_pickupTriggerMode;\n  m_itemID = a2->m_itemID;\n  if ( m_pickupTriggerMode == 1 )\n  {\n    v9 = GJEffectManager::countForItem(a1->m_effectManager, m_itemID);\n    GJEffectManager::updateCountForItem(\n      a1->m_effectManager,\n      m_itemID,\n      llroundf((float)v9 * a2->m_pickupTriggerMultiplier));\n  }\n  else if ( m_pickupTriggerMode == 2 )\n  {\n    v7 = GJEffectManager::countForItem(a1->m_effectManager, m_itemID);\n    m_pickupTriggerMultiplier = a2->m_pickupTriggerMultiplier;\n    if ( m_pickupTriggerMultiplier != 0.0 )\n      GJEffectManager::updateCountForItem(\n        a1->m_effectManager,\n        m_itemID,\n        llroundf((float)v7 / m_pickupTriggerMultiplier));\n  }\n  else if ( a2->m_isOverride )\n  {\n    GJEffectManager::updateCountForItem(a1->m_effectManager, m_itemID, a2->m_pickupCount);\n  }\n  else\n  {\n    GJEffectManager::addCountToItem(a1->m_effectManager, m_itemID, a2->m_pickupCount);\n  }\n  v6 = GJEffectManager::countForItem(a1->m_effectManager, m_itemID);\n  GJBaseGameLayer::updateCounters(a1, m_itemID, v6);\n}", "assembly": "; \n; GJBaseGameLayer::addPickupTrigger from 0x890ee0 to 0x890fc4 (228 bytes)\n; \n; 2 xrefs:\n; > CountTriggerGameObject::triggerObject @ 0x770818\n; > <???> @ 0x43350\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\nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x890ee0\nMOV             X29, SP                                                ; +0x4, 0x890ee4\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x890ee8\nMOV             X20, X0                                                ; +0xc, 0x890eec\nLDR             W0, [X1,#0x720]                                        ; +0x10, 0x890ef0\nSTR             X21, [SP,#0x30+var_10]                                 ; +0x14, 0x890ef4\nMOV             X21, X1                                                ; +0x18, 0x890ef8\nCMP             W0, #1                                                 ; +0x1c, 0x890efc\nLDR             W19, [X1,#0x680]                                       ; +0x20, 0x890f00\nB.EQ            loc_890F84                                             ; +0x24, 0x890f04\nCMP             W0, #2                                                 ; +0x28, 0x890f08\nB.EQ            loc_890F50                                             ; +0x2c, 0x890f0c\nLDRB            W0, [X1,#0x725]                                        ; +0x30, 0x890f10\nCBNZ            W0, loc_890FB0                                         ; +0x34, 0x890f14\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x38, 0x890f18\nMOV             W1, W19; int                                           ; +0x3c, 0x890f1c\nLDR             W2, [X21,#0x71C]; int                                  ; +0x40, 0x890f20\nBL              _ZN15GJEffectManager14addCountToItemEii; GJEffectManager::addCountToItem(int,int) ; +0x44, 0x890f24\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x48, 0x890f28\nMOV             W1, W19; int                                           ; +0x4c, 0x890f2c\nBL              _ZN15GJEffectManager12countForItemEi; GJEffectManager::countForItem(int) ; +0x50, 0x890f30\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x54, 0x890f34\nMOV             W2, W0; int                                            ; +0x58, 0x890f38\nMOV             W1, W19; int                                           ; +0x5c, 0x890f3c\nMOV             X0, X20; this                                          ; +0x60, 0x890f40\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x64, 0x890f44\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x68, 0x890f48\nB               _ZN15GJBaseGameLayer14updateCountersEii; GJBaseGameLayer::updateCounters(int,int) ; +0x6c, 0x890f4c\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x70, 0x890f50\nMOV             W1, W19; int                                           ; +0x74, 0x890f54\nBL              _ZN15GJEffectManager12countForItemEi; GJEffectManager::countForItem(int) ; +0x78, 0x890f58\nLDR             S1, [X21,#0x728]                                       ; +0x7c, 0x890f5c\nFCMP            S1, #0.0                                               ; +0x80, 0x890f60\nB.EQ            loc_890F28                                             ; +0x84, 0x890f64\nSCVTF           S0, W0                                                 ; +0x88, 0x890f68\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x8c, 0x890f6c\nMOV             W1, W19; int                                           ; +0x90, 0x890f70\nFDIV            S0, S0, S1                                             ; +0x94, 0x890f74\nFCVTAS          W2, S0; int                                            ; +0x98, 0x890f78\nBL              _ZN15GJEffectManager18updateCountForItemEii; GJEffectManager::updateCountForItem(int,int) ; +0x9c, 0x890f7c\nB               loc_890F28                                             ; +0xa0, 0x890f80\nLDR             X0, [X20,#0x9A8]; this                                 ; +0xa4, 0x890f84\nMOV             W1, W19; int                                           ; +0xa8, 0x890f88\nBL              _ZN15GJEffectManager12countForItemEi; GJEffectManager::countForItem(int) ; +0xac, 0x890f8c\nSCVTF           S0, W0                                                 ; +0xb0, 0x890f90\nLDR             X0, [X20,#0x9A8]; this                                 ; +0xb4, 0x890f94\nLDR             S1, [X21,#0x728]                                       ; +0xb8, 0x890f98\nMOV             W1, W19; int                                           ; +0xbc, 0x890f9c\nFMUL            S0, S0, S1                                             ; +0xc0, 0x890fa0\nFCVTAS          W2, S0; int                                            ; +0xc4, 0x890fa4\nBL              _ZN15GJEffectManager18updateCountForItemEii; GJEffectManager::updateCountForItem(int,int) ; +0xc8, 0x890fa8\nB               loc_890F28                                             ; +0xcc, 0x890fac\nLDR             X0, [X20,#0x9A8]; this                                 ; +0xd0, 0x890fb0\nMOV             W1, W19; int                                           ; +0xd4, 0x890fb4\nLDR             W2, [X21,#0x71C]; int                                  ; +0xd8, 0x890fb8\nBL              _ZN15GJEffectManager18updateCountForItemEii; GJEffectManager::updateCountForItem(int,int) ; +0xdc, 0x890fbc\nB               loc_890F28                                             ; +0xe0, 0x890fc0", "xrefs": ["CountTriggerGameObject::triggerObject @ 0x770818", "<???> @ 0x43350"], "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"}