{"type": "func", "start": 4297017996, "end": 4297018596, "name": "GJBaseGameLayer::resetAreaObjectValues", "pseudocode": "// \n// GJBaseGameLayer::resetAreaObjectValues from 0x1001f4a8c to 0x1001f4ce4 (600 bytes)\n// \n// 14 xrefs:\n// > GJBaseGameLayer::processAreaEffects @ 0x1001f4434\n// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x1001f4e3c\n// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x1001f5238\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f55e4\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5978\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5a30\n// > GJBaseGameLayer::processAreaActions @ 0x1001f6370\n// > GJBaseGameLayer::resetStoppedAreaObjects @ 0x1001f64f0\n// > GJBaseGameLayer::transformAreaObjects @ 0x1001f67f4\n// > GJBaseGameLayer::transformAreaObjects @ 0x1001f6938\n// > GJBaseGameLayer::transformAreaObjects @ 0x1001f6a34\n// > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6d00\n// > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6e7c\n// > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6f10\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\nbool __fastcall GJBaseGameLayer::resetAreaObjectValues(GJBaseGameLayer *a1, GameObject *a2, bool a3)\n{\n  signed int m_commandIndex; // w8\n  float32x2_t *p_m_scaleXOffset; // x23\n  float m_positionXOffset; // s0\n  bool v9; // w21\n  float m_positionYOffset; // s0\n  float32x2_t v11; // d0\n  float m_unk2A8; // s1\n  float m_unk2B0; // s0\n  unsigned int v14; // w8\n  int m_areaObjectsCount; // w8\n  std::vector<GameObject *> *p_m_areaObjects; // x0\n  GameObject *v18; // [xsp+8h] [xbp-38h] BYREF\n\n  m_commandIndex = a1->m_gameState.m_commandIndex;\n  if ( a2->m_unk4C8 >= m_commandIndex )\n    return 0;\n  p_m_scaleXOffset = (float32x2_t *)&a2->m_scaleXOffset;\n  if ( a3 && !a2->m_isDecoration2 )\n  {\n    if ( a2->m_unk4C4 != m_commandIndex )\n    {\n      a2->m_lastPosition = (cocos2d::CCPoint)vcvt_f32_f64(*(float64x2_t *)&a2->m_positionX);\n      a2->m_unk4C4 = m_commandIndex;\n      GameObject::dirtifyObjectRect(a2);\n      m_commandIndex = a1->m_gameState.m_commandIndex;\n    }\n    if ( a2->m_unk4CC != m_commandIndex )\n    {\n      p_m_scaleXOffset[37] = *(float32x2_t *)&a2->m_scaleX;\n      a2->m_unk4CC = m_commandIndex;\n      GameObject::dirtifyObjectRect(a2);\n    }\n  }\n  m_positionXOffset = a2->m_positionXOffset;\n  v9 = m_positionXOffset != 0.0;\n  if ( m_positionXOffset != 0.0 )\n  {\n    a2->m_positionX = a2->m_positionX - m_positionXOffset;\n    a2->m_positionXOffset = 0.0;\n    a2->m_isUnmodifiedPosDirty = 1;\n  }\n  m_positionYOffset = a2->m_positionYOffset;\n  if ( m_positionYOffset != 0.0 )\n  {\n    a2->m_positionY = a2->m_positionY - m_positionYOffset;\n    a2->m_positionYOffset = 0.0;\n    v9 = 1;\n    a2->m_isUnmodifiedPosDirty = 1;\n  }\n  v11 = p_m_scaleXOffset[1];\n  if ( v11.f32[0] != 0.0 || v11.f32[1] != 0.0 )\n  {\n    *p_m_scaleXOffset = vsub_f32(*p_m_scaleXOffset, v11);\n    *(float32x2_t *)&a2->m_scaleX = vsub_f32(*(float32x2_t *)&a2->m_scaleX, v11);\n    p_m_scaleXOffset[1] = 0;\n    if ( !a3 )\n      ((void (__fastcall *)(GameObject *, float))a2->setRScale)(a2, 1.0);\n  }\n  m_unk2A8 = a2->m_unk2A8;\n  m_unk2B0 = a2->m_unk2B0;\n  if ( m_unk2A8 != 0.0 || m_unk2B0 != 0.0 )\n  {\n    a2->m_rotationXOffset = a2->m_rotationXOffset - m_unk2A8;\n    a2->m_unk2A8 = 0.0;\n    a2->m_rotationYOffset = a2->m_rotationYOffset - m_unk2B0;\n    a2->m_unk2B0 = 0.0;\n    if ( !a3 )\n    {\n      ((void (__fastcall *)(GameObject *, float))a2->setRRotation)(a2, 0.0);\n      v14 = a1->m_gameState.m_commandIndex;\n      a2->m_unk4C8 = v14;\n      goto LABEL_26;\n    }\n    a2->m_unk4C8 = a1->m_gameState.m_commandIndex;\nLABEL_23:\n    v18 = a2;\n    m_areaObjectsCount = a1->m_areaObjectsCount;\n    p_m_areaObjects = &a1->m_areaObjects;\n    if ( a1->m_areaObjectsIndex <= m_areaObjectsCount )\n    {\n      sub_1000115B8((__int64)p_m_areaObjects, &v18);\n      ++a1->m_areaObjectsIndex;\n      m_areaObjectsCount = a1->m_areaObjectsCount;\n    }\n    else\n    {\n      p_m_areaObjects->__begin_[m_areaObjectsCount] = a2;\n    }\n    a1->m_areaObjectsCount = m_areaObjectsCount + 1;\n    return v9;\n  }\n  v14 = a1->m_gameState.m_commandIndex;\n  a2->m_unk4C8 = v14;\n  if ( a3 )\n    goto LABEL_23;\nLABEL_26:\n  if ( !a2->m_isDecoration2 )\n  {\n    if ( a2->m_unk4C4 != v14 )\n    {\n      a2->m_lastPosition = (cocos2d::CCPoint)vcvt_f32_f64(*(float64x2_t *)&a2->m_positionX);\n      a2->m_unk4C4 = v14;\n      GameObject::dirtifyObjectRect(a2);\n      v14 = a1->m_gameState.m_commandIndex;\n    }\n    if ( a2->m_unk4CC != v14 )\n    {\n      p_m_scaleXOffset[37] = *(float32x2_t *)&a2->m_scaleX;\n      a2->m_unk4CC = v14;\n      GameObject::dirtifyObjectRect(a2);\n    }\n  }\n  return v9;\n}", "assembly": "; \n; GJBaseGameLayer::resetAreaObjectValues from 0x1001f4a8c to 0x1001f4ce4 (600 bytes)\n; \n; 14 xrefs:\n; > GJBaseGameLayer::processAreaEffects @ 0x1001f4434\n; > GJBaseGameLayer::processAreaTransformGroupAction @ 0x1001f4e3c\n; > GJBaseGameLayer::processAreaRotateGroupAction @ 0x1001f5238\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f55e4\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5978\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5a30\n; > GJBaseGameLayer::processAreaActions @ 0x1001f6370\n; > GJBaseGameLayer::resetStoppedAreaObjects @ 0x1001f64f0\n; > GJBaseGameLayer::transformAreaObjects @ 0x1001f67f4\n; > GJBaseGameLayer::transformAreaObjects @ 0x1001f6938\n; > GJBaseGameLayer::transformAreaObjects @ 0x1001f6a34\n; > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6d00\n; > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6e7c\n; > GJBaseGameLayer::rotateAreaObjects @ 0x1001f6f10\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1001f4a8c\nSTP             X24, X23, [SP,#0x40+var_30]                            ; +0x4, 0x1001f4a90\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x8, 0x1001f4a94\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x1001f4a98\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x1001f4a9c\nADD             X29, SP, #0x40                                         ; +0x14, 0x1001f4aa0\nLDR             W9, [X1,#0x4D8]                                        ; +0x18, 0x1001f4aa4\nLDR             W8, [X0,#0x3B0]                                        ; +0x1c, 0x1001f4aa8\nCMP             W9, W8                                                 ; +0x20, 0x1001f4aac\nB.GE            loc_1001F4BE0                                          ; +0x24, 0x1001f4ab0\nMOV             X22, X2                                                ; +0x28, 0x1001f4ab4\nMOV             X20, X1                                                ; +0x2c, 0x1001f4ab8\nMOV             X19, X0                                                ; +0x30, 0x1001f4abc\nADD             X23, X1, #0x2B4                                        ; +0x34, 0x1001f4ac0\nCBZ             W2, loc_1001F4B18                                      ; +0x38, 0x1001f4ac4\nLDRB            W9, [X20,#0x50A]                                       ; +0x3c, 0x1001f4ac8\nTBNZ            W9, #0, loc_1001F4B18                                  ; +0x40, 0x1001f4acc\nLDR             W9, [X20,#0x4D4]                                       ; +0x44, 0x1001f4ad0\nCMP             W9, W8                                                 ; +0x48, 0x1001f4ad4\nB.EQ            loc_1001F4AF8                                          ; +0x4c, 0x1001f4ad8\nLDR             Q0, [X20,#0x3B0]                                       ; +0x50, 0x1001f4adc\nFCVTN           V0.2S, V0.2D                                           ; +0x54, 0x1001f4ae0\nSTR             D0, [X20,#0x4C8]                                       ; +0x58, 0x1001f4ae4\nSTR             W8, [X20,#0x4D4]                                       ; +0x5c, 0x1001f4ae8\nMOV             X0, X20                                                ; +0x60, 0x1001f4aec\nBL              GameObject__dirtifyObjectRect                          ; +0x64, 0x1001f4af0\nLDR             W8, [X19,#0x3B0]                                       ; +0x68, 0x1001f4af4\nLDR             W9, [X20,#0x4DC]                                       ; +0x6c, 0x1001f4af8\nCMP             W9, W8                                                 ; +0x70, 0x1001f4afc\nB.EQ            loc_1001F4B18                                          ; +0x74, 0x1001f4b00\nLDR             D0, [X20,#0x480]                                       ; +0x78, 0x1001f4b04\nSTR             D0, [X23,#0x128]                                       ; +0x7c, 0x1001f4b08\nSTR             W8, [X20,#0x4DC]                                       ; +0x80, 0x1001f4b0c\nMOV             X0, X20                                                ; +0x84, 0x1001f4b10\nBL              GameObject__dirtifyObjectRect                          ; +0x88, 0x1001f4b14\nLDR             S0, [X20,#0x29C]                                       ; +0x8c, 0x1001f4b18\nFCMP            S0, #0.0                                               ; +0x90, 0x1001f4b1c\nCSET            W21, NE                                                ; +0x94, 0x1001f4b20\nB.EQ            loc_1001F4B44                                          ; +0x98, 0x1001f4b24\nFCVT            D0, S0                                                 ; +0x9c, 0x1001f4b28\nLDR             D1, [X20,#0x3B0]                                       ; +0xa0, 0x1001f4b2c\nFSUB            D0, D1, D0                                             ; +0xa4, 0x1001f4b30\nSTR             D0, [X20,#0x3B0]                                       ; +0xa8, 0x1001f4b34\nSTR             WZR, [X20,#0x29C]                                      ; +0xac, 0x1001f4b38\nMOV             W8, #1                                                 ; +0xb0, 0x1001f4b3c\nSTRB            W8, [X20,#0x34A]                                       ; +0xb4, 0x1001f4b40\nLDR             S0, [X20,#0x2A0]                                       ; +0xb8, 0x1001f4b44\nFCMP            S0, #0.0                                               ; +0xbc, 0x1001f4b48\nB.EQ            loc_1001F4B6C                                          ; +0xc0, 0x1001f4b4c\nFCVT            D0, S0                                                 ; +0xc4, 0x1001f4b50\nLDR             D1, [X20,#0x3B8]                                       ; +0xc8, 0x1001f4b54\nFSUB            D0, D1, D0                                             ; +0xcc, 0x1001f4b58\nSTR             D0, [X20,#0x3B8]                                       ; +0xd0, 0x1001f4b5c\nSTR             WZR, [X20,#0x2A0]                                      ; +0xd4, 0x1001f4b60\nMOV             W21, #1                                                ; +0xd8, 0x1001f4b64\nSTRB            W21, [X20,#0x34A]                                      ; +0xdc, 0x1001f4b68\nLDR             D0, [X23,#8]                                           ; +0xe0, 0x1001f4b6c\nFCMP            S0, #0.0                                               ; +0xe4, 0x1001f4b70\nB.NE            loc_1001F4B84                                          ; +0xe8, 0x1001f4b74\nDUP             S1, V0.S[1]                                            ; +0xec, 0x1001f4b78\nFCMP            S1, #0.0                                               ; +0xf0, 0x1001f4b7c\nB.EQ            loc_1001F4BB8                                          ; +0xf4, 0x1001f4b80\nLDR             D1, [X23]                                              ; +0xf8, 0x1001f4b84\nFSUB            V1.2S, V1.2S, V0.2S                                    ; +0xfc, 0x1001f4b88\nSTR             D1, [X23]                                              ; +0x100, 0x1001f4b8c\nLDR             D1, [X20,#0x480]                                       ; +0x104, 0x1001f4b90\nFSUB            V0.2S, V1.2S, V0.2S                                    ; +0x108, 0x1001f4b94\nSTR             D0, [X20,#0x480]                                       ; +0x10c, 0x1001f4b98\nSTR             XZR, [X23,#8]                                          ; +0x110, 0x1001f4b9c\nTBNZ            W22, #0, loc_1001F4BB8                                 ; +0x114, 0x1001f4ba0\nLDR             X8, [X20]                                              ; +0x118, 0x1001f4ba4\nLDR             X8, [X8,#0x5A0]                                        ; +0x11c, 0x1001f4ba8\nFMOV            S0, #1.0                                               ; +0x120, 0x1001f4bac\nMOV             X0, X20                                                ; +0x124, 0x1001f4bb0\nBLR             X8                                                     ; +0x128, 0x1001f4bb4\nLDR             S1, [X20,#0x2A8]                                       ; +0x12c, 0x1001f4bb8\nLDR             S0, [X20,#0x2B0]                                       ; +0x130, 0x1001f4bbc\nFCMP            S1, #0.0                                               ; +0x134, 0x1001f4bc0\nB.NE            loc_1001F4BE8                                          ; +0x138, 0x1001f4bc4\nFCMP            S0, #0.0                                               ; +0x13c, 0x1001f4bc8\nB.NE            loc_1001F4BE8                                          ; +0x140, 0x1001f4bcc\nLDR             W8, [X19,#0x3B0]                                       ; +0x144, 0x1001f4bd0\nSTR             W8, [X20,#0x4D8]                                       ; +0x148, 0x1001f4bd4\nTBNZ            W22, #0, loc_1001F4C14                                 ; +0x14c, 0x1001f4bd8\nB               loc_1001F4C54                                          ; +0x150, 0x1001f4bdc\nMOV             W21, #0                                                ; +0x154, 0x1001f4be0\nB               loc_1001F4CC8                                          ; +0x158, 0x1001f4be4\nLDR             S2, [X20,#0x2A4]                                       ; +0x15c, 0x1001f4be8\nFSUB            S1, S2, S1                                             ; +0x160, 0x1001f4bec\nSTR             S1, [X20,#0x2A4]                                       ; +0x164, 0x1001f4bf0\nSTR             WZR, [X20,#0x2A8]                                      ; +0x168, 0x1001f4bf4\nLDR             S1, [X20,#0x2AC]                                       ; +0x16c, 0x1001f4bf8\nFSUB            S0, S1, S0                                             ; +0x170, 0x1001f4bfc\nSTR             S0, [X20,#0x2AC]                                       ; +0x174, 0x1001f4c00\nSTR             WZR, [X20,#0x2B0]                                      ; +0x178, 0x1001f4c04\nTBZ             W22, #0, loc_1001F4C38                                 ; +0x17c, 0x1001f4c08\nLDR             W8, [X19,#0x3B0]                                       ; +0x180, 0x1001f4c0c\nSTR             W8, [X20,#0x4D8]                                       ; +0x184, 0x1001f4c10\nSTR             X20, [SP,#0x40+var_38]                                 ; +0x188, 0x1001f4c14\nLDR             W9, [X19,#0xE08]                                       ; +0x18c, 0x1001f4c18\nLDR             W8, [X19,#0xDF4]                                       ; +0x190, 0x1001f4c1c\nADD             X0, X19, #0xD50                                        ; +0x194, 0x1001f4c20\nCMP             W9, W8                                                 ; +0x198, 0x1001f4c24\nB.LE            loc_1001F4CA8                                          ; +0x19c, 0x1001f4c28\nLDR             X9, [X0]                                               ; +0x1a0, 0x1001f4c2c\nSTR             X20, [X9,W8,SXTW#3]                                    ; +0x1a4, 0x1001f4c30\nB               loc_1001F4CC0                                          ; +0x1a8, 0x1001f4c34\nLDR             X8, [X20]                                              ; +0x1ac, 0x1001f4c38\nLDR             X8, [X8,#0x5B8]                                        ; +0x1b0, 0x1001f4c3c\nFMOV            S0, WZR                                                ; +0x1b4, 0x1001f4c40\nMOV             X0, X20                                                ; +0x1b8, 0x1001f4c44\nBLR             X8                                                     ; +0x1bc, 0x1001f4c48\nLDR             W8, [X19,#0x3B0]                                       ; +0x1c0, 0x1001f4c4c\nSTR             W8, [X20,#0x4D8]                                       ; +0x1c4, 0x1001f4c50\nLDRB            W9, [X20,#0x50A]                                       ; +0x1c8, 0x1001f4c54\nTBNZ            W9, #0, loc_1001F4CC8                                  ; +0x1cc, 0x1001f4c58\nLDR             W9, [X20,#0x4D4]                                       ; +0x1d0, 0x1001f4c5c\nCMP             W9, W8                                                 ; +0x1d4, 0x1001f4c60\nB.EQ            loc_1001F4C84                                          ; +0x1d8, 0x1001f4c64\nLDR             Q0, [X20,#0x3B0]                                       ; +0x1dc, 0x1001f4c68\nFCVTN           V0.2S, V0.2D                                           ; +0x1e0, 0x1001f4c6c\nSTR             D0, [X20,#0x4C8]                                       ; +0x1e4, 0x1001f4c70\nSTR             W8, [X20,#0x4D4]                                       ; +0x1e8, 0x1001f4c74\nMOV             X0, X20                                                ; +0x1ec, 0x1001f4c78\nBL              GameObject__dirtifyObjectRect                          ; +0x1f0, 0x1001f4c7c\nLDR             W8, [X19,#0x3B0]                                       ; +0x1f4, 0x1001f4c80\nLDR             W9, [X20,#0x4DC]                                       ; +0x1f8, 0x1001f4c84\nCMP             W9, W8                                                 ; +0x1fc, 0x1001f4c88\nB.EQ            loc_1001F4CC8                                          ; +0x200, 0x1001f4c8c\nLDR             D0, [X20,#0x480]                                       ; +0x204, 0x1001f4c90\nSTR             D0, [X23,#0x128]                                       ; +0x208, 0x1001f4c94\nSTR             W8, [X20,#0x4DC]                                       ; +0x20c, 0x1001f4c98\nMOV             X0, X20                                                ; +0x210, 0x1001f4c9c\nBL              GameObject__dirtifyObjectRect                          ; +0x214, 0x1001f4ca0\nB               loc_1001F4CC8                                          ; +0x218, 0x1001f4ca4\nADD             X1, SP, #0x40+var_38                                   ; +0x21c, 0x1001f4ca8\nBL              sub_1000115B8                                          ; +0x220, 0x1001f4cac\nLDR             W8, [X19,#0xE08]                                       ; +0x224, 0x1001f4cb0\nADD             W8, W8, #1                                             ; +0x228, 0x1001f4cb4\nSTR             W8, [X19,#0xE08]                                       ; +0x22c, 0x1001f4cb8\nLDR             W8, [X19,#0xDF4]                                       ; +0x230, 0x1001f4cbc\nADD             W8, W8, #1                                             ; +0x234, 0x1001f4cc0\nSTR             W8, [X19,#0xDF4]                                       ; +0x238, 0x1001f4cc4\nMOV             X0, X21                                                ; +0x23c, 0x1001f4cc8\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x240, 0x1001f4ccc\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x244, 0x1001f4cd0\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x248, 0x1001f4cd4\nLDP             X24, X23, [SP,#0x40+var_30]                            ; +0x24c, 0x1001f4cd8\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x250, 0x1001f4cdc\nRET                                                                    ; +0x254, 0x1001f4ce0", "xrefs": ["GJBaseGameLayer::processAreaEffects @ 0x1001f4434", "GJBaseGameLayer::processAreaTransformGroupAction @ 0x1001f4e3c", "GJBaseGameLayer::processAreaRotateGroupAction @ 0x1001f5238", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f55e4", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5978", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x1001f5a30", "GJBaseGameLayer::processAreaActions @ 0x1001f6370", "GJBaseGameLayer::resetStoppedAreaObjects @ 0x1001f64f0", "GJBaseGameLayer::transformAreaObjects @ 0x1001f67f4", "GJBaseGameLayer::transformAreaObjects @ 0x1001f6938", "GJBaseGameLayer::transformAreaObjects @ 0x1001f6a34", "GJBaseGameLayer::rotateAreaObjects @ 0x1001f6d00", "GJBaseGameLayer::rotateAreaObjects @ 0x1001f6e7c", "GJBaseGameLayer::rotateAreaObjects @ 0x1001f6f10"], "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"}