{"type": "func", "start": 4297050828, "end": 4297051132, "name": "GJBaseGameLayer::loadStartPosObject", "pseudocode": "// \n// GJBaseGameLayer::loadStartPosObject from 0x1001fcacc to 0x1001fcbfc (304 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::resetLevel @ 0x1001224bc\n// > LevelEditorLayer::onPlaytest @ 0x100362e30\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 __fastcall GJBaseGameLayer::loadStartPosObject(GJBaseGameLayer *a1)\n{\n  int *p_m_activeGradients; // x21\n  GameManager *v3; // x0\n  float *v4; // x0\n  LevelSettingsObject *m_startSettings; // x1\n\n  p_m_activeGradients = &a1->m_activeGradients;\n  v3 = GameManager::sharedState();\n  *((_BYTE *)p_m_activeGradients + 1383) = GameManager::getGameVariable(v3, \"0151\");\n  *((_BYTE *)p_m_activeGradients + 1380) = 1;\n  PlayerObject::doReversePlayer(a1->m_player1, 0);\n  PlayerObject::rotateGameplayOnly(a1->m_player1, 0);\n  v4 = (float *)((__int64 (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1);\n  GJBaseGameLayer::loadUpToPosition(\n    a1,\n    *v4,\n    a1->m_startPosObject->m_startSettings->m_targetOrder,\n    a1->m_startPosObject->m_startSettings->m_targetChannel);\n  *((_BYTE *)p_m_activeGradients + 1380) = 0;\n  m_startSettings = a1->m_startPosObject->m_startSettings;\n  if ( m_startSettings->m_resetCamera )\n  {\n    *(_OWORD *)&a1->m_gameState.m_cameraEdgeValue0 = 0u;\n    ((void (__fastcall *)(GJBaseGameLayer *, _QWORD, _QWORD, _QWORD, __int64, __int64, float, float, float))a1->updateScreenRotation)(\n      a1,\n      0,\n      0,\n      0,\n      0xFFFFFFFFLL,\n      0xFFFFFFFFLL,\n      0.0,\n      0.0,\n      0.0);\n    *(_QWORD *)&a1->m_cameraWidthOffset = 0;\n    *(_QWORD *)&a1->m_cameraUnzoomedHeightOffset = 0;\n    *((_BYTE *)p_m_activeGradients + 204) = 1;\n    sub_1000229D0(&a1->m_gameState.m_cameraStepDiff, (double *)&qword_10086C9A0);\n    sub_1000229D0(&a1->m_gameState.m_unkPoint10, (double *)&qword_10086C9A0);\n    GJBaseGameLayer::resetStaticCamera(a1, 1, 1);\n    m_startSettings = a1->m_startPosObject->m_startSettings;\n  }\n  GJBaseGameLayer::setupLevelStart(a1, m_startSettings);\n  *((_BYTE *)p_m_activeGradients + 1383) = 0;\n}", "assembly": "; \n; GJBaseGameLayer::loadStartPosObject from 0x1001fcacc to 0x1001fcbfc (304 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::resetLevel @ 0x1001224bc\n; > LevelEditorLayer::onPlaytest @ 0x100362e30\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\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1001fcacc\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001fcad0\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001fcad4\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001fcad8\nMOV             X19, X0                                                ; +0x10, 0x1001fcadc\nADD             X21, X0, #3,LSL#12                                     ; +0x14, 0x1001fcae0\nBL              GameManager__sharedState                               ; +0x18, 0x1001fcae4\nADRL            X1, a0151; \"0151\"                                      ; +0x1c, 0x1001fcae8\nBL              GameManager__getGameVariable                           ; +0x24, 0x1001fcaf0\nSTRB            W0, [X21,#0x567]                                       ; +0x28, 0x1001fcaf4\nMOV             W20, #1                                                ; +0x2c, 0x1001fcaf8\nSTRB            W20, [X21,#0x564]                                      ; +0x30, 0x1001fcafc\nLDR             X0, [X19,#0xCC8]                                       ; +0x34, 0x1001fcb00\nMOV             W1, #0                                                 ; +0x38, 0x1001fcb04\nBL              PlayerObject__doReversePlayer                          ; +0x3c, 0x1001fcb08\nLDR             X0, [X19,#0xCC8]                                       ; +0x40, 0x1001fcb0c\nMOV             W1, #0                                                 ; +0x44, 0x1001fcb10\nBL              PlayerObject__rotateGameplayOnly                       ; +0x48, 0x1001fcb14\nLDR             X0, [X19,#0xCC8]                                       ; +0x4c, 0x1001fcb18\nLDR             X8, [X0]                                               ; +0x50, 0x1001fcb1c\nLDR             X8, [X8,#0xC0]                                         ; +0x54, 0x1001fcb20\nBLR             X8                                                     ; +0x58, 0x1001fcb24\nLDR             S0, [X0]                                               ; +0x5c, 0x1001fcb28\nLDR             X8, [X19,#0x3018]                                      ; +0x60, 0x1001fcb2c\nLDR             X8, [X8,#0x730]                                        ; +0x64, 0x1001fcb30\nLDR             W1, [X8,#0x174]                                        ; +0x68, 0x1001fcb34\nLDR             W2, [X8,#0x178]                                        ; +0x6c, 0x1001fcb38\nMOV             X0, X19                                                ; +0x70, 0x1001fcb3c\nBL              GJBaseGameLayer__loadUpToPosition                      ; +0x74, 0x1001fcb40\nSTRB            WZR, [X21,#0x564]                                      ; +0x78, 0x1001fcb44\nLDR             X8, [X19,#0x3018]                                      ; +0x7c, 0x1001fcb48\nLDR             X1, [X8,#0x730]                                        ; +0x80, 0x1001fcb4c\nLDRB            W8, [X1,#0x1B8]                                        ; +0x84, 0x1001fcb50\nCMP             W8, #1                                                 ; +0x88, 0x1001fcb54\nB.NE            loc_1001FCBE0                                          ; +0x8c, 0x1001fcb58\nMOVI            V0.16B, #0                                             ; +0x90, 0x1001fcb5c\nSTR             Q0, [X19,#0x420]                                       ; +0x94, 0x1001fcb60\nLDR             X8, [X19]                                              ; +0x98, 0x1001fcb64\nLDR             X8, [X8,#0x568]                                        ; +0x9c, 0x1001fcb68\nFMOV            S0, WZR                                                ; +0xa0, 0x1001fcb6c\nFMOV            S1, WZR                                                ; +0xa4, 0x1001fcb70\nFMOV            S2, WZR                                                ; +0xa8, 0x1001fcb74\nMOV             X0, X19                                                ; +0xac, 0x1001fcb78\nMOV             W1, #0                                                 ; +0xb0, 0x1001fcb7c\nMOV             W2, #0                                                 ; +0xb4, 0x1001fcb80\nMOV             W3, #0                                                 ; +0xb8, 0x1001fcb84\nMOV             W4, #0xFFFFFFFF                                        ; +0xbc, 0x1001fcb88\nMOV             W5, #0xFFFFFFFF                                        ; +0xc0, 0x1001fcb8c\nBLR             X8                                                     ; +0xc4, 0x1001fcb90\nMOVI            D0, #0                                                 ; +0xc8, 0x1001fcb94\nSTR             D0, [X19,#0x3098]                                      ; +0xcc, 0x1001fcb98\nMOV             W8, #0x30C4                                            ; +0xd0, 0x1001fcb9c\nSTR             XZR, [X19,X8]                                          ; +0xd4, 0x1001fcba0\nSTRB            W20, [X21,#0xCC]                                       ; +0xd8, 0x1001fcba4\nADRL            X20, qword_10086C9A0                                   ; +0xdc, 0x1001fcba8\nADD             X0, X19, #0x47C                                        ; +0xe4, 0x1001fcbb0\nMOV             X1, X20                                                ; +0xe8, 0x1001fcbb4\nBL              sub_1000229D0                                          ; +0xec, 0x1001fcbb8\nADD             X0, X19, #0x200                                        ; +0xf0, 0x1001fcbbc\nMOV             X1, X20                                                ; +0xf4, 0x1001fcbc0\nBL              sub_1000229D0                                          ; +0xf8, 0x1001fcbc4\nMOV             X0, X19                                                ; +0xfc, 0x1001fcbc8\nMOV             W1, #1                                                 ; +0x100, 0x1001fcbcc\nMOV             W2, #1                                                 ; +0x104, 0x1001fcbd0\nBL              GJBaseGameLayer__resetStaticCamera                     ; +0x108, 0x1001fcbd4\nLDR             X8, [X19,#0x3018]                                      ; +0x10c, 0x1001fcbd8\nLDR             X1, [X8,#0x730]                                        ; +0x110, 0x1001fcbdc\nMOV             X0, X19                                                ; +0x114, 0x1001fcbe0\nBL              GJBaseGameLayer__setupLevelStart                       ; +0x118, 0x1001fcbe4\nSTRB            WZR, [X21,#0x567]                                      ; +0x11c, 0x1001fcbe8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x120, 0x1001fcbec\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x124, 0x1001fcbf0\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x128, 0x1001fcbf4\nRET                                                                    ; +0x12c, 0x1001fcbf8", "xrefs": ["PlayLayer::resetLevel @ 0x1001224bc", "LevelEditorLayer::onPlaytest @ 0x100362e30"], "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"}