{"type": "func", "start": 4811532, "end": 4811908, "name": "GJBaseGameLayer::processAreaActions", "pseudocode": "// \n// GJBaseGameLayer::processAreaActions from 0x496b0c to 0x496c84 (376 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::processMoveActionsStep @ 0x496d10\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::processAreaActions(GJBaseGameLayer *a1, float a2, bool a3)\n{\n  _BOOL4 v5; // r7\n  int v6; // r6\n  GameObject *v7; // r5\n  int v8; // r5\n  int m_areaObjectsCount; // r2\n  int m_processedAreaObjectsIndex; // r1\n  GameObject *v11; // r2\n  int m_processedAreaObjectsCount; // r3\n  int v13; // r3\n  GameObject *v14; // r5\n  float m_positionX; // s14\n  float m_positionY; // s14\n  float m_scaleX; // r0\n  GameObject *v18; // [sp+8h] [bp-Ch] BYREF\n\n  v5 = a3;\n  v6 = 0;\n  LODWORD(a1->m_gameState.m_unkUint3) = a1->m_gameState.m_commandIndex - 1;\n  GJBaseGameLayer::processAreaEffects(a1, &a1->m_gameState.m_scaleEffectInstances, (GJAreaActionType)2, a2, a3);\n  GJBaseGameLayer::processAreaEffects(a1, &a1->m_gameState.m_rotateEffectInstances, Rotate, a2, v5);\n  GJBaseGameLayer::processAreaEffects(a1, &a1->m_gameState.m_moveEffectInstances, (GJAreaActionType)0, a2, v5);\n  while ( v6 < a1->m_processedAreaObjectsCount )\n  {\n    v7 = a1->m_processedAreaObjects.m_start[v6];\n    if ( v7->m_unk4C8 >= (signed int)a1->m_gameState.m_commandIndex )\n    {\n      if ( !v5 )\n        goto LABEL_8;\n    }\n    else\n    {\n      v7->m_isDirty = 1;\n      v7->m_isObjectRectDirty = 1;\n      v7->m_isOrientedBoxDirty = 1;\n      if ( GJBaseGameLayer::resetAreaObjectValues(a1, v7, 0) )\n        a1->updateObjectSection(a1, v7);\n    }\n    ((void (__fastcall *)(GameObject *, _DWORD))v7->setRRotation)(v7, 0);\n    ((void (__fastcall *)(GameObject *, int))v7->setRScale)(v7, 1065353216);\nLABEL_8:\n    ++v6;\n  }\n  v8 = 0;\n  for ( a1->m_processedAreaObjectsCount = 0; ; ++a1->m_processedAreaObjectsCount )\n  {\n    m_areaObjectsCount = a1->m_areaObjectsCount;\n    if ( v8 >= m_areaObjectsCount )\n      break;\n    m_processedAreaObjectsIndex = a1->m_processedAreaObjectsIndex;\n    v11 = a1->m_areaObjects.m_start[v8];\n    m_processedAreaObjectsCount = a1->m_processedAreaObjectsCount;\n    v18 = v11;\n    if ( m_processedAreaObjectsIndex > m_processedAreaObjectsCount )\n    {\n      a1->m_processedAreaObjects.m_start[m_processedAreaObjectsCount] = v11;\n    }\n    else\n    {\n      std::vector<GameObject *>::push_back((int)&a1->m_processedAreaObjects, &v18);\n      ++a1->m_processedAreaObjectsIndex;\n    }\n    ++v8;\n  }\n  if ( a1->m_areaObjectsUpdated )\n  {\n    v13 = 0;\n    while ( v13 < m_areaObjectsCount )\n    {\n      v14 = a1->m_areaObjects.m_start[v13++];\n      m_positionX = v14->m_positionX;\n      v14->m_lastPosition.x = m_positionX;\n      m_positionY = v14->m_positionY;\n      v14->m_lastPosition.y = m_positionY;\n      m_scaleX = v14->m_scaleX;\n      v14->m_isObjectRectDirty = 1;\n      v14->m_isOrientedBoxDirty = 1;\n      v14->m_customScaleX = m_scaleX;\n      v14->m_customScaleY = v14->m_scaleY;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processAreaActions from 0x496b0c to 0x496c84 (376 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::processMoveActionsStep @ 0x496d10\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-R9,LR}                                             ; +0x0, 0x496b0c\nSUB             SP, SP, #0x14                                          ; +0x4, 0x496b10\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x496B20)                ; +0x6, 0x496b12\nMOV             R5, R1                                                 ; +0xa, 0x496b16\nMOV             R4, R0                                                 ; +0xc, 0x496b18\nMOV             R7, R2                                                 ; +0xe, 0x496b1a\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0x10, 0x496b1c\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0x12, 0x496b1e\nADD.W           R1, R0, #0x4F8                                         ; +0x16, 0x496b22\nMOVS            R6, #0                                                 ; +0x1a, 0x496b26\nMOV.W           R9, #1                                                 ; +0x1c, 0x496b28\nLDR.W           R3, [R8]                                               ; +0x20, 0x496b2c\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x24, 0x496b30\nLDR.W           R3, [R0,#0x338]                                        ; +0x26, 0x496b32\nSUBS            R3, #1                                                 ; +0x2a, 0x496b36\nSTR.W           R3, [R0,#0x33C]                                        ; +0x2c, 0x496b38\nSTR             R2, [SP,#0x14+var_14]                                  ; +0x30, 0x496b3c\nMOV             R3, R5                                                 ; +0x32, 0x496b3e\nMOVS            R2, #2                                                 ; +0x34, 0x496b40\nBL              _ZN15GJBaseGameLayer18processAreaEffectsEPSt6vectorI19EnterEffectInstanceSaIS1_EE16GJAreaActionTypefb; GJBaseGameLayer::processAreaEffects(std::vector<EnterEffectInstance> *,GJAreaActionType,float,bool) ; +0x36, 0x496b42\nMOV             R0, R4                                                 ; +0x3a, 0x496b46\nADDW            R1, R4, #0x4EC                                         ; +0x3c, 0x496b48\nMOVS            R2, #1                                                 ; +0x40, 0x496b4c\nMOV             R3, R5                                                 ; +0x42, 0x496b4e\nSTR             R7, [SP,#0x14+var_14]                                  ; +0x44, 0x496b50\nBL              _ZN15GJBaseGameLayer18processAreaEffectsEPSt6vectorI19EnterEffectInstanceSaIS1_EE16GJAreaActionTypefb; GJBaseGameLayer::processAreaEffects(std::vector<EnterEffectInstance> *,GJAreaActionType,float,bool) ; +0x46, 0x496b52\nSTR             R7, [SP,#0x14+var_14]                                  ; +0x4a, 0x496b56\nMOV             R0, R4                                                 ; +0x4c, 0x496b58\nADD.W           R1, R4, #0x4E0                                         ; +0x4e, 0x496b5a\nMOVS            R2, #0                                                 ; +0x52, 0x496b5e\nMOV             R3, R5                                                 ; +0x54, 0x496b60\nBL              _ZN15GJBaseGameLayer18processAreaEffectsEPSt6vectorI19EnterEffectInstanceSaIS1_EE16GJAreaActionTypefb; GJBaseGameLayer::processAreaEffects(std::vector<EnterEffectInstance> *,GJAreaActionType,float,bool) ; +0x56, 0x496b62\nLDR.W           R3, [R4,#0x968]                                        ; +0x5a, 0x496b66\nCMP             R6, R3                                                 ; +0x5e, 0x496b6a\nBGE             loc_496BC8                                             ; +0x60, 0x496b6c\nLDR.W           R3, [R4,#0x908]                                        ; +0x62, 0x496b6e\nLDR.W           R5, [R3,R6,LSL#2]                                      ; +0x66, 0x496b72\nLDR.W           R3, [R4,#0x338]                                        ; +0x6a, 0x496b76\nLDR.W           R2, [R5,#0x42C]                                        ; +0x6e, 0x496b7a\nCMP             R2, R3                                                 ; +0x72, 0x496b7e\nBGE             loc_496BA8                                             ; +0x74, 0x496b80\nSTRB.W          R9, [R5,#0x2BC]                                        ; +0x76, 0x496b82\nMOV             R0, R4; this                                           ; +0x7a, 0x496b86\nSTRB.W          R9, [R5,#0x2D4]                                        ; +0x7c, 0x496b88\nMOV             R1, R5; GameObject *                                   ; +0x80, 0x496b8c\nSTRB.W          R9, [R5,#0x2D5]                                        ; +0x82, 0x496b8e\nMOVS            R2, #0; bool                                           ; +0x86, 0x496b92\nBL              _ZN15GJBaseGameLayer21resetAreaObjectValuesEP10GameObjectb; GJBaseGameLayer::resetAreaObjectValues(GameObject *,bool) ; +0x88, 0x496b94\nCBZ             R0, loc_496BAA                                         ; +0x8c, 0x496b98\nLDR             R3, [R4]                                               ; +0x8e, 0x496b9a\nMOV             R0, R4                                                 ; +0x90, 0x496b9c\nMOV             R1, R5                                                 ; +0x92, 0x496b9e\nLDR.W           R3, [R3,#0x294]                                        ; +0x94, 0x496ba0\nBLX             R3                                                     ; +0x98, 0x496ba4\nB               loc_496BAA                                             ; +0x9a, 0x496ba6\nCBZ             R7, loc_496BC4                                         ; +0x9c, 0x496ba8\nLDR             R3, [R5]                                               ; +0x9e, 0x496baa\nMOV             R0, R5                                                 ; +0xa0, 0x496bac\nMOVS            R1, #0                                                 ; +0xa2, 0x496bae\nLDR.W           R3, [R3,#0x2DC]                                        ; +0xa4, 0x496bb0\nBLX             R3                                                     ; +0xa8, 0x496bb4\nLDR             R3, [R5]                                               ; +0xaa, 0x496bb6\nMOV             R0, R5                                                 ; +0xac, 0x496bb8\nMOV.W           R1, #0x3F800000                                        ; +0xae, 0x496bba\nLDR.W           R3, [R3,#0x2D0]                                        ; +0xb2, 0x496bbe\nBLX             R3                                                     ; +0xb6, 0x496bc2\nADDS            R6, #1                                                 ; +0xb8, 0x496bc4\nB               loc_496B66                                             ; +0xba, 0x496bc6\nADDW            R6, R4, #0x908                                         ; +0xbc, 0x496bc8\nADD             R7, SP, #0x14+var_C                                    ; +0xc0, 0x496bcc\nMOVS            R5, #0                                                 ; +0xc2, 0x496bce\nSTR.W           R5, [R4,#0x968]                                        ; +0xc4, 0x496bd0\nLDR.W           R2, [R4,#0x964]                                        ; +0xc8, 0x496bd4\nCMP             R5, R2                                                 ; +0xcc, 0x496bd8\nBGE             loc_496C1C                                             ; +0xce, 0x496bda\nLDR.W           R3, [R4,#0x8FC]                                        ; +0xd0, 0x496bdc\nLDR.W           R1, [R4,#0x97C]                                        ; +0xd4, 0x496be0\nLDR.W           R2, [R3,R5,LSL#2]                                      ; +0xd8, 0x496be4\nLDR.W           R3, [R4,#0x968]                                        ; +0xdc, 0x496be8\nCMP             R1, R3                                                 ; +0xe0, 0x496bec\nSTR             R2, [SP,#0x14+var_C]                                   ; +0xe2, 0x496bee\nBGT             loc_496C06                                             ; +0xe4, 0x496bf0\nMOV             R0, R6                                                 ; +0xe6, 0x496bf2\nMOV             R1, R7                                                 ; +0xe8, 0x496bf4\nBL              _ZNSt6vectorIP10GameObjectSaIS1_EE9push_backERKS1_; std::vector<GameObject *>::push_back(GameObject * const&) ; +0xea, 0x496bf6\nLDR.W           R3, [R4,#0x97C]                                        ; +0xee, 0x496bfa\nADDS            R3, #1                                                 ; +0xf2, 0x496bfe\nSTR.W           R3, [R4,#0x97C]                                        ; +0xf4, 0x496c00\nB               loc_496C0E                                             ; +0xf8, 0x496c04\nLDR.W           R1, [R4,#0x908]                                        ; +0xfa, 0x496c06\nSTR.W           R2, [R1,R3,LSL#2]                                      ; +0xfe, 0x496c0a\nLDR.W           R3, [R4,#0x968]                                        ; +0x102, 0x496c0e\nADDS            R5, #1                                                 ; +0x106, 0x496c12\nADDS            R3, #1                                                 ; +0x108, 0x496c14\nSTR.W           R3, [R4,#0x968]                                        ; +0x10a, 0x496c16\nB               loc_496BD4                                             ; +0x10e, 0x496c1a\nMOVW            R3, #0x2A81                                            ; +0x110, 0x496c1c\nLDRB            R3, [R4,R3]                                            ; +0x114, 0x496c20\nCBZ             R3, loc_496C70                                         ; +0x116, 0x496c22\nMOVS            R3, #0                                                 ; +0x118, 0x496c24\nMOVS            R1, #1                                                 ; +0x11a, 0x496c26\nCMP             R3, R2                                                 ; +0x11c, 0x496c28\nBGE             loc_496C70                                             ; +0x11e, 0x496c2a\nLDR.W           R0, [R4,#0x8FC]                                        ; +0x120, 0x496c2c\nLDR.W           R5, [R0,R3,LSL#2]                                      ; +0x124, 0x496c30\nADDS            R3, #1                                                 ; +0x128, 0x496c34\nADDW            R0, R5, #0x41C                                         ; +0x12a, 0x496c36\nVLDR            D7, [R5,#0x320]                                        ; +0x12e, 0x496c3a\nVCVT.F32.F64    S14, D7                                                ; +0x132, 0x496c3e\nVSTR            S14, [R0]                                              ; +0x136, 0x496c42\nADD.W           R0, R5, #0x420                                         ; +0x13a, 0x496c46\nVLDR            D7, [R5,#0x328]                                        ; +0x13e, 0x496c4a\nVCVT.F32.F64    S14, D7                                                ; +0x142, 0x496c4e\nVSTR            S14, [R0]                                              ; +0x146, 0x496c52\nLDR.W           R0, [R5,#0x3E8]                                        ; +0x14a, 0x496c56\nSTRB.W          R1, [R5,#0x2D4]                                        ; +0x14e, 0x496c5a\nSTRB.W          R1, [R5,#0x2D5]                                        ; +0x152, 0x496c5e\nSTR.W           R0, [R5,#0x34C]                                        ; +0x156, 0x496c62\nLDR.W           R0, [R5,#0x3EC]                                        ; +0x15a, 0x496c66\nSTR.W           R0, [R5,#0x350]                                        ; +0x15e, 0x496c6a\nB               loc_496C28                                             ; +0x162, 0x496c6e\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x164, 0x496c70\nLDR.W           R3, [R8]                                               ; +0x166, 0x496c72\nCMP             R2, R3                                                 ; +0x16a, 0x496c76\nBEQ             loc_496C7E                                             ; +0x16c, 0x496c78\nBLX             __stack_chk_fail                                       ; +0x16e, 0x496c7a\nADD             SP, SP, #0x14                                          ; +0x172, 0x496c7e\nPOP.W           {R4-R9,PC}                                             ; +0x174, 0x496c80", "xrefs": ["GJBaseGameLayer::processMoveActionsStep @ 0x496d10"], "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"}