{"type": "func", "start": 4812736, "end": 4813000, "name": "GJBaseGameLayer::loadStartPosObject", "pseudocode": "// \n// GJBaseGameLayer::loadStartPosObject from 0x496fc0 to 0x4970c8 (264 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::resetLevel @ 0x31fc7a\n// > LevelEditorLayer::onPlaytest @ 0x36ebf2\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; // r0\n  PlayerObject *m_player1; // r0\n  PlayerObject *v4; // r0\n  float *v5; // r0\n  StartPosObject *m_startPosObject; // r3\n  GJBaseGameLayer_vtbl *v7; // r1\n  int v8; // r2\n  int v9; // r2\n  bool v10; // r3\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  v4 = a1->m_player1;\n  byte_AC68F4 = 1;\n  v5 = (float *)v4->getPosition(v4);\n  GJBaseGameLayer::loadUpToPosition(\n    a1,\n    *v5,\n    a1->m_startPosObject->m_startSettings->m_targetOrder,\n    a1->m_startPosObject->m_startSettings->m_targetChannel);\n  m_startPosObject = a1->m_startPosObject;\n  a1->m_loadingStartPosition = 0;\n  byte_AC68F4 = 0;\n  if ( m_startPosObject->m_startSettings->m_resetCamera )\n  {\n    v7 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\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 *, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, int, int))v7->updateScreenRotation)(\n      a1,\n      0,\n      0,\n      0,\n      0,\n      0,\n      0,\n      -1,\n      -1);\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=((PlayerObject *)&a1->m_gameState.m_cameraStepDiff, COERCE_FLOAT(&stru_AC68C0), v8, 252);\n    cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint10, COERCE_FLOAT(&stru_AC68C0), v9, v10);\n    GJBaseGameLayer::resetStaticCamera(a1, 1, 1);\n  }\n  GJBaseGameLayer::setupLevelStart(a1, a1->m_startPosObject->m_startSettings);\n  a1->m_startOptimization = 0;\n}", "assembly": "; \n; GJBaseGameLayer::loadStartPosObject from 0x496fc0 to 0x4970c8 (264 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::resetLevel @ 0x31fc7a\n; > LevelEditorLayer::onPlaytest @ 0x36ebf2\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-R8,LR}                                             ; +0x0, 0x496fc0\nSUB             SP, SP, #0x18                                          ; +0x4, 0x496fc4\nMOV             R4, R0                                                 ; +0x6, 0x496fc6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x8, 0x496fc8\nLDR             R1, =(a0151 - 0x496FDA); \"0151\"                        ; +0xc, 0x496fcc\nMOVW            R8, #0x2DC8                                            ; +0xe, 0x496fce\nMOVS            R7, #1                                                 ; +0x12, 0x496fd2\nLDR             R6, =(qword_AC68B8 - 0x496FEA)                         ; +0x14, 0x496fd4\nADD             R1, PC; \"0151\"                                         ; +0x16, 0x496fd6\nMOVW            R5, #0x2A84                                            ; +0x18, 0x496fd8\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x1c, 0x496fdc\nMOVW            R3, #0x2DCB                                            ; +0x20, 0x496fe0\nMOVS            R1, #0; bool                                           ; +0x24, 0x496fe4\nADD             R6, PC; qword_AC68B8                                   ; +0x26, 0x496fe6\nSTRB            R0, [R4,R3]                                            ; +0x28, 0x496fe8\nLDR.W           R0, [R4,#0x8B8]; this                                  ; +0x2a, 0x496fea\nSTRB.W          R7, [R4,R8]                                            ; +0x2e, 0x496fee\nBL              _ZN12PlayerObject15doReversePlayerEb; PlayerObject::doReversePlayer(bool) ; +0x32, 0x496ff2\nMOVS            R1, #0; bool                                           ; +0x36, 0x496ff6\nLDR.W           R0, [R4,#0x8B8]; this                                  ; +0x38, 0x496ff8\nBL              _ZN12PlayerObject18rotateGameplayOnlyEb; PlayerObject::rotateGameplayOnly(bool) ; +0x3c, 0x496ffc\nLDR.W           R0, [R4,#0x8B8]                                        ; +0x40, 0x497000\nSTRB.W          R7, [R6,#(byte_AC68F4 - 0xAC68B8)]                     ; +0x44, 0x497004\nLDR             R3, [R0]                                               ; +0x48, 0x497008\nLDR             R3, [R3,#0x60]                                         ; +0x4a, 0x49700a\nBLX             R3                                                     ; +0x4c, 0x49700c\nLDR             R3, [R4,R5]                                            ; +0x4e, 0x49700e\nLDR.W           R3, [R3,#0x664]                                        ; +0x50, 0x497010\nMOV             R2, R0                                                 ; +0x54, 0x497014\nMOV             R0, R4; this                                           ; +0x56, 0x497016\nLDR             R1, [R2]; float                                        ; +0x58, 0x497018\nLDR.W           R2, [R3,#0x138]; int                                   ; +0x5a, 0x49701a\nLDR.W           R3, [R3,#0x13C]; int                                   ; +0x5e, 0x49701e\nBL              _ZN15GJBaseGameLayer16loadUpToPositionEfii; GJBaseGameLayer::loadUpToPosition(float,int,int) ; +0x62, 0x497022\nLDR             R3, [R4,R5]                                            ; +0x66, 0x497026\nMOVS            R2, #0                                                 ; +0x68, 0x497028\nSTRB.W          R2, [R4,R8]                                            ; +0x6a, 0x49702a\nSTRB.W          R2, [R6,#(byte_AC68F4 - 0xAC68B8)]                     ; +0x6e, 0x49702e\nLDR.W           R3, [R3,#0x664]                                        ; +0x72, 0x497032\nLDRB.W          R3, [R3,#0x160]                                        ; +0x76, 0x497036\nCMP             R3, #0                                                 ; +0x7a, 0x49703a\nBEQ             loc_4970AA                                             ; +0x7c, 0x49703c\nLDR             R1, [R4]                                               ; +0x7e, 0x49703e\nMOVS            R5, #0                                                 ; +0x80, 0x497040\nSTR             R2, [SP,#0x18+var_14]                                  ; +0x82, 0x497042\nMOV.W           R3, #0xFFFFFFFF                                        ; +0x84, 0x497044\nSTR.W           R2, [R4,#0x394]                                        ; +0x88, 0x497048\nMOV             R0, R4                                                 ; +0x8c, 0x49704c\nSTR.W           R2, [R4,#0x398]                                        ; +0x8e, 0x49704e\nADDS            R6, #(stru_AC68C0 - 0xAC68B8)                          ; +0x92, 0x497052\nSTR.W           R2, [R4,#0x39C]                                        ; +0x94, 0x497054\nSTR.W           R2, [R4,#0x3A0]                                        ; +0x98, 0x497058\nSTR             R3, [SP,#0x18+var_C]                                   ; +0x9c, 0x49705c\nSTR             R3, [SP,#0x18+var_8]                                   ; +0x9e, 0x49705e\nMOV             R3, R2                                                 ; +0xa0, 0x497060\nSTR             R5, [SP,#0x18+var_18]                                  ; +0xa2, 0x497062\nSTR             R5, [SP,#0x18+var_10]                                  ; +0xa4, 0x497064\nLDR.W           R12, [R1,#0x2B4]                                       ; +0xa6, 0x497066\nMOV             R1, R5                                                 ; +0xaa, 0x49706a\nBLX             R12                                                    ; +0xac, 0x49706c\nADD.W           R3, R4, #0x2AC0                                        ; +0xae, 0x49706e\nMOV             R1, R6                                                 ; +0xb2, 0x497072\nADD.W           R0, R4, #0x3D8                                         ; +0xb4, 0x497074\nSTR             R5, [R3,#0x14]                                         ; +0xb8, 0x497078\nADD.W           R3, R4, #0x2AC0                                        ; +0xba, 0x49707a\nSTR             R5, [R3,#0x18]                                         ; +0xbe, 0x49707e\nADD.W           R3, R4, #0x2AC0                                        ; +0xc0, 0x497080\nSTR             R5, [R3,#0x34]                                         ; +0xc4, 0x497084\nADD.W           R3, R4, #0x2AC0                                        ; +0xc6, 0x497086\nSTR             R5, [R3,#0x38]                                         ; +0xca, 0x49708a\nMOVW            R3, #0x2AFC                                            ; +0xcc, 0x49708c\nSTRB            R7, [R4,R3]                                            ; +0xd0, 0x497090\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xd2, 0x497092\nMOV             R1, R6                                                 ; +0xd6, 0x497096\nADD.W           R0, R4, #0x1A0                                         ; +0xd8, 0x497098\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xdc, 0x49709c\nMOV             R0, R4; this                                           ; +0xe0, 0x4970a0\nMOV             R1, R7; bool                                           ; +0xe2, 0x4970a2\nMOV             R2, R7; bool                                           ; +0xe4, 0x4970a4\nBL              _ZN15GJBaseGameLayer17resetStaticCameraEbb; GJBaseGameLayer::resetStaticCamera(bool,bool) ; +0xe6, 0x4970a6\nMOVW            R3, #0x2A84                                            ; +0xea, 0x4970aa\nMOV             R0, R4; this                                           ; +0xee, 0x4970ae\nLDR             R3, [R4,R3]                                            ; +0xf0, 0x4970b0\nLDR.W           R1, [R3,#0x664]; LevelSettingsObject *                 ; +0xf2, 0x4970b2\nBL              _ZN15GJBaseGameLayer15setupLevelStartEP19LevelSettingsObject; GJBaseGameLayer::setupLevelStart(LevelSettingsObject *) ; +0xf6, 0x4970b6\nMOVW            R3, #0x2DCB                                            ; +0xfa, 0x4970ba\nMOVS            R2, #0                                                 ; +0xfe, 0x4970be\nSTRB            R2, [R4,R3]                                            ; +0x100, 0x4970c0\nADD             SP, SP, #0x18                                          ; +0x102, 0x4970c2\nPOP.W           {R4-R8,PC}                                             ; +0x104, 0x4970c4", "xrefs": ["PlayLayer::resetLevel @ 0x31fc7a", "LevelEditorLayer::onPlaytest @ 0x36ebf2"], "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"}