{"type": "func", "start": 4808252, "end": 4808714, "name": "GJBaseGameLayer::controlTriggersInGroup", "pseudocode": "// \n// GJBaseGameLayer::controlTriggersInGroup from 0x495e3c to 0x49600a (462 bytes)\n// \n// 1 xrefs:\n// > TriggerControlGameObject::triggerObject @ 0x3e51cc\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::controlTriggersInGroup(GJBaseGameLayer *a1, int a2, GJActionCommand a3)\n{\n  cocos2d::CCArray *Group; // r0\n  cocos2d::ccArray *data; // r2\n  cocos2d::CCObject **arr; // r7\n  cocos2d::CCObject **v8; // r6\n  int v9; // r11\n  int v10; // t1\n  int v11; // r3\n  int v12; // r2\n  GJBaseGameLayer *v13; // r0\n  EnterEffectObject *v14; // r1\n  std::vector<EnterEffectInstance> *p_m_fadeEffectInstances; // r2\n\n  Group = GJBaseGameLayer::getGroup(a1, a2);\n  if ( Group )\n  {\n    data = Group->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v8 = &arr[data->num] + 0x3FFFFFFF;\n      while ( 1 )\n      {\n        while ( 1 )\n        {\n          while ( 1 )\n          {\n            do\n            {\n              if ( arr <= v8 )\n              {\n                v10 = (int)*arr++;\n                v9 = v10;\n                if ( v10 )\n                  continue;\n              }\n              return;\n            }\n            while ( !*(_BYTE *)(v9 + 1084) );\n            v11 = *(_DWORD *)(v9 + 884);\n            if ( v11 > 2924 )\n              break;\n            if ( v11 < 2919 )\n            {\n              if ( v11 == 2903 )\n              {\n                GJBaseGameLayer::controlGradientTrigger(a1, (GradientTriggerObject *)v9, a3);\n              }\n              else if ( v11 > 2903 )\n              {\n                if ( v11 != 2907 )\n                {\n                  if ( v11 > 2907 )\n                  {\n                    if ( (unsigned int)(v11 - 2909) > 8 )\n                      goto LABEL_47;\n                  }\n                  else if ( v11 > 2905 )\n                  {\n                    goto LABEL_47;\n                  }\n                }\n              }\n              else\n              {\n                if ( v11 == 1913 )\n                  goto LABEL_46;\n                if ( v11 > 1913 )\n                {\n                  if ( v11 == 1916 )\n                    goto LABEL_46;\n                  v12 = 2015;\nLABEL_28:\n                  if ( v11 == v12 )\n                  {\nLABEL_46:\n                    GJGameState::controlTweenAction(&a1->m_gameState, *(_DWORD *)(v9 + 772), -1, a3);\n                  }\n                  else\n                  {\nLABEL_47:\n                    if ( v11 == 1346 )\n                    {\n                      if ( *(_BYTE *)(v9 + 1348) )\n                        GJBaseGameLayer::controlDynamicRotateCommand(a1, (EffectGameObject *)v9, -1, a3);\n                    }\n                    else if ( v11 == 901 && *(_BYTE *)(v9 + 1348) )\n                    {\n                      GJBaseGameLayer::controlDynamicMoveCommand(a1, (EffectGameObject *)v9, -1, a3);\n                    }\n                    GJEffectManager::controlActionsForTrigger(a1->m_effectManager, (EffectGameObject *)v9, a3);\n                  }\n                }\n                else\n                {\n                  if ( v11 != 1615 )\n                    goto LABEL_47;\n                  *(_BYTE *)(v9 + 1672) = a3 != Resume;\n                }\n              }\n            }\n          }\n          if ( v11 == 3009 )\n          {\n            v13 = a1;\n            v14 = (EnterEffectObject *)v9;\n            p_m_fadeEffectInstances = &a1->m_gameState.m_fadeEffectInstances;\n            goto LABEL_41;\n          }\n          if ( v11 > 3009 )\n            break;\n          if ( v11 == 3006 )\n          {\n            v13 = a1;\n            v14 = (EnterEffectObject *)v9;\n            p_m_fadeEffectInstances = &a1->m_gameState.m_moveEffectInstances;\n          }\n          else\n          {\n            if ( v11 <= 3006 )\n            {\n              v12 = 2999;\n              goto LABEL_28;\n            }\n            if ( v11 == 3007 )\n            {\n              p_m_fadeEffectInstances = &a1->m_gameState.m_rotateEffectInstances;\n              v13 = a1;\n              v14 = (EnterEffectObject *)v9;\n            }\n            else\n            {\n              v13 = a1;\n              v14 = (EnterEffectObject *)v9;\n              p_m_fadeEffectInstances = &a1->m_gameState.m_scaleEffectInstances;\n            }\n          }\nLABEL_41:\n          GJBaseGameLayer::controlAreaEffect(v13, v14, p_m_fadeEffectInstances, a3);\n        }\n        if ( v11 == 3016 )\n        {\n          GJBaseGameLayer::controlAdvancedFollowCommand(a1, (AdvancedFollowTriggerObject *)v9, -1, a3);\n        }\n        else\n        {\n          if ( v11 <= 3016 )\n          {\n            if ( v11 != 3010 )\n              goto LABEL_47;\n            v13 = a1;\n            v14 = (EnterEffectObject *)v9;\n            p_m_fadeEffectInstances = &a1->m_gameState.m_tintEffectInstances;\n            goto LABEL_41;\n          }\n          if ( v11 == 3602 )\n          {\n            GJBaseGameLayer::stopSFXTrigger(a1, (SFXTriggerGameObject *)v9);\n          }\n          else\n          {\n            if ( v11 != 3604 )\n              goto LABEL_47;\n            GJBaseGameLayer::controlEventLink(a1, *(_DWORD *)(v9 + 772), -1, a3);\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::controlTriggersInGroup from 0x495e3c to 0x49600a (462 bytes)\n; \n; 1 xrefs:\n; > TriggerControlGameObject::triggerObject @ 0x3e51cc\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          {R3-R11,LR}                                            ; +0x0, 0x495e3c\nMOV             R4, R0                                                 ; +0x4, 0x495e40\nMOV             R5, R2                                                 ; +0x6, 0x495e42\nBL              _ZN15GJBaseGameLayer8getGroupEi; GJBaseGameLayer::getGroup(int) ; +0x8, 0x495e44\nCMP             R0, #0                                                 ; +0xc, 0x495e48\nBEQ.W           locret_496006                                          ; +0xe, 0x495e4a\nLDR             R2, [R0,#0x34]                                         ; +0x12, 0x495e4e\nLDR             R3, [R2]                                               ; +0x14, 0x495e50\nCMP             R3, #0                                                 ; +0x16, 0x495e52\nBEQ.W           locret_496006                                          ; +0x18, 0x495e54\nADD.W           R3, R3, #0x40000000                                    ; +0x1c, 0x495e58\nLDR             R7, [R2,#0xC]                                          ; +0x20, 0x495e5c\nSUBS            R3, #1                                                 ; +0x22, 0x495e5e\nMOVW            R8, #0xB6C                                             ; +0x24, 0x495e60\nMOVW            R9, #0x542                                             ; +0x28, 0x495e64\nMOVW            R10, #0x385                                            ; +0x2c, 0x495e68\nADD.W           R6, R7, R3,LSL#2                                       ; +0x30, 0x495e6c\nCMP             R7, R6                                                 ; +0x34, 0x495e70\nBHI.W           locret_496006                                          ; +0x36, 0x495e72\nLDR.W           R11, [R7],#4                                           ; +0x3a, 0x495e76\nCMP.W           R11, #0                                                ; +0x3e, 0x495e7a\nBEQ.W           locret_496006                                          ; +0x42, 0x495e7e\nLDRB.W          R3, [R11,#0x43C]                                       ; +0x46, 0x495e82\nCMP             R3, #0                                                 ; +0x4a, 0x495e86\nBEQ             loc_495E70                                             ; +0x4c, 0x495e88\nLDR.W           R3, [R11,#0x374]                                       ; +0x4e, 0x495e8a\nCMP             R3, R8                                                 ; +0x52, 0x495e8e\nBGT             loc_495EF4                                             ; +0x54, 0x495e90\nMOVW            R2, #0xB67                                             ; +0x56, 0x495e92\nCMP             R3, R2                                                 ; +0x5a, 0x495e96\nBGE             loc_495E70                                             ; +0x5c, 0x495e98\nMOVW            R2, #0xB57                                             ; +0x5e, 0x495e9a\nCMP             R3, R2                                                 ; +0x62, 0x495e9e\nBEQ.W           loc_495FA6                                             ; +0x64, 0x495ea0\nBGT             loc_495ED6                                             ; +0x68, 0x495ea4\nMOVW            R2, #0x779                                             ; +0x6a, 0x495ea6\nCMP             R3, R2                                                 ; +0x6e, 0x495eaa\nBEQ.W           loc_495FB2                                             ; +0x70, 0x495eac\nBGT             loc_495EC8                                             ; +0x74, 0x495eb0\nMOVW            R2, #0x64F                                             ; +0x76, 0x495eb2\nCMP             R3, R2                                                 ; +0x7a, 0x495eb6\nBNE.W           loc_495FC6                                             ; +0x7c, 0x495eb8\nSUBS            R3, R5, #2                                             ; +0x80, 0x495ebc\nIT NE                                                                  ; +0x82, 0x495ebe\nMOVNE           R3, #1                                                 ; +0x84, 0x495ec0\nSTRB.W          R3, [R11,#0x688]                                       ; +0x86, 0x495ec2\nB               loc_495E70                                             ; +0x8a, 0x495ec6\nMOVW            R2, #0x77C                                             ; +0x8c, 0x495ec8\nCMP             R3, R2                                                 ; +0x90, 0x495ecc\nBEQ             loc_495FB2                                             ; +0x92, 0x495ece\nMOVW            R2, #0x7DF                                             ; +0x94, 0x495ed0\nB               loc_495F0C                                             ; +0x98, 0x495ed4\nMOVW            R2, #0xB5B                                             ; +0x9a, 0x495ed6\nCMP             R3, R2                                                 ; +0x9e, 0x495eda\nBEQ             loc_495E70                                             ; +0xa0, 0x495edc\nBGT             loc_495EEA                                             ; +0xa2, 0x495ede\nMOVW            R2, #0xB59                                             ; +0xa4, 0x495ee0\nCMP             R3, R2                                                 ; +0xa8, 0x495ee4\nBLE             loc_495E70                                             ; +0xaa, 0x495ee6\nB               loc_495FC6                                             ; +0xac, 0x495ee8\nSUBW            R2, R3, #0xB5D                                         ; +0xae, 0x495eea\nCMP             R2, #8                                                 ; +0xb2, 0x495eee\nBLS             loc_495E70                                             ; +0xb4, 0x495ef0\nB               loc_495FC6                                             ; +0xb6, 0x495ef2\nMOVW            R2, #0xBC1                                             ; +0xb8, 0x495ef4\nCMP             R3, R2                                                 ; +0xbc, 0x495ef8\nBEQ             loc_495F82                                             ; +0xbe, 0x495efa\nBGT             loc_495F2A                                             ; +0xc0, 0x495efc\nMOVW            R2, #0xBBE                                             ; +0xc2, 0x495efe\nCMP             R3, R2                                                 ; +0xc6, 0x495f02\nBEQ             loc_495F68                                             ; +0xc8, 0x495f04\nBGT             loc_495F12                                             ; +0xca, 0x495f06\nMOVW            R2, #0xBB7                                             ; +0xcc, 0x495f08\nCMP             R3, R2                                                 ; +0xd0, 0x495f0c\nBEQ             loc_495FB2                                             ; +0xd2, 0x495f0e\nB               loc_495FC6                                             ; +0xd4, 0x495f10\nMOVW            R2, #0xBBF                                             ; +0xd6, 0x495f12\nCMP             R3, R2                                                 ; +0xda, 0x495f16\nBEQ             loc_495F72                                             ; +0xdc, 0x495f18\nCMP.W           R3, #0xBC0                                             ; +0xde, 0x495f1a\nBNE             loc_495FC6                                             ; +0xe2, 0x495f1e\nMOV             R0, R4                                                 ; +0xe4, 0x495f20\nMOV             R1, R11                                                ; +0xe6, 0x495f22\nADD.W           R2, R4, #0x4F8                                         ; +0xe8, 0x495f24\nB               loc_495F7A                                             ; +0xec, 0x495f28\nMOVW            R2, #0xBC8                                             ; +0xee, 0x495f2a\nCMP             R3, R2                                                 ; +0xf2, 0x495f2e\nBEQ             loc_495F8C                                             ; +0xf4, 0x495f30\nBGT             loc_495F46                                             ; +0xf6, 0x495f32\nMOVW            R2, #0xBC2                                             ; +0xf8, 0x495f34\nCMP             R3, R2                                                 ; +0xfc, 0x495f38\nBNE             loc_495FC6                                             ; +0xfe, 0x495f3a\nMOV             R0, R4                                                 ; +0x100, 0x495f3c\nMOV             R1, R11                                                ; +0x102, 0x495f3e\nADD.W           R2, R4, #0x510                                         ; +0x104, 0x495f40\nB               loc_495F7A                                             ; +0x108, 0x495f44\nMOVW            R2, #0xE12                                             ; +0x10a, 0x495f46\nCMP             R3, R2                                                 ; +0x10e, 0x495f4a\nBEQ             loc_495F9C                                             ; +0x110, 0x495f4c\nMOVW            R2, #0xE14                                             ; +0x112, 0x495f4e\nCMP             R3, R2                                                 ; +0x116, 0x495f52\nBNE             loc_495FC6                                             ; +0x118, 0x495f54\nMOV             R0, R4                                                 ; +0x11a, 0x495f56\nLDR.W           R1, [R11,#0x304]                                       ; +0x11c, 0x495f58\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x120, 0x495f5c\nMOV             R3, R5                                                 ; +0x124, 0x495f60\nBL              _ZN15GJBaseGameLayer16controlEventLinkEii15GJActionCommand; GJBaseGameLayer::controlEventLink(int,int,GJActionCommand) ; +0x126, 0x495f62\nB               loc_495E70                                             ; +0x12a, 0x495f66\nMOV             R0, R4                                                 ; +0x12c, 0x495f68\nMOV             R1, R11                                                ; +0x12e, 0x495f6a\nADD.W           R2, R4, #0x4E0                                         ; +0x130, 0x495f6c\nB               loc_495F7A                                             ; +0x134, 0x495f70\nADDW            R2, R4, #0x4EC                                         ; +0x136, 0x495f72\nMOV             R0, R4                                                 ; +0x13a, 0x495f76\nMOV             R1, R11                                                ; +0x13c, 0x495f78\nMOV             R3, R5                                                 ; +0x13e, 0x495f7a\nBL              _ZN15GJBaseGameLayer17controlAreaEffectEP17EnterEffectObjectPSt6vectorI19EnterEffectInstanceSaIS3_EE15GJActionCommand; GJBaseGameLayer::controlAreaEffect(EnterEffectObject *,std::vector<EnterEffectInstance> *,GJActionCommand) ; +0x140, 0x495f7c\nB               loc_495E70                                             ; +0x144, 0x495f80\nMOV             R0, R4                                                 ; +0x146, 0x495f82\nMOV             R1, R11                                                ; +0x148, 0x495f84\nADDW            R2, R4, #0x504                                         ; +0x14a, 0x495f86\nB               loc_495F7A                                             ; +0x14e, 0x495f8a\nMOV             R0, R4                                                 ; +0x150, 0x495f8c\nMOV             R1, R11                                                ; +0x152, 0x495f8e\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x154, 0x495f90\nMOV             R3, R5                                                 ; +0x158, 0x495f94\nBL              _ZN15GJBaseGameLayer28controlAdvancedFollowCommandEP27AdvancedFollowTriggerObjecti15GJActionCommand; GJBaseGameLayer::controlAdvancedFollowCommand(AdvancedFollowTriggerObject *,int,GJActionCommand) ; +0x15a, 0x495f96\nB               loc_495E70                                             ; +0x15e, 0x495f9a\nMOV             R0, R4; this                                           ; +0x160, 0x495f9c\nMOV             R1, R11; SFXTriggerGameObject *                        ; +0x162, 0x495f9e\nBL              _ZN15GJBaseGameLayer14stopSFXTriggerEP20SFXTriggerGameObject; GJBaseGameLayer::stopSFXTrigger(SFXTriggerGameObject *) ; +0x164, 0x495fa0\nB               loc_495E70                                             ; +0x168, 0x495fa4\nMOV             R0, R4                                                 ; +0x16a, 0x495fa6\nMOV             R1, R11                                                ; +0x16c, 0x495fa8\nMOV             R2, R5                                                 ; +0x16e, 0x495faa\nBL              _ZN15GJBaseGameLayer22controlGradientTriggerEP21GradientTriggerObject15GJActionCommand; GJBaseGameLayer::controlGradientTrigger(GradientTriggerObject *,GJActionCommand) ; +0x170, 0x495fac\nB               loc_495E70                                             ; +0x174, 0x495fb0\nADD.W           R0, R4, #0x148                                         ; +0x176, 0x495fb2\nLDR.W           R1, [R11,#0x304]                                       ; +0x17a, 0x495fb6\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x17e, 0x495fba\nMOV             R3, R5                                                 ; +0x182, 0x495fbe\nBL              _ZN11GJGameState18controlTweenActionEii15GJActionCommand; GJGameState::controlTweenAction(int,int,GJActionCommand) ; +0x184, 0x495fc0\nB               loc_495E70                                             ; +0x188, 0x495fc4\nCMP             R3, R9                                                 ; +0x18a, 0x495fc6\nBNE             loc_495FE0                                             ; +0x18c, 0x495fc8\nLDRB.W          R3, [R11,#0x544]                                       ; +0x18e, 0x495fca\nCBZ             R3, loc_495FF8                                         ; +0x192, 0x495fce\nMOV             R0, R4                                                 ; +0x194, 0x495fd0\nMOV             R1, R11                                                ; +0x196, 0x495fd2\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x198, 0x495fd4\nMOV             R3, R5                                                 ; +0x19c, 0x495fd8\nBL              _ZN15GJBaseGameLayer27controlDynamicRotateCommandEP16EffectGameObjecti15GJActionCommand; GJBaseGameLayer::controlDynamicRotateCommand(EffectGameObject *,int,GJActionCommand) ; +0x19e, 0x495fda\nB               loc_495FF8                                             ; +0x1a2, 0x495fde\nCMP             R3, R10                                                ; +0x1a4, 0x495fe0\nBNE             loc_495FF8                                             ; +0x1a6, 0x495fe2\nLDRB.W          R3, [R11,#0x544]                                       ; +0x1a8, 0x495fe4\nCBZ             R3, loc_495FF8                                         ; +0x1ac, 0x495fe8\nMOV             R0, R4                                                 ; +0x1ae, 0x495fea\nMOV             R1, R11                                                ; +0x1b0, 0x495fec\nMOV.W           R2, #0xFFFFFFFF                                        ; +0x1b2, 0x495fee\nMOV             R3, R5                                                 ; +0x1b6, 0x495ff2\nBL              _ZN15GJBaseGameLayer25controlDynamicMoveCommandEP16EffectGameObjecti15GJActionCommand; GJBaseGameLayer::controlDynamicMoveCommand(EffectGameObject *,int,GJActionCommand) ; +0x1b8, 0x495ff4\nLDR.W           R0, [R4,#0x690]; this                                  ; +0x1bc, 0x495ff8\nMOV             R1, R11                                                ; +0x1c0, 0x495ffc\nMOV             R2, R5                                                 ; +0x1c2, 0x495ffe\nBL              _ZN15GJEffectManager24controlActionsForTriggerEP16EffectGameObject15GJActionCommand; GJEffectManager::controlActionsForTrigger(EffectGameObject *,GJActionCommand) ; +0x1c4, 0x496000\nB               loc_495E70                                             ; +0x1c8, 0x496004\nPOP.W           {R3-R11,PC}                                            ; +0x1ca, 0x496006", "xrefs": ["TriggerControlGameObject::triggerObject @ 0x3e51cc"], "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"}