{"type": "func", "start": 4297072268, "end": 4297072576, "name": "GJBaseGameLayer::loadLevelSettings", "pseudocode": "// \n// GJBaseGameLayer::loadLevelSettings from 0x100201e8c to 0x100201fc0 (308 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::prepareCreateObjectsFromSetup @ 0x1001162f0\n// > LevelEditorLayer::init @ 0x1003574f4\n// > LevelEditorLayer::createObjectsFromSetup @ 0x100357ee0\n// > LevelEditorLayer::levelSettingsUpdated @ 0x1003593d4\n// > LevelEditorLayer::onPlaytest @ 0x100362b38\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::loadLevelSettings(GJBaseGameLayer *a1)\n{\n  bool m_platformerMode; // w1\n  GJGameLevel *m_level; // x8\n  PlayerObject *m_player1; // x9\n  LevelSettingsObject *m_levelSettings; // x0\n  bool v6; // w10\n  PlayerObject *m_player2; // x12\n  bool v8; // w10\n  _BOOL4 shouldUseYSection; // w0\n  float v10; // s0\n  cocos2d::CCArray *m_objects; // x8\n  cocos2d::ccArray *data; // x9\n  __int64 num; // x8\n  GameObject **arr; // x21\n  unsigned __int64 v15; // x22\n  GameObject *v16; // x20\n  bool v17; // w0\n  _BOOL4 m_fixNegativeScale; // w8\n\n  m_platformerMode = a1->m_levelSettings->m_platformerMode;\n  a1->m_isPlatformer = m_platformerMode;\n  PlayerObject::togglePlatformerMode(a1->m_player1, m_platformerMode);\n  PlayerObject::togglePlatformerMode(a1->m_player2, a1->m_isPlatformer);\n  m_level = a1->m_level;\n  if ( a1->m_isPlatformer )\n    m_level->m_levelLength = 5;\n  m_player1 = a1->m_player1;\n  m_levelSettings = a1->m_levelSettings;\n  v6 = !m_levelSettings->m_fixRobotJump;\n  m_player1->m_fixRobotJump = v6;\n  m_player2 = a1->m_player2;\n  m_player2->m_fixRobotJump = v6;\n  v8 = !m_levelSettings->m_decreaseBoostSlide;\n  m_player1->m_decreaseBoostSlide = v8;\n  m_player2->m_decreaseBoostSlide = v8;\n  if ( m_level->m_timestamp <= 0 )\n    m_level->m_timestamp = m_levelSettings->m_propertykA44;\n  shouldUseYSection = LevelSettingsObject::shouldUseYSection(m_levelSettings);\n  v10 = 0.01;\n  if ( !shouldUseYSection )\n    v10 = 0.0;\n  a1->m_sectionYFactor = v10;\n  m_objects = a1->m_objects;\n  if ( m_objects )\n  {\n    data = m_objects->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = (GameObject **)data->arr;\n      v15 = (unsigned __int64)&arr[num - 1];\n      do\n      {\n        v16 = *arr;\n        if ( !*arr )\n          break;\n        v17 = a1->m_allowStaticRotate || GameObject::canRotateFree(*arr);\n        v16->m_canRotateFree = v17;\n        m_fixNegativeScale = a1->m_fixNegativeScale;\n        if ( v16->m_isMirroredByScale != m_fixNegativeScale )\n          v16->m_isObjectRectDirty = 1;\n        v16->m_isMirroredByScale = m_fixNegativeScale;\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v15 );\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::loadLevelSettings from 0x100201e8c to 0x100201fc0 (308 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::prepareCreateObjectsFromSetup @ 0x1001162f0\n; > LevelEditorLayer::init @ 0x1003574f4\n; > LevelEditorLayer::createObjectsFromSetup @ 0x100357ee0\n; > LevelEditorLayer::levelSettingsUpdated @ 0x1003593d4\n; > LevelEditorLayer::onPlaytest @ 0x100362b38\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             X24, X23, [SP,#-0x10+var_30]!                          ; +0x0, 0x100201e8c\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x100201e90\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100201e94\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100201e98\nADD             X29, SP, #0x30                                         ; +0x10, 0x100201e9c\nMOV             X19, X0                                                ; +0x14, 0x100201ea0\nLDR             X8, [X0,#0xCD8]                                        ; +0x18, 0x100201ea4\nLDRB            W1, [X8,#0x155]                                        ; +0x1c, 0x100201ea8\nMOV             W20, #0x2F5E                                           ; +0x20, 0x100201eac\nSTRB            W1, [X0,X20]                                           ; +0x24, 0x100201eb0\nLDR             X0, [X0,#0xCC8]                                        ; +0x28, 0x100201eb4\nBL              PlayerObject__togglePlatformerMode                     ; +0x2c, 0x100201eb8\nLDR             X0, [X19,#0xCD0]                                       ; +0x30, 0x100201ebc\nLDRB            W1, [X19,X20]                                          ; +0x34, 0x100201ec0\nBL              PlayerObject__togglePlatformerMode                     ; +0x38, 0x100201ec4\nLDRB            W9, [X19,X20]                                          ; +0x3c, 0x100201ec8\nLDR             X8, [X19,#0x790]                                       ; +0x40, 0x100201ecc\nCMP             W9, #1                                                 ; +0x44, 0x100201ed0\nB.NE            loc_100201EE0                                          ; +0x48, 0x100201ed4\nMOV             W9, #5                                                 ; +0x4c, 0x100201ed8\nSTR             W9, [X8,#0x310]                                        ; +0x50, 0x100201edc\nLDR             X9, [X19,#0xCC8]                                       ; +0x54, 0x100201ee0\nLDR             X0, [X19,#0xCD8]                                       ; +0x58, 0x100201ee4\nLDRB            W10, [X0,#0x1C4]                                       ; +0x5c, 0x100201ee8\nMOV             W11, #1                                                ; +0x60, 0x100201eec\nBIC             W10, W11, W10                                          ; +0x64, 0x100201ef0\nSTRB            W10, [X9,#0xB58]                                       ; +0x68, 0x100201ef4\nLDR             X12, [X19,#0xCD0]                                      ; +0x6c, 0x100201ef8\nSTRB            W10, [X12,#0xB58]                                      ; +0x70, 0x100201efc\nLDRB            W10, [X0,#0x1CB]                                       ; +0x74, 0x100201f00\nBIC             W10, W11, W10                                          ; +0x78, 0x100201f04\nSTRB            W10, [X9,#0x9E0]                                       ; +0x7c, 0x100201f08\nSTRB            W10, [X12,#0x9E0]                                      ; +0x80, 0x100201f0c\nLDR             W9, [X8,#0x460]                                        ; +0x84, 0x100201f10\nCMP             W9, #0                                                 ; +0x88, 0x100201f14\nB.GT            loc_100201F24                                          ; +0x8c, 0x100201f18\nLDR             W9, [X0,#0x1B0]                                        ; +0x90, 0x100201f1c\nSTR             W9, [X8,#0x460]                                        ; +0x94, 0x100201f20\nBL              LevelSettingsObject__shouldUseYSection                 ; +0x98, 0x100201f24\nCMP             W0, #0                                                 ; +0x9c, 0x100201f28\nADRP            X8, #dword_10063569C@PAGE                              ; +0xa0, 0x100201f2c\nLDR             S0, [X8,#dword_10063569C@PAGEOFF]                      ; +0xa4, 0x100201f30\nFMOV            S1, WZR                                                ; +0xa8, 0x100201f34\nFCSEL           S0, S0, S1, NE                                         ; +0xac, 0x100201f38\nSTR             S0, [X19,#0x34BC]                                      ; +0xb0, 0x100201f3c\nLDR             X8, [X19,#0xCE0]                                       ; +0xb4, 0x100201f40\nCBZ             X8, loc_100201FAC                                      ; +0xb8, 0x100201f44\nLDR             X9, [X8,#0x38]                                         ; +0xbc, 0x100201f48\nLDR             W8, [X9]                                               ; +0xc0, 0x100201f4c\nCBZ             W8, loc_100201FAC                                      ; +0xc4, 0x100201f50\nLDR             X21, [X9,#0x10]                                        ; +0xc8, 0x100201f54\nADD             X8, X21, X8,LSL#3                                      ; +0xcc, 0x100201f58\nSUB             X22, X8, #8                                            ; +0xd0, 0x100201f5c\nMOV             W23, #1                                                ; +0xd4, 0x100201f60\nLDR             X20, [X21]                                             ; +0xd8, 0x100201f64\nCBZ             X20, loc_100201FAC                                     ; +0xdc, 0x100201f68\nLDRB            W8, [X19,#0x7A0]                                       ; +0xe0, 0x100201f6c\nTBZ             W8, #0, loc_100201F7C                                  ; +0xe4, 0x100201f70\nMOV             W0, #1                                                 ; +0xe8, 0x100201f74\nB               loc_100201F84                                          ; +0xec, 0x100201f78\nMOV             X0, X20                                                ; +0xf0, 0x100201f7c\nBL              GameObject__canRotateFree                              ; +0xf4, 0x100201f80\nSTRB            W0, [X20,#0x364]                                       ; +0xf8, 0x100201f84\nLDRB            W9, [X20,#0x365]                                       ; +0xfc, 0x100201f88\nLDRB            W8, [X19,#0x7A1]                                       ; +0x100, 0x100201f8c\nCMP             W9, W8                                                 ; +0x104, 0x100201f90\nB.EQ            loc_100201F9C                                          ; +0x108, 0x100201f94\nSTRB            W23, [X20,#0x360]                                      ; +0x10c, 0x100201f98\nSTRB            W8, [X20,#0x365]                                       ; +0x110, 0x100201f9c\nADD             X21, X21, #8                                           ; +0x114, 0x100201fa0\nCMP             X21, X22                                               ; +0x118, 0x100201fa4\nB.LS            loc_100201F64                                          ; +0x11c, 0x100201fa8\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x120, 0x100201fac\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x124, 0x100201fb0\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x128, 0x100201fb4\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0x12c, 0x100201fb8\nRET                                                                    ; +0x130, 0x100201fbc", "xrefs": ["PlayLayer::prepareCreateObjectsFromSetup @ 0x1001162f0", "LevelEditorLayer::init @ 0x1003574f4", "LevelEditorLayer::createObjectsFromSetup @ 0x100357ee0", "LevelEditorLayer::levelSettingsUpdated @ 0x1003593d4", "LevelEditorLayer::onPlaytest @ 0x100362b38"], "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"}