{"type": "func", "start": 4751236, "end": 4751640, "name": "GJBaseGameLayer::resetCamera", "pseudocode": "// \n// GJBaseGameLayer::resetCamera from 0x487f84 to 0x488118 (404 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::resetLevelVariables @ 0x491de2\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::resetCamera(GJBaseGameLayer *a1)\n{\n  int v1; // r2\n  bool v2; // r3\n  int v4; // r2\n  bool v5; // r3\n  int v6; // r2\n  bool v7; // r3\n  int v8; // r2\n  bool v9; // r3\n  int v10; // r2\n  bool v11; // r3\n  int v12; // r2\n  bool v13; // r3\n  int v14; // r2\n  bool v15; // r3\n  int v16; // r2\n  bool v17; // r3\n  int v18; // r2\n  bool v19; // r3\n  int v20; // r2\n  bool v21; // r3\n  int v22; // r2\n  bool v23; // r3\n  GJBaseGameLayer_vtbl *v24; // r3\n  void (__fastcall *updateScreenRotation)(GJBaseGameLayer *__hidden, float, bool, bool, float, int, float, int, int); // r12\n  int v26; // r2\n\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint18, COERCE_FLOAT(&stru_AC68C0), v1, v2);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint17, COERCE_FLOAT(&stru_AC68C0), v4, v5);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint19, COERCE_FLOAT(&stru_AC68C0), v6, v7);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint21, COERCE_FLOAT(&stru_AC68C0), v8, v9);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint20, COERCE_FLOAT(&stru_AC68C0), v10, v11);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint22, COERCE_FLOAT(&stru_AC68C0), v12, v13);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint23, COERCE_FLOAT(&stru_AC68C0), v14, v15);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint10, COERCE_FLOAT(&stru_AC68C0), v16, v17);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint5, COERCE_FLOAT(&stru_AC68C0), v18, v19);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint12, COERCE_FLOAT(&stru_AC68C0), v20, v21);\n  cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_gameState.m_unkPoint13, COERCE_FLOAT(&stru_AC68C0), v22, v23);\n  a1->m_gameState.m_unkBool28 = 0;\n  a1->m_gameState.m_unkBool29 = 0;\n  a1->m_gameState.m_unkUint13 = 0.0;\n  a1->m_gameState.m_unkFloat2 = 0.5;\n  a1->m_gameState.m_unkFloat3 = 10.0;\n  a1->m_gameState.m_isFreeMode = 0;\n  GJBaseGameLayer::updateZoom(a1, 0.0, 0.0, 0, 0.0, -1, -1);\n  GJBaseGameLayer::updateCameraOffsetX(a1, 0.0, 0.0, 0, 0.0, -1, -1);\n  GJBaseGameLayer::updateCameraOffsetY(a1, 0.0, 0.0, 0, 0.0, -1, -1);\n  GJBaseGameLayer::restoreDefaultGameplayOffsetX(a1);\n  GJBaseGameLayer::restoreDefaultGameplayOffsetY(a1);\n  GJBaseGameLayer::updateInternalCamOffsetY(a1, 0.0, 0.0, 0.0);\n  GJBaseGameLayer::updateInternalCamOffsetX(a1, 0.0, 0.0, 0.0);\n  v24 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  a1->m_gameState.m_cameraEdgeValue0 = 0;\n  updateScreenRotation = v24->updateScreenRotation;\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))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), v26, 252);\n  GJBaseGameLayer::resetStaticCamera(a1, 1, 1);\n  GJBaseGameLayer::stopCameraShake(a1);\n  a1->m_gameState.m_unkBool4 = 0;\n  a1->m_gameState.m_unkBool5 = 0;\n  a1->m_gameState.m_unkInt13 = 0.0;\n  a1->m_gameState.m_unkPoint14.x = 1.0;\n  a1->m_gameState.m_unkPoint14.y = 1.0;\n}", "assembly": "; \n; GJBaseGameLayer::resetCamera from 0x487f84 to 0x488118 (404 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::resetLevelVariables @ 0x491de2\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, 0x487f84\nMOV             R4, R0                                                 ; +0x4, 0x487f88\nLDR             R7, =(qword_AC68B8 - 0x487F98)                         ; +0x6, 0x487f8a\nSUB             SP, SP, #0x18                                          ; +0x8, 0x487f8c\nADD.W           R0, R0, #0x1E0                                         ; +0xa, 0x487f8e\nMOVS            R5, #0                                                 ; +0xe, 0x487f92\nADD             R7, PC; qword_AC68B8                                   ; +0x10, 0x487f94\nMOVS            R6, #0                                                 ; +0x12, 0x487f96\nADDS            R7, #(stru_AC68C0 - 0xAC68B8)                          ; +0x14, 0x487f98\nMOV.W           R8, #0xFFFFFFFF                                        ; +0x16, 0x487f9a\nMOV             R1, R7                                                 ; +0x1a, 0x487f9e\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x1c, 0x487fa0\nMOV             R1, R7                                                 ; +0x20, 0x487fa4\nADD.W           R0, R4, #0x1D8                                         ; +0x22, 0x487fa6\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x26, 0x487faa\nMOV             R1, R7                                                 ; +0x2a, 0x487fae\nADD.W           R0, R4, #0x1E8                                         ; +0x2c, 0x487fb0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x30, 0x487fb4\nMOV             R1, R7                                                 ; +0x34, 0x487fb8\nADD.W           R0, R4, #0x1F8                                         ; +0x36, 0x487fba\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x3a, 0x487fbe\nMOV             R1, R7                                                 ; +0x3e, 0x487fc2\nADD.W           R0, R4, #0x1F0                                         ; +0x40, 0x487fc4\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x44, 0x487fc8\nMOV             R1, R7                                                 ; +0x48, 0x487fcc\nADD.W           R0, R4, #0x200                                         ; +0x4a, 0x487fce\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x4e, 0x487fd2\nMOV             R1, R7                                                 ; +0x52, 0x487fd6\nADD.W           R0, R4, #0x208                                         ; +0x54, 0x487fd8\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x58, 0x487fdc\nMOV             R1, R7                                                 ; +0x5c, 0x487fe0\nADD.W           R0, R4, #0x1A0                                         ; +0x5e, 0x487fe2\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x62, 0x487fe6\nMOV             R1, R7                                                 ; +0x66, 0x487fea\nADD.W           R0, R4, #0x178                                         ; +0x68, 0x487fec\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x6c, 0x487ff0\nMOV             R1, R7                                                 ; +0x70, 0x487ff4\nADD.W           R0, R4, #0x1B0                                         ; +0x72, 0x487ff6\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x76, 0x487ffa\nMOV             R1, R7                                                 ; +0x7a, 0x487ffe\nADD.W           R0, R4, #0x1B8                                         ; +0x7c, 0x488000\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x80, 0x488004\nADDW            R3, R4, #0x404                                         ; +0x84, 0x488008\nSTRB.W          R6, [R4,#0x560]                                        ; +0x88, 0x48800c\nMOV             R0, R4; this                                           ; +0x8c, 0x488010\nSTRB.W          R6, [R4,#0x561]                                        ; +0x8e, 0x488012\nMOV             R1, R5; float                                          ; +0x92, 0x488016\nSTR             R5, [R3]                                               ; +0x94, 0x488018\nMOV.W           R3, #0x3F000000                                        ; +0x96, 0x48801a\nSTR.W           R3, [R4,#0x26C]                                        ; +0x9a, 0x48801e\nMOV             R2, R5; float                                          ; +0x9e, 0x488022\nLDR             R3, =0x41200000                                        ; +0xa0, 0x488024\nSTR.W           R8, [SP,#0x18+var_14]; int                             ; +0xa2, 0x488026\nSTR.W           R8, [SP,#0x18+var_10]; int                             ; +0xa6, 0x48802a\nSTR.W           R3, [R4,#0x270]                                        ; +0xaa, 0x48802e\nMOV             R3, R6; int                                            ; +0xae, 0x488032\nSTRB.W          R6, [R4,#0x2B1]                                        ; +0xb0, 0x488034\nSTR             R5, [SP,#0x18+var_18]; float                           ; +0xb4, 0x488038\nBL              _ZN15GJBaseGameLayer10updateZoomEffifii; GJBaseGameLayer::updateZoom(float,float,int,float,int,int) ; +0xb6, 0x48803a\nSTR.W           R8, [SP,#0x18+var_14]; int                             ; +0xba, 0x48803e\nSTR.W           R8, [SP,#0x18+var_10]; int                             ; +0xbe, 0x488042\nMOV             R0, R4; this                                           ; +0xc2, 0x488046\nMOV             R1, R5; float                                          ; +0xc4, 0x488048\nMOV             R2, R5; float                                          ; +0xc6, 0x48804a\nMOV             R3, R6; int                                            ; +0xc8, 0x48804c\nSTR             R5, [SP,#0x18+var_18]; float                           ; +0xca, 0x48804e\nBL              _ZN15GJBaseGameLayer19updateCameraOffsetXEffifii; GJBaseGameLayer::updateCameraOffsetX(float,float,int,float,int,int) ; +0xcc, 0x488050\nMOV             R1, R5; float                                          ; +0xd0, 0x488054\nMOV             R2, R5; float                                          ; +0xd2, 0x488056\nMOV             R3, R6; int                                            ; +0xd4, 0x488058\nSTR.W           R8, [SP,#0x18+var_14]; int                             ; +0xd6, 0x48805a\nMOV             R0, R4; this                                           ; +0xda, 0x48805e\nSTR.W           R8, [SP,#0x18+var_10]; int                             ; +0xdc, 0x488060\nSTR             R5, [SP,#0x18+var_18]; float                           ; +0xe0, 0x488064\nBL              _ZN15GJBaseGameLayer19updateCameraOffsetYEffifii; GJBaseGameLayer::updateCameraOffsetY(float,float,int,float,int,int) ; +0xe2, 0x488066\nMOV             R0, R4; this                                           ; +0xe6, 0x48806a\nBL              _ZN15GJBaseGameLayer29restoreDefaultGameplayOffsetXEv; GJBaseGameLayer::restoreDefaultGameplayOffsetX(void) ; +0xe8, 0x48806c\nMOV             R0, R4; this                                           ; +0xec, 0x488070\nBL              _ZN15GJBaseGameLayer29restoreDefaultGameplayOffsetYEv; GJBaseGameLayer::restoreDefaultGameplayOffsetY(void) ; +0xee, 0x488072\nMOV             R0, R4; this                                           ; +0xf2, 0x488076\nMOV             R1, R5; float                                          ; +0xf4, 0x488078\nMOV             R2, R5; float                                          ; +0xf6, 0x48807a\nMOV             R3, R5; float                                          ; +0xf8, 0x48807c\nBL              _ZN15GJBaseGameLayer24updateInternalCamOffsetYEfff; GJBaseGameLayer::updateInternalCamOffsetY(float,float,float) ; +0xfa, 0x48807e\nMOV             R0, R4; this                                           ; +0xfe, 0x488082\nMOV             R1, R5; float                                          ; +0x100, 0x488084\nMOV             R2, R5; float                                          ; +0x102, 0x488086\nMOV             R3, R5; float                                          ; +0x104, 0x488088\nBL              _ZN15GJBaseGameLayer24updateInternalCamOffsetXEfff; GJBaseGameLayer::updateInternalCamOffsetX(float,float,float) ; +0x106, 0x48808a\nLDR             R3, [R4]                                               ; +0x10a, 0x48808e\nSTR.W           R8, [SP,#0x18+var_C]                                   ; +0x10c, 0x488090\nMOV             R2, R6                                                 ; +0x110, 0x488094\nSTR.W           R8, [SP,#0x18+var_8]                                   ; +0x112, 0x488096\nMOV             R0, R4                                                 ; +0x116, 0x48809a\nSTR             R5, [SP,#0x18+var_18]                                  ; +0x118, 0x48809c\nMOV             R1, R5                                                 ; +0x11a, 0x48809e\nSTR             R6, [SP,#0x18+var_14]                                  ; +0x11c, 0x4880a0\nMOV.W           R8, #1                                                 ; +0x11e, 0x4880a2\nSTR             R5, [SP,#0x18+var_10]                                  ; +0x122, 0x4880a6\nSTR.W           R6, [R4,#0x394]                                        ; +0x124, 0x4880a8\nLDR.W           R12, [R3,#0x2B4]                                       ; +0x128, 0x4880ac\nMOV             R3, R6                                                 ; +0x12c, 0x4880b0\nSTR.W           R6, [R4,#0x398]                                        ; +0x12e, 0x4880b2\nSTR.W           R6, [R4,#0x39C]                                        ; +0x132, 0x4880b6\nSTR.W           R6, [R4,#0x3A0]                                        ; +0x136, 0x4880ba\nBLX             R12                                                    ; +0x13a, 0x4880be\nADD.W           R3, R4, #0x2AC0                                        ; +0x13c, 0x4880c0\nMOV             R1, R7                                                 ; +0x140, 0x4880c4\nADD.W           R0, R4, #0x3D8                                         ; +0x142, 0x4880c6\nSTR             R5, [R3,#0x14]                                         ; +0x146, 0x4880ca\nADD.W           R3, R4, #0x2AC0                                        ; +0x148, 0x4880cc\nSTR             R5, [R3,#0x18]                                         ; +0x14c, 0x4880d0\nADD.W           R3, R4, #0x2AC0                                        ; +0x14e, 0x4880d2\nSTR             R5, [R3,#0x34]                                         ; +0x152, 0x4880d6\nADD.W           R3, R4, #0x2AC0                                        ; +0x154, 0x4880d8\nSTR             R5, [R3,#0x38]                                         ; +0x158, 0x4880dc\nMOVW            R3, #0x2AFC                                            ; +0x15a, 0x4880de\nSTRB.W          R8, [R4,R3]                                            ; +0x15e, 0x4880e2\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x162, 0x4880e6\nMOV             R0, R4; this                                           ; +0x166, 0x4880ea\nMOV             R1, R8; bool                                           ; +0x168, 0x4880ec\nMOV             R2, R8; bool                                           ; +0x16a, 0x4880ee\nBL              _ZN15GJBaseGameLayer17resetStaticCameraEbb; GJBaseGameLayer::resetStaticCamera(bool,bool) ; +0x16c, 0x4880f0\nMOV             R0, R4; this                                           ; +0x170, 0x4880f4\nBL              _ZN15GJBaseGameLayer15stopCameraShakeEv; GJBaseGameLayer::stopCameraShake(void) ; +0x172, 0x4880f6\nMOV.W           R3, #0x3F800000                                        ; +0x176, 0x4880fa\nSTRB.W          R6, [R4,#0x268]                                        ; +0x17a, 0x4880fe\nSTRB.W          R6, [R4,#0x269]                                        ; +0x17e, 0x488102\nSTR.W           R5, [R4,#0x2A4]                                        ; +0x182, 0x488106\nSTR.W           R3, [R4,#0x1C0]                                        ; +0x186, 0x48810a\nSTR.W           R3, [R4,#0x1C4]                                        ; +0x18a, 0x48810e\nADD             SP, SP, #0x18                                          ; +0x18e, 0x488112\nPOP.W           {R4-R8,PC}                                             ; +0x190, 0x488114", "xrefs": ["GJBaseGameLayer::resetLevelVariables @ 0x491de2"], "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"}