{"type": "func", "start": 4705648, "end": 4706068, "name": "GJBaseGameLayer::resetAreaObjectValues", "pseudocode": "// \n// GJBaseGameLayer::resetAreaObjectValues from 0x47cd70 to 0x47cf14 (420 bytes)\n// \n// 11 xrefs:\n// > GJBaseGameLayer::resetStoppedAreaObjects @ 0x47cf42\n// > GJBaseGameLayer::moveAreaObject @ 0x47cf88\n// > GJBaseGameLayer::transformAreaObjects @ 0x47d04a\n// > GJBaseGameLayer::transformAreaObjects @ 0x47d158\n// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x47d4fc\n// > GJBaseGameLayer::rotateAreaObjects @ 0x47d6ea\n// > GJBaseGameLayer::rotateAreaObjects @ 0x47d824\n// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x47d9f8\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x47dc42\n// > GJBaseGameLayer::processAreaEffects @ 0x496714\n// > GJBaseGameLayer::processAreaActions @ 0x496b94\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 GJBaseGameLayer::resetAreaObjectValues(GJBaseGameLayer *a1, GameObject *a2, bool a3)\n{\n  _BOOL4 v3; // r8\n  float m_positionXOffset; // s14\n  bool v7; // r5\n  double m_positionX; // d6\n  float m_positionYOffset; // s14\n  double m_positionY; // d6\n  float m_unk2BC; // s13\n  float m_unk2C0; // s14\n  float m_scaleXOffset; // s15\n  float m_unk2A8; // s13\n  float m_unk2B0; // s14\n  float m_rotationXOffset; // s15\n  int m_areaObjectsCount; // r3\n  int m_areaObjectsIndex; // r2\n  _DWORD v20[3]; // [sp+0h] [bp-Ch] BYREF\n\n  v20[0] = a1;\n  v20[1] = a2;\n  v20[2] = a3;\n  v3 = a3;\n  if ( a2->m_unk4C8 >= (signed int)a1->m_gameState.m_commandIndex )\n    return 0;\n  if ( a3 )\n    GJBaseGameLayer::updateAreaObjectLastValues(a1, a2);\n  m_positionXOffset = a2->m_positionXOffset;\n  if ( m_positionXOffset == 0.0 )\n  {\n    v7 = 0;\n  }\n  else\n  {\n    v7 = 1;\n    m_positionX = a2->m_positionX;\n    a2->m_positionXOffset = 0.0;\n    a2->m_isUnmodifiedPosDirty = 1;\n    a2->m_positionX = m_positionX - m_positionXOffset;\n  }\n  m_positionYOffset = a2->m_positionYOffset;\n  if ( m_positionYOffset != 0.0 )\n  {\n    m_positionY = a2->m_positionY;\n    v7 = 1;\n    a2->m_positionYOffset = 0.0;\n    a2->m_isUnmodifiedPosDirty = 1;\n    a2->m_positionY = m_positionY - m_positionYOffset;\n  }\n  m_unk2BC = a2->m_unk2BC;\n  m_unk2C0 = a2->m_unk2C0;\n  if ( m_unk2BC != 0.0 || m_unk2C0 != 0.0 )\n  {\n    m_scaleXOffset = a2->m_scaleXOffset;\n    a2->m_unk2BC = 0.0;\n    a2->m_unk2C0 = 0.0;\n    a2->m_scaleXOffset = m_scaleXOffset - m_unk2BC;\n    a2->m_scaleX = a2->m_scaleX - m_unk2BC;\n    a2->m_scaleYOffset = a2->m_scaleYOffset - m_unk2C0;\n    a2->m_scaleY = a2->m_scaleY - m_unk2C0;\n    if ( !v3 )\n      ((void (__fastcall *)(GameObject *, int))a2->setRScale)(a2, 1065353216);\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    m_rotationXOffset = a2->m_rotationXOffset;\n    a2->m_unk2A8 = 0.0;\n    a2->m_unk2B0 = 0.0;\n    a2->m_rotationXOffset = m_rotationXOffset - m_unk2A8;\n    a2->m_rotationYOffset = a2->m_rotationYOffset - m_unk2B0;\n    if ( !v3 )\n      ((void (__fastcall *)(GameObject *, _DWORD))a2->setRRotation)(a2, 0);\n  }\n  a2->m_unk4C8 = a1->m_gameState.m_commandIndex;\n  if ( v3 )\n  {\n    m_areaObjectsCount = a1->m_areaObjectsCount;\n    m_areaObjectsIndex = a1->m_areaObjectsIndex;\n    v20[0] = a2;\n    if ( m_areaObjectsIndex > m_areaObjectsCount )\n    {\n      a1->m_areaObjects.m_start[m_areaObjectsCount] = a2;\n    }\n    else\n    {\n      std::vector<GameObject *>::push_back((int)&a1->m_areaObjects, v20);\n      ++a1->m_areaObjectsIndex;\n    }\n    ++a1->m_areaObjectsCount;\n  }\n  else\n  {\n    GJBaseGameLayer::updateAreaObjectLastValues(a1, a2);\n  }\n  return v7;\n}", "assembly": "; \n; GJBaseGameLayer::resetAreaObjectValues from 0x47cd70 to 0x47cf14 (420 bytes)\n; \n; 11 xrefs:\n; > GJBaseGameLayer::resetStoppedAreaObjects @ 0x47cf42\n; > GJBaseGameLayer::moveAreaObject @ 0x47cf88\n; > GJBaseGameLayer::transformAreaObjects @ 0x47d04a\n; > GJBaseGameLayer::transformAreaObjects @ 0x47d158\n; > GJBaseGameLayer::processAreaTransformGroupAction @ 0x47d4fc\n; > GJBaseGameLayer::rotateAreaObjects @ 0x47d6ea\n; > GJBaseGameLayer::rotateAreaObjects @ 0x47d824\n; > GJBaseGameLayer::processAreaRotateGroupAction @ 0x47d9f8\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x47dc42\n; > GJBaseGameLayer::processAreaEffects @ 0x496714\n; > GJBaseGameLayer::processAreaActions @ 0x496b94\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x47CD7A)                ; +0x0, 0x47cd70\nPUSH.W          {R0-R2,R4-R9,LR}                                       ; +0x2, 0x47cd72\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x47cd76\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x47cd78\nMOV             R8, R2                                                 ; +0xa, 0x47cd7a\nLDR.W           R5, [R1,#0x42C]                                        ; +0xc, 0x47cd7c\nLDR             R2, [R3]                                               ; +0x10, 0x47cd80\nMOV             R6, R0                                                 ; +0x12, 0x47cd82\nMOV             R4, R1                                                 ; +0x14, 0x47cd84\nMOV             R9, R3                                                 ; +0x16, 0x47cd86\nSTR             R2, [SP,#0xC+var_8]                                    ; +0x18, 0x47cd88\nLDR.W           R2, [R0,#0x338]                                        ; +0x1a, 0x47cd8a\nCMP             R5, R2                                                 ; +0x1e, 0x47cd8e\nBGE.W           loc_47CEFE                                             ; +0x20, 0x47cd90\nCMP.W           R8, #0                                                 ; +0x24, 0x47cd94\nBEQ             loc_47CD9E                                             ; +0x28, 0x47cd98\nBL              _ZN15GJBaseGameLayer26updateAreaObjectLastValuesEP10GameObject; GJBaseGameLayer::updateAreaObjectLastValues(GameObject *) ; +0x2a, 0x47cd9a\nVLDR            S14, [R4,#0x238]                                       ; +0x2e, 0x47cd9e\nMOVS            R7, #0                                                 ; +0x32, 0x47cda2\nVCMP.F32        S14, #0.0                                              ; +0x34, 0x47cda4\nVMRS            APSR_nzcv, FPSCR                                       ; +0x38, 0x47cda8\nBEQ             loc_47CDCA                                             ; +0x3c, 0x47cdac\nVCVT.F64.F32    D7, S14                                                ; +0x3e, 0x47cdae\nMOVS            R5, #1                                                 ; +0x42, 0x47cdb2\nVLDR            D6, [R4,#0x320]                                        ; +0x44, 0x47cdb4\nSTR.W           R7, [R4,#0x238]                                        ; +0x48, 0x47cdb8\nSTRB.W          R5, [R4,#0x2BE]                                        ; +0x4c, 0x47cdbc\nVSUB.F64        D7, D6, D7                                             ; +0x50, 0x47cdc0\nVSTR            D7, [R4,#0x320]                                        ; +0x54, 0x47cdc4\nB               loc_47CDCC                                             ; +0x58, 0x47cdc8\nMOVS            R5, #0                                                 ; +0x5a, 0x47cdca\nVLDR            S14, [R4,#0x23C]                                       ; +0x5c, 0x47cdcc\nVCMP.F32        S14, #0.0                                              ; +0x60, 0x47cdd0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x64, 0x47cdd4\nBEQ             loc_47CDF6                                             ; +0x68, 0x47cdd8\nVCVT.F64.F32    D7, S14                                                ; +0x6a, 0x47cdda\nMOVS            R3, #0                                                 ; +0x6e, 0x47cdde\nVLDR            D6, [R4,#0x328]                                        ; +0x70, 0x47cde0\nMOVS            R5, #1                                                 ; +0x74, 0x47cde4\nSTR.W           R3, [R4,#0x23C]                                        ; +0x76, 0x47cde6\nSTRB.W          R5, [R4,#0x2BE]                                        ; +0x7a, 0x47cdea\nVSUB.F64        D7, D6, D7                                             ; +0x7e, 0x47cdee\nVSTR            D7, [R4,#0x328]                                        ; +0x82, 0x47cdf2\nVLDR            S13, [R4,#0x258]                                       ; +0x86, 0x47cdf6\nVLDR            S14, [R4,#0x25C]                                       ; +0x8a, 0x47cdfa\nVCMP.F32        S13, #0.0                                              ; +0x8e, 0x47cdfe\nVMRS            APSR_nzcv, FPSCR                                       ; +0x92, 0x47ce02\nBNE             loc_47CE12                                             ; +0x96, 0x47ce06\nVCMP.F32        S14, #0.0                                              ; +0x98, 0x47ce08\nVMRS            APSR_nzcv, FPSCR                                       ; +0x9c, 0x47ce0c\nBEQ             loc_47CE5E                                             ; +0xa0, 0x47ce10\nVLDR            S15, [R4,#0x250]                                       ; +0xa2, 0x47ce12\nSTR.W           R7, [R4,#0x258]                                        ; +0xa6, 0x47ce16\nSTR.W           R7, [R4,#0x25C]                                        ; +0xaa, 0x47ce1a\nVSUB.F32        S15, S15, S13                                          ; +0xae, 0x47ce1e\nVSTR            S15, [R4,#0x250]                                       ; +0xb2, 0x47ce22\nVLDR            S15, [R4,#0x3E8]                                       ; +0xb6, 0x47ce26\nVSUB.F32        S15, S15, S13                                          ; +0xba, 0x47ce2a\nVSTR            S15, [R4,#0x3E8]                                       ; +0xbe, 0x47ce2e\nVLDR            S15, [R4,#0x254]                                       ; +0xc2, 0x47ce32\nVSUB.F32        S15, S15, S14                                          ; +0xc6, 0x47ce36\nVSTR            S15, [R4,#0x254]                                       ; +0xca, 0x47ce3a\nVLDR            S15, [R4,#0x3EC]                                       ; +0xce, 0x47ce3e\nVSUB.F32        S15, S15, S14                                          ; +0xd2, 0x47ce42\nVSTR            S15, [R4,#0x3EC]                                       ; +0xd6, 0x47ce46\nCMP.W           R8, #0                                                 ; +0xda, 0x47ce4a\nBNE             loc_47CE5E                                             ; +0xde, 0x47ce4e\nLDR             R3, [R4]                                               ; +0xe0, 0x47ce50\nMOV             R0, R4                                                 ; +0xe2, 0x47ce52\nMOV.W           R1, #0x3F800000                                        ; +0xe4, 0x47ce54\nLDR.W           R3, [R3,#0x2D0]                                        ; +0xe8, 0x47ce58\nBLX             R3                                                     ; +0xec, 0x47ce5c\nVLDR            S13, [R4,#0x244]                                       ; +0xee, 0x47ce5e\nVLDR            S14, [R4,#0x24C]                                       ; +0xf2, 0x47ce62\nVCMP.F32        S13, #0.0                                              ; +0xf6, 0x47ce66\nVMRS            APSR_nzcv, FPSCR                                       ; +0xfa, 0x47ce6a\nBNE             loc_47CE7A                                             ; +0xfe, 0x47ce6e\nVCMP.F32        S14, #0.0                                              ; +0x100, 0x47ce70\nVMRS            APSR_nzcv, FPSCR                                       ; +0x104, 0x47ce74\nBEQ             loc_47CEAC                                             ; +0x108, 0x47ce78\nVLDR            S15, [R4,#0x240]                                       ; +0x10a, 0x47ce7a\nSTR.W           R7, [R4,#0x244]                                        ; +0x10e, 0x47ce7e\nSTR.W           R7, [R4,#0x24C]                                        ; +0x112, 0x47ce82\nVSUB.F32        S15, S15, S13                                          ; +0x116, 0x47ce86\nVSTR            S15, [R4,#0x240]                                       ; +0x11a, 0x47ce8a\nVLDR            S15, [R4,#0x248]                                       ; +0x11e, 0x47ce8e\nVSUB.F32        S15, S15, S14                                          ; +0x122, 0x47ce92\nVSTR            S15, [R4,#0x248]                                       ; +0x126, 0x47ce96\nCMP.W           R8, #0                                                 ; +0x12a, 0x47ce9a\nBNE             loc_47CEAC                                             ; +0x12e, 0x47ce9e\nLDR             R3, [R4]                                               ; +0x130, 0x47cea0\nMOV             R0, R4                                                 ; +0x132, 0x47cea2\nMOVS            R1, #0                                                 ; +0x134, 0x47cea4\nLDR.W           R3, [R3,#0x2DC]                                        ; +0x136, 0x47cea6\nBLX             R3                                                     ; +0x13a, 0x47ceaa\nLDR.W           R3, [R6,#0x338]                                        ; +0x13c, 0x47ceac\nSTR.W           R3, [R4,#0x42C]                                        ; +0x140, 0x47ceb0\nCMP.W           R8, #0                                                 ; +0x144, 0x47ceb4\nBEQ             loc_47CEF2                                             ; +0x148, 0x47ceb8\nLDR.W           R3, [R6,#0x964]                                        ; +0x14a, 0x47ceba\nLDR.W           R2, [R6,#0x978]                                        ; +0x14e, 0x47cebe\nSTR             R4, [SP,#0xC+var_C]                                    ; +0x152, 0x47cec2\nCMP             R2, R3                                                 ; +0x154, 0x47cec4\nBGT             loc_47CEDE                                             ; +0x156, 0x47cec6\nADDW            R0, R6, #0x8FC                                         ; +0x158, 0x47cec8\nMOV             R1, SP                                                 ; +0x15c, 0x47cecc\nBL              _ZNSt6vectorIP10GameObjectSaIS1_EE9push_backERKS1_; std::vector<GameObject *>::push_back(GameObject * const&) ; +0x15e, 0x47cece\nLDR.W           R3, [R6,#0x978]                                        ; +0x162, 0x47ced2\nADDS            R3, #1                                                 ; +0x166, 0x47ced6\nSTR.W           R3, [R6,#0x978]                                        ; +0x168, 0x47ced8\nB               loc_47CEE6                                             ; +0x16c, 0x47cedc\nLDR.W           R2, [R6,#0x8FC]                                        ; +0x16e, 0x47cede\nSTR.W           R4, [R2,R3,LSL#2]                                      ; +0x172, 0x47cee2\nLDR.W           R3, [R6,#0x964]                                        ; +0x176, 0x47cee6\nADDS            R3, #1                                                 ; +0x17a, 0x47ceea\nSTR.W           R3, [R6,#0x964]                                        ; +0x17c, 0x47ceec\nB               loc_47CEFA                                             ; +0x180, 0x47cef0\nMOV             R0, R6; this                                           ; +0x182, 0x47cef2\nMOV             R1, R4; GameObject *                                   ; +0x184, 0x47cef4\nBL              _ZN15GJBaseGameLayer26updateAreaObjectLastValuesEP10GameObject; GJBaseGameLayer::updateAreaObjectLastValues(GameObject *) ; +0x186, 0x47cef6\nMOV             R0, R5                                                 ; +0x18a, 0x47cefa\nB               loc_47CF00                                             ; +0x18c, 0x47cefc\nMOVS            R0, #0                                                 ; +0x18e, 0x47cefe\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x190, 0x47cf00\nLDR.W           R3, [R9]                                               ; +0x192, 0x47cf02\nCMP             R2, R3                                                 ; +0x196, 0x47cf06\nBEQ             loc_47CF0E                                             ; +0x198, 0x47cf08\nBLX             __stack_chk_fail                                       ; +0x19a, 0x47cf0a\nADD             SP, SP, #0xC                                           ; +0x19e, 0x47cf0e\nPOP.W           {R4-R9,PC}                                             ; +0x1a0, 0x47cf10", "xrefs": ["GJBaseGameLayer::resetStoppedAreaObjects @ 0x47cf42", "GJBaseGameLayer::moveAreaObject @ 0x47cf88", "GJBaseGameLayer::transformAreaObjects @ 0x47d04a", "GJBaseGameLayer::transformAreaObjects @ 0x47d158", "GJBaseGameLayer::processAreaTransformGroupAction @ 0x47d4fc", "GJBaseGameLayer::rotateAreaObjects @ 0x47d6ea", "GJBaseGameLayer::rotateAreaObjects @ 0x47d824", "GJBaseGameLayer::processAreaRotateGroupAction @ 0x47d9f8", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x47dc42", "GJBaseGameLayer::processAreaEffects @ 0x496714", "GJBaseGameLayer::processAreaActions @ 0x496b94"], "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"}