{"type": "func", "start": 4669788, "end": 4670100, "name": "GJBaseGameLayer::processAreaFadeGroupAction", "pseudocode": "// \n// GJBaseGameLayer::processAreaFadeGroupAction from 0x47415c to 0x474294 (312 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::processAreaEffects @ 0x496ab8\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::processAreaFadeGroupAction(\n        GJBaseGameLayer *a1,\n        cocos2d::CCArray *a2,\n        EnterEffectInstance *a3,\n        cocos2d::CCPoint a4,\n        bool a5)\n{\n  float x; // r10\n  cocos2d::CCArray *num; // r4\n  float m_fromOpacity; // s17\n  float m_toOpacity; // s19\n  cocos2d::ccArray *v11; // r3\n  cocos2d::CCObject **arr; // r7\n  char *v13; // r6\n  cocos2d::CCArray *v14; // r8\n  cocos2d::CCObject **v15; // r11\n  GameObject *v16; // r6\n  GameObject *v17; // t1\n  float AreaObjectValue; // r0\n  float v19; // s16\n  float v20; // s18\n  cocos2d::CCArray *TargetGroup; // r6\n  cocos2d::ccArray *data; // r3\n  int v23; // r6\n  cocos2d::CCObject **v24; // r3\n  unsigned int v25; // r6\n  GameObject **i; // r12\n  GameObject *v27; // r0\n  GameObject **v28; // r12\n  GameObject *v29; // t1\n  GameObject **v30; // [sp+14h] [bp-10h]\n  bool v31; // [sp+1Bh] [bp-9h] BYREF\n\n  x = a4.x;\n  num = a2;\n  m_fromOpacity = a3->m_fromOpacity;\n  m_toOpacity = a3->m_toOpacity;\n  a1->m_areaColorCount += cocos2d::CCArray::count(a2);\n  if ( num && (v11 = num->data, (num = (cocos2d::CCArray *)v11->num) != nullptr) )\n  {\n    arr = v11->arr;\n    v13 = (char *)&num[19173961].m_uID + 3;\n    num = nullptr;\n    v14 = nullptr;\n    v15 = &arr[(_DWORD)v13];\n    while ( arr <= v15 )\n    {\n      v17 = (GameObject *)*arr++;\n      v16 = v17;\n      if ( !v17 )\n        break;\n      if ( v16->m_isActivated )\n      {\n        v31 = 0;\n        v14 = (cocos2d::CCArray *)((char *)v14 + 1);\n        AreaObjectValue = GJBaseGameLayer::getAreaObjectValue(a1, a3, v16, (cocos2d::CCPoint *)LODWORD(x), &v31);\n        v19 = AreaObjectValue;\n        v20 = m_fromOpacity + (float)((float)(m_toOpacity - m_fromOpacity) * AreaObjectValue);\n        if ( LOBYTE(a4.y) )\n        {\n          TargetGroup = GJBaseGameLayer::getTargetGroup(a1, a3->m_targetGroupIndex, v16->m_uniqueID);\n          num = (cocos2d::CCArray *)((char *)&num->data + cocos2d::CCArray::count(TargetGroup) - 53);\n          if ( TargetGroup )\n          {\n            data = TargetGroup->data;\n            if ( data->num )\n            {\n              v23 = data->num + 0x40000000;\n              v24 = data->arr;\n              v25 = (unsigned int)&v24[v23 - 1];\n              for ( i = (GameObject **)v24; (unsigned int)i <= v25; i = v30 )\n              {\n                v29 = *i;\n                v28 = i + 1;\n                v27 = v29;\n                if ( !v29 )\n                  break;\n                v30 = v28;\n                GameObject::setAreaOpacity(v27, v20, v19, a1->m_gameState.m_commandIndex);\n              }\n            }\n          }\n        }\n        else\n        {\n          GameObject::setAreaOpacity(v16, v20, AreaObjectValue, a1->m_gameState.m_commandIndex);\n        }\n      }\n    }\n  }\n  else\n  {\n    v14 = num;\n  }\n  a1->m_areaColorCount += (int)num;\n  a1->m_areaColorCountTotal += (int)v14 + (_DWORD)num;\n}", "assembly": "; \n; GJBaseGameLayer::processAreaFadeGroupAction from 0x47415c to 0x474294 (312 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::processAreaEffects @ 0x496ab8\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          {R4-R11,LR}                                            ; +0x0, 0x47415c\nMOV             R10, R3                                                ; +0x4, 0x474160\nVPUSH           {D8-D9}                                                ; +0x6, 0x474162\nMOV             R5, R0                                                 ; +0xa, 0x474166\nLDR             R7, =(__stack_chk_guard_ptr - 0x474174)                ; +0xc, 0x474168\nMOV             R0, R1; this                                           ; +0xe, 0x47416a\nMOV             R9, R2                                                 ; +0x10, 0x47416c\nMOV             R4, R1                                                 ; +0x12, 0x47416e\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x14, 0x474170\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x16, 0x474172\nVLDR            S17, [R2,#0x84]                                        ; +0x18, 0x474174\nSUB             SP, SP, #0x24                                          ; +0x1c, 0x474178\nLDRB.W          R3, [SP,#0x24+arg_0]                                   ; +0x1e, 0x47417a\nVLDR            S19, [R2,#0x80]                                        ; +0x22, 0x47417e\nSTR             R3, [SP,#0x24+var_1C]                                  ; +0x26, 0x474182\nLDR             R3, [R7]                                               ; +0x28, 0x474184\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x2a, 0x474186\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2c, 0x474188\nMOVW            R2, #0x2D74                                            ; +0x30, 0x47418c\nSTR             R7, [SP,#0x24+var_18]                                  ; +0x34, 0x474190\nLDR             R3, [R5,R2]                                            ; +0x36, 0x474192\nADD             R0, R3                                                 ; +0x38, 0x474194\nSTR             R0, [R5,R2]                                            ; +0x3a, 0x474196\nCBZ             R4, loc_4741C2                                         ; +0x3c, 0x474198\nLDR             R3, [R4,#0x34]                                         ; +0x3e, 0x47419a\nLDR             R4, [R3]                                               ; +0x40, 0x47419c\nCBZ             R4, loc_4741C2                                         ; +0x42, 0x47419e\nADD.W           R6, R4, #0x40000000                                    ; +0x44, 0x4741a0\nLDR             R7, [R3,#0xC]                                          ; +0x48, 0x4741a4\nSUBS            R6, #1                                                 ; +0x4a, 0x4741a6\nMOVS            R4, #0                                                 ; +0x4c, 0x4741a8\nMOV             R8, R4                                                 ; +0x4e, 0x4741aa\nADD.W           R3, SP, #0x24+var_9                                    ; +0x50, 0x4741ac\nADD.W           R11, R7, R6,LSL#2                                      ; +0x54, 0x4741b0\nSTR             R3, [SP,#0x24+var_14]                                  ; +0x58, 0x4741b4\nCMP             R7, R11                                                ; +0x5a, 0x4741b6\nBHI             loc_4741C4                                             ; +0x5c, 0x4741b8\nLDR.W           R6, [R7],#4                                            ; +0x5e, 0x4741ba\nCBNZ            R6, loc_4741E8                                         ; +0x62, 0x4741be\nB               loc_4741C4                                             ; +0x64, 0x4741c0\nMOV             R8, R4                                                 ; +0x66, 0x4741c2\nMOVW            R2, #0x2D74                                            ; +0x68, 0x4741c4\nLDR             R3, [R5,R2]                                            ; +0x6c, 0x4741c8\nADD             R3, R4                                                 ; +0x6e, 0x4741ca\nSTR             R3, [R5,R2]                                            ; +0x70, 0x4741cc\nMOVW            R3, #0x2D84                                            ; +0x72, 0x4741ce\nADD             R4, R8                                                 ; +0x76, 0x4741d2\nLDR             R2, [R5,R3]                                            ; +0x78, 0x4741d4\nADD             R4, R2                                                 ; +0x7a, 0x4741d6\nSTR             R4, [R5,R3]                                            ; +0x7c, 0x4741d8\nLDR             R3, [SP,#0x24+var_18]                                  ; +0x7e, 0x4741da\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x80, 0x4741dc\nLDR             R3, [R3]                                               ; +0x82, 0x4741de\nCMP             R2, R3                                                 ; +0x84, 0x4741e0\nBEQ             loc_47428A                                             ; +0x86, 0x4741e2\nBLX             __stack_chk_fail                                       ; +0x88, 0x4741e4\nLDRB.W          R3, [R6,#0x291]                                        ; +0x8c, 0x4741e8\nCMP             R3, #0                                                 ; +0x90, 0x4741ec\nBEQ             loc_4741B6                                             ; +0x92, 0x4741ee\nMOVS            R3, #0                                                 ; +0x94, 0x4741f0\nSTRB.W          R3, [SP,#0x24+var_9]                                   ; +0x96, 0x4741f2\nLDR             R3, [SP,#0x24+var_14]                                  ; +0x9a, 0x4741f6\nMOV             R0, R5; this                                           ; +0x9c, 0x4741f8\nMOV             R1, R9; EnterEffectInstance *                          ; +0x9e, 0x4741fa\nMOV             R2, R6; GameObject *                                   ; +0xa0, 0x4741fc\nVMOV.F32        S18, S17                                               ; +0xa2, 0x4741fe\nADD.W           R8, R8, #1                                             ; +0xa6, 0x474202\nSTR             R3, [SP,#0x24+var_24]; bool *                          ; +0xaa, 0x474206\nMOV             R3, R10; cocos2d::CCPoint *                            ; +0xac, 0x474208\nBL              _ZN15GJBaseGameLayer18getAreaObjectValueEP19EnterEffectInstanceP10GameObjectRN7cocos2d7CCPointERb; GJBaseGameLayer::getAreaObjectValue(EnterEffectInstance *,GameObject *,cocos2d::CCPoint &,bool &) ; +0xae, 0x47420a\nLDR             R3, [SP,#0x24+var_1C]                                  ; +0xb2, 0x47420e\nVSUB.F32        S15, S19, S17                                          ; +0xb4, 0x474210\nVMOV            S16, R0                                                ; +0xb8, 0x474214\nVMLA.F32        S18, S15, S16                                          ; +0xbc, 0x474218\nCBNZ            R3, loc_474232                                         ; +0xc0, 0x47421c\nMOV             R0, R6; this                                           ; +0xc2, 0x47421e\nVMOV            R1, S18; float                                         ; +0xc4, 0x474220\nVMOV            R2, S16; float                                         ; +0xc8, 0x474224\nLDR.W           R3, [R5,#0x338]; int                                   ; +0xcc, 0x474228\nBL              _ZN10GameObject14setAreaOpacityEffi; GameObject::setAreaOpacity(float,float,int) ; +0xd0, 0x47422c\nB               loc_4741B6                                             ; +0xd4, 0x474230\nLDR.W           R2, [R6,#0x304]; int                                   ; +0xd6, 0x474232\nMOV             R0, R5; this                                           ; +0xda, 0x474236\nLDR.W           R1, [R9,#0xC0]; int                                    ; +0xdc, 0x474238\nSUBS            R4, #1                                                 ; +0xe0, 0x47423c\nBL              _ZN15GJBaseGameLayer14getTargetGroupEii; GJBaseGameLayer::getTargetGroup(int,int) ; +0xe2, 0x47423e\nMOV             R6, R0                                                 ; +0xe6, 0x474242\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xe8, 0x474244\nADD             R4, R0                                                 ; +0xec, 0x474248\nCMP             R6, #0                                                 ; +0xee, 0x47424a\nBEQ             loc_4741B6                                             ; +0xf0, 0x47424c\nLDR             R3, [R6,#0x34]                                         ; +0xf2, 0x47424e\nLDR             R6, [R3]                                               ; +0xf4, 0x474250\nCMP             R6, #0                                                 ; +0xf6, 0x474252\nBEQ             loc_4741B6                                             ; +0xf8, 0x474254\nADD.W           R6, R6, #0x40000000                                    ; +0xfa, 0x474256\nLDR             R3, [R3,#0xC]                                          ; +0xfe, 0x47425a\nSUBS            R6, #1                                                 ; +0x100, 0x47425c\nADD.W           R6, R3, R6,LSL#2                                       ; +0x102, 0x47425e\nMOV             R12, R3                                                ; +0x106, 0x474262\nCMP             R12, R6                                                ; +0x108, 0x474264\nBHI             loc_4741B6                                             ; +0x10a, 0x474266\nLDR.W           R0, [R12],#4; this                                     ; +0x10c, 0x474268\nCMP             R0, #0                                                 ; +0x110, 0x47426c\nBEQ             loc_4741B6                                             ; +0x112, 0x47426e\nVMOV            R1, S18; float                                         ; +0x114, 0x474270\nVMOV            R2, S16; float                                         ; +0x118, 0x474274\nLDR.W           R3, [R5,#0x338]; int                                   ; +0x11c, 0x474278\nSTR.W           R12, [SP,#0x24+var_10]                                 ; +0x120, 0x47427c\nBL              _ZN10GameObject14setAreaOpacityEffi; GameObject::setAreaOpacity(float,float,int) ; +0x124, 0x474280\nLDR.W           R12, [SP,#0x24+var_10]                                 ; +0x128, 0x474284\nB               loc_474264                                             ; +0x12c, 0x474288\nADD             SP, SP, #0x24 ; '$'                                    ; +0x12e, 0x47428a\nVPOP            {D8-D9}                                                ; +0x130, 0x47428c\nPOP.W           {R4-R11,PC}                                            ; +0x134, 0x474290", "xrefs": ["GJBaseGameLayer::processAreaEffects @ 0x496ab8"], "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"}