{"type": "func", "start": 9033408, "end": 9033736, "name": "GJBaseGameLayer::loadStartPosObject", "pseudocode": "// \n// GJBaseGameLayer::loadStartPosObject from 0x89d6c0 to 0x89d808 (328 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::resetLevel @ 0x5e5b10\n// > LevelEditorLayer::onPlaytest @ 0x66438c\n// > <???> @ 0x7da60\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::loadStartPosObject(GJBaseGameLayer *a1)\n{\n  GameManager *v2; // x0\n  PlayerObject *m_player1; // x0\n  const cocos2d::CCPoint *v4; // x0\n  StartPosObject *m_startPosObject; // x0\n  LevelSettingsObject *m_startSettings; // x1\n  void (__fastcall *updateScreenRotation)(GJBaseGameLayer *__hidden, float, bool, bool, float, int, float, int, int); // x6\n  float v8; // s1\n  float v9; // s0\n  float v10; // s1\n\n  v2 = GameManager::sharedState();\n  a1->m_startOptimization = GameManager::getGameVariable(v2, \"0151\");\n  m_player1 = a1->m_player1;\n  a1->m_loadingStartPosition = 1;\n  PlayerObject::doReversePlayer(m_player1, 0);\n  PlayerObject::rotateGameplayOnly(a1->m_player1, 0);\n  byte_1242DD4 = 1;\n  v4 = a1->m_player1->getPosition(a1->m_player1);\n  GJBaseGameLayer::loadUpToPosition(\n    a1,\n    v4->x,\n    a1->m_startPosObject->m_startSettings->m_targetOrder,\n    a1->m_startPosObject->m_startSettings->m_targetChannel);\n  byte_1242DD4 = 0;\n  m_startPosObject = a1->m_startPosObject;\n  a1->m_loadingStartPosition = 0;\n  m_startSettings = m_startPosObject->m_startSettings;\n  if ( m_startSettings->m_resetCamera )\n  {\n    updateScreenRotation = a1->updateScreenRotation;\n    a1->m_gameState.m_cameraEdgeValue0 = 0;\n    a1->m_gameState.m_cameraEdgeValue1 = 0;\n    a1->m_gameState.m_cameraEdgeValue2 = 0;\n    a1->m_gameState.m_cameraEdgeValue3 = 0;\n    ((void (__fastcall *)(GJBaseGameLayer *, _QWORD, _QWORD, _QWORD, __int64, __int64, float, float, float))updateScreenRotation)(\n      a1,\n      0,\n      0,\n      0,\n      0xFFFFFFFFLL,\n      0xFFFFFFFFLL,\n      0.0,\n      0.0,\n      0.0);\n    a1->m_cameraWidthOffset = 0.0;\n    a1->m_cameraHeightOffset = 0.0;\n    a1->m_cameraUnzoomedHeightOffset = 0.0;\n    a1->m_targetCameraHeightOffset = 0.0;\n    a1->m_calculateTargetHeightOffset = 1;\n    cocos2d::CCPoint::operator=(&a1->m_gameState.m_cameraStepDiff, 0.0, v8);\n    cocos2d::CCPoint::operator=(&a1->m_gameState.m_unkPoint10, v9, v10);\n    GJBaseGameLayer::resetStaticCamera(a1, 1, 1);\n    m_startSettings = a1->m_startPosObject->m_startSettings;\n  }\n  GJBaseGameLayer::setupLevelStart(a1, m_startSettings);\n  a1->m_startOptimization = 0;\n}", "assembly": "; \n; GJBaseGameLayer::loadStartPosObject from 0x89d6c0 to 0x89d808 (328 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::resetLevel @ 0x5e5b10\n; > LevelEditorLayer::onPlaytest @ 0x66438c\n; > <???> @ 0x7da60\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             X29, X30, [SP,#-0x30+var_s0]!                          ; +0x0, 0x89d6c0\nMOV             X29, SP                                                ; +0x4, 0x89d6c4\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x89d6c8\nSTP             X21, X22, [SP,#var_s20]                                ; +0xc, 0x89d6cc\nMOV             X19, X0                                                ; +0x10, 0x89d6d0\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x14, 0x89d6d4\nADRP            X1, #a0151@PAGE; \"0151\"                                ; +0x18, 0x89d6d8\nADD             X21, X19, #3,LSL#12                                    ; +0x1c, 0x89d6dc\nADD             X1, X1, #a0151@PAGEOFF; \"0151\"                         ; +0x20, 0x89d6e0\nMOV             W22, #1                                                ; +0x24, 0x89d6e4\nADRP            X20, #qword_1242DA0@PAGE                               ; +0x28, 0x89d6e8\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x2c, 0x89d6ec\nSTRB            W0, [X21,#0x747]                                       ; +0x30, 0x89d6f0\nLDR             X0, [X19,#0xDF8]; this                                 ; +0x34, 0x89d6f4\nMOV             W1, #0; bool                                           ; +0x38, 0x89d6f8\nSTRB            W22, [X21,#0x744]                                      ; +0x3c, 0x89d6fc\nADD             X20, X20, #qword_1242DA0@PAGEOFF                       ; +0x40, 0x89d700\nBL              _ZN12PlayerObject15doReversePlayerEb; PlayerObject::doReversePlayer(bool) ; +0x44, 0x89d704\nLDR             X0, [X19,#0xDF8]; this                                 ; +0x48, 0x89d708\nMOV             W1, #0; bool                                           ; +0x4c, 0x89d70c\nBL              _ZN12PlayerObject18rotateGameplayOnlyEb; PlayerObject::rotateGameplayOnly(bool) ; +0x50, 0x89d710\nSTRB            W22, [X20,#(byte_1242DD4 - 0x1242DA0)]                 ; +0x54, 0x89d714\nLDR             X1, [X19,#0xDF8]                                       ; +0x58, 0x89d718\nMOV             X0, X1                                                 ; +0x5c, 0x89d71c\nLDR             X1, [X1]                                               ; +0x60, 0x89d720\nLDR             X1, [X1,#0xC0]                                         ; +0x64, 0x89d724\nBLR             X1                                                     ; +0x68, 0x89d728\nLDR             X1, [X19,#0x31E8]                                      ; +0x6c, 0x89d72c\nLDR             S0, [X0]; float                                        ; +0x70, 0x89d730\nMOV             X0, X19; this                                          ; +0x74, 0x89d734\nLDR             X2, [X1,#0x720]                                        ; +0x78, 0x89d738\nLDR             W1, [X2,#0x174]; int                                   ; +0x7c, 0x89d73c\nLDR             W2, [X2,#0x178]; int                                   ; +0x80, 0x89d740\nBL              _ZN15GJBaseGameLayer16loadUpToPositionEfii; GJBaseGameLayer::loadUpToPosition(float,int,int) ; +0x84, 0x89d744\nSTRB            WZR, [X20,#(byte_1242DD4 - 0x1242DA0)]                 ; +0x88, 0x89d748\nLDR             X0, [X19,#0x31E8]                                      ; +0x8c, 0x89d74c\nSTRB            WZR, [X21,#0x744]                                      ; +0x90, 0x89d750\nLDR             X1, [X0,#0x720]                                        ; +0x94, 0x89d754\nLDRB            W0, [X1,#0x1A8]                                        ; +0x98, 0x89d758\nCBZ             W0, loc_89D7EC                                         ; +0x9c, 0x89d75c\nFMOV            S0, WZR                                                ; +0xa0, 0x89d760\nLDR             X0, [X19]                                              ; +0xa4, 0x89d764\nMOV             W4, #0xFFFFFFFF                                        ; +0xa8, 0x89d768\nMOV             W3, #0                                                 ; +0xac, 0x89d76c\nMOV             W5, W4                                                 ; +0xb0, 0x89d770\nMOV             W2, #0                                                 ; +0xb4, 0x89d774\nLDR             X6, [X0,#0x568]                                        ; +0xb8, 0x89d778\nMOV             W1, #0                                                 ; +0xbc, 0x89d77c\nFMOV            S1, S0                                                 ; +0xc0, 0x89d780\nMOV             X0, X19                                                ; +0xc4, 0x89d784\nFMOV            S2, S0                                                 ; +0xc8, 0x89d788\nSTR             WZR, [X19,#0x450]                                      ; +0xcc, 0x89d78c\nSTR             WZR, [X19,#0x454]                                      ; +0xd0, 0x89d790\nADD             X20, X20, #8                                           ; +0xd4, 0x89d794\nSTR             WZR, [X19,#0x458]                                      ; +0xd8, 0x89d798\nSTR             WZR, [X19,#0x45C]                                      ; +0xdc, 0x89d79c\nBLR             X6                                                     ; +0xe0, 0x89d7a0\nFMOV            S0, WZR                                                ; +0xe4, 0x89d7a4\nMOV             X1, X20                                                ; +0xe8, 0x89d7a8\nADD             X0, X19, #0x4BC                                        ; +0xec, 0x89d7ac\nSTR             S0, [X19,#0x3268]                                      ; +0xf0, 0x89d7b0\nSTR             S0, [X19,#0x326C]                                      ; +0xf4, 0x89d7b4\nSTR             S0, [X19,#0x3294]                                      ; +0xf8, 0x89d7b8\nSTR             S0, [X19,#0x3298]                                      ; +0xfc, 0x89d7bc\nSTRB            W22, [X21,#0x29C]                                      ; +0x100, 0x89d7c0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x104, 0x89d7c4\nMOV             X1, X20                                                ; +0x108, 0x89d7c8\nADD             X0, X19, #0x200                                        ; +0x10c, 0x89d7cc\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x110, 0x89d7d0\nMOV             X0, X19; this                                          ; +0x114, 0x89d7d4\nMOV             W1, W22; bool                                          ; +0x118, 0x89d7d8\nMOV             W2, W22; bool                                          ; +0x11c, 0x89d7dc\nBL              _ZN15GJBaseGameLayer17resetStaticCameraEbb; GJBaseGameLayer::resetStaticCamera(bool,bool) ; +0x120, 0x89d7e0\nLDR             X0, [X19,#0x31E8]                                      ; +0x124, 0x89d7e4\nLDR             X1, [X0,#0x720]; LevelSettingsObject *                 ; +0x128, 0x89d7e8\nMOV             X0, X19; this                                          ; +0x12c, 0x89d7ec\nBL              _ZN15GJBaseGameLayer15setupLevelStartEP19LevelSettingsObject; GJBaseGameLayer::setupLevelStart(LevelSettingsObject *) ; +0x130, 0x89d7f0\nSTRB            WZR, [X21,#0x747]                                      ; +0x134, 0x89d7f4\nLDP             X19, X20, [SP,#var_s10]                                ; +0x138, 0x89d7f8\nLDP             X21, X22, [SP,#var_s20]                                ; +0x13c, 0x89d7fc\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x140, 0x89d800\nRET                                                                    ; +0x144, 0x89d804", "xrefs": ["PlayLayer::resetLevel @ 0x5e5b10", "LevelEditorLayer::onPlaytest @ 0x66438c", "<???> @ 0x7da60"], "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"}