{"type": "func", "start": 4297127200, "end": 4297127708, "name": "LevelOptionsLayer2::setupOptions", "pseudocode": "// \n// LevelOptionsLayer2::setupOptions from 0x10020f520 to 0x10020f71c (508 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x1008f8d08\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:01:02 +0000\n// \n\n__int64 __fastcall LevelOptionsLayer2::setupOptions(__int64 a1, double a2)\n{\n  double v3; // d0\n  double v4; // d0\n  double v5; // d0\n  double v6; // d0\n  double v7; // d0\n  double v8; // d0\n  double v9; // d0\n  double v10; // d0\n  double v11; // d0\n  double v12; // d0\n  double v13; // d0\n  __int64 result; // x0\n  double v15; // d0\n\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Allow Multi-Rotation\",\n    8,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 448LL),\n    \"Allows multiple rotation actions to run on the same target group. This was not possible before 2.2.\",\n    a2);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Enable 2.2 Changes\",\n    17,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 456LL),\n    \"Legacy compatibility pre 2.2. Should be enabled on new levels.\",\n    v3);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Allow Static-Rotate\",\n    18,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 459LL),\n    \"Allow rotating static objects in actions and animations. There is currently no support for rotating static objects o\"\n    \"ther than 90 degree steps, but use this option to allow it anyway. Hitboxes will not match the art. Can be useful in some cases.\",\n    v4);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Enable Player Squeeze\",\n    9,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 449LL),\n    \"Destroys player when squeezed between two objects. This is on by default but only for levels after update 2.2 for le\"\n    \"gacy reasons. Cannot be disabled for platformer levels.\",\n    v5);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Fix Gravity Bug\",\n    10,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 450LL),\n    \"Fixes an old bug that makes flipped gravity act differently than normal gravity. Old levels can break with this enabled.\",\n    v6);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Fix Negative Scale\",\n    11,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 451LL),\n    \"Makes negative scaled objects collide correctly. Disabled on old levels for compatibility.\",\n    v7);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Fix Robot Jump\",\n    12,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 452LL),\n    \"Fixes robot jumps being bugged on slopes and/or pads.\",\n    v8);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Dynamic Level Height\",\n    14,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 453LL),\n    \"Increases max level height dynamically (the same way as max length). This option is always enabled in platformer mode.\",\n    v9);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Sort Groups\",\n    15,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 454LL),\n    \"Makes sure that spawn groups are triggered in the correct order (left to right).\",\n    v10);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Fix Radius Collision\",\n    16,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 455LL),\n    \"Replaces the player hitbox with a circle (instead of a square) for interactions with circular hitboxes. This fixes s\"\n    \"ome issues where collisions would not register.\",\n    v11);\n  GJOptionsLayer::addToggle(\n    a1,\n    \"Reverse Sync\",\n    19,\n    *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 460LL),\n    \"Slows down or speeds up the player when reversing direction using orb or pads to keep music in sync.\",\n    v12);\n  result = GJOptionsLayer::addToggle(\n             a1,\n             \"Decrease Boost Slide\",\n             22,\n             *(unsigned __int8 *)(*(_QWORD *)(a1 + 1120) + 461LL),\n             \"Slide less after dashing or being launched by moving blocks in platformer mode.\",\n             v13);\n  if ( (*(_BYTE *)(*(_QWORD *)(a1 + 1120) + 462LL) & 1) == 0 )\n    return GJOptionsLayer::addToggle(\n             a1,\n             \"Enable Impulse Fix\",\n             23,\n             0,\n             \"Fix moving platform impulse bugs in platformer mode.\",\n             v15);\n  return result;\n}", "assembly": "; \n; LevelOptionsLayer2::setupOptions from 0x10020f520 to 0x10020f71c (508 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x1008f8d08\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:01:02 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x10020f520\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10020f524\nADD             X29, SP, #0x10                                         ; +0x8, 0x10020f528\nMOV             X19, X0                                                ; +0xc, 0x10020f52c\nLDR             X8, [X0,#0x460]                                        ; +0x10, 0x10020f530\nLDRB            W3, [X8,#0x1C0]                                        ; +0x14, 0x10020f534\nADRL            X1, aAllowMultiRota; \"Allow Multi-Rotation\"            ; +0x18, 0x10020f538\nADRL            X4, aAllowsMultiple; \"Allows multiple rotation actions to run\"... ; +0x20, 0x10020f540\nMOV             W2, #8                                                 ; +0x28, 0x10020f548\nBL              GJOptionsLayer__addToggle                              ; +0x2c, 0x10020f54c\nLDR             X8, [X19,#0x460]                                       ; +0x30, 0x10020f550\nLDRB            W3, [X8,#0x1C8]                                        ; +0x34, 0x10020f554\nADRL            X1, aEnable22Change; \"Enable 2.2 Changes\"              ; +0x38, 0x10020f558\nADRL            X4, aLegacyCompatib; \"Legacy compatibility pre 2.2. Should be\"... ; +0x40, 0x10020f560\nMOV             X0, X19                                                ; +0x48, 0x10020f568\nMOV             W2, #0x11                                              ; +0x4c, 0x10020f56c\nBL              GJOptionsLayer__addToggle                              ; +0x50, 0x10020f570\nLDR             X8, [X19,#0x460]                                       ; +0x54, 0x10020f574\nLDRB            W3, [X8,#0x1CB]                                        ; +0x58, 0x10020f578\nADRL            X1, aAllowStaticRot; \"Allow Static-Rotate\"             ; +0x5c, 0x10020f57c\nADRL            X4, aAllowRotatingS; \"Allow rotating static objects in action\"... ; +0x64, 0x10020f584\nMOV             X0, X19                                                ; +0x6c, 0x10020f58c\nMOV             W2, #0x12                                              ; +0x70, 0x10020f590\nBL              GJOptionsLayer__addToggle                              ; +0x74, 0x10020f594\nLDR             X8, [X19,#0x460]                                       ; +0x78, 0x10020f598\nLDRB            W3, [X8,#0x1C1]                                        ; +0x7c, 0x10020f59c\nADRL            X1, aEnablePlayerSq; \"Enable Player Squeeze\"           ; +0x80, 0x10020f5a0\nADRL            X4, aDestroysPlayer; \"Destroys player when squeezed between t\"... ; +0x88, 0x10020f5a8\nMOV             X0, X19                                                ; +0x90, 0x10020f5b0\nMOV             W2, #9                                                 ; +0x94, 0x10020f5b4\nBL              GJOptionsLayer__addToggle                              ; +0x98, 0x10020f5b8\nLDR             X8, [X19,#0x460]                                       ; +0x9c, 0x10020f5bc\nLDRB            W3, [X8,#0x1C2]                                        ; +0xa0, 0x10020f5c0\nADRL            X1, aFixGravityBug; \"Fix Gravity Bug\"                  ; +0xa4, 0x10020f5c4\nADRL            X4, aFixesAnOldBugT; \"Fixes an old bug that makes flipped gra\"... ; +0xac, 0x10020f5cc\nMOV             X0, X19                                                ; +0xb4, 0x10020f5d4\nMOV             W2, #0xA                                               ; +0xb8, 0x10020f5d8\nBL              GJOptionsLayer__addToggle                              ; +0xbc, 0x10020f5dc\nLDR             X8, [X19,#0x460]                                       ; +0xc0, 0x10020f5e0\nLDRB            W3, [X8,#0x1C3]                                        ; +0xc4, 0x10020f5e4\nADRL            X1, aFixNegativeSca; \"Fix Negative Scale\"              ; +0xc8, 0x10020f5e8\nADRL            X4, aMakesNegativeS; \"Makes negative scaled objects collide c\"... ; +0xd0, 0x10020f5f0\nMOV             X0, X19                                                ; +0xd8, 0x10020f5f8\nMOV             W2, #0xB                                               ; +0xdc, 0x10020f5fc\nBL              GJOptionsLayer__addToggle                              ; +0xe0, 0x10020f600\nLDR             X8, [X19,#0x460]                                       ; +0xe4, 0x10020f604\nLDRB            W3, [X8,#0x1C4]                                        ; +0xe8, 0x10020f608\nADRL            X1, aFixRobotJump; \"Fix Robot Jump\"                    ; +0xec, 0x10020f60c\nADRL            X4, aFixesRobotJump; \"Fixes robot jumps being bugged on slope\"... ; +0xf4, 0x10020f614\nMOV             X0, X19                                                ; +0xfc, 0x10020f61c\nMOV             W2, #0xC                                               ; +0x100, 0x10020f620\nBL              GJOptionsLayer__addToggle                              ; +0x104, 0x10020f624\nLDR             X8, [X19,#0x460]                                       ; +0x108, 0x10020f628\nLDRB            W3, [X8,#0x1C5]                                        ; +0x10c, 0x10020f62c\nADRL            X1, aDynamicLevelHe; \"Dynamic Level Height\"            ; +0x110, 0x10020f630\nADRL            X4, aIncreasesMaxLe; \"Increases max level height dynamically \"... ; +0x118, 0x10020f638\nMOV             X0, X19                                                ; +0x120, 0x10020f640\nMOV             W2, #0xE                                               ; +0x124, 0x10020f644\nBL              GJOptionsLayer__addToggle                              ; +0x128, 0x10020f648\nLDR             X8, [X19,#0x460]                                       ; +0x12c, 0x10020f64c\nLDRB            W3, [X8,#0x1C6]                                        ; +0x130, 0x10020f650\nADRL            X1, aSortGroups; \"Sort Groups\"                         ; +0x134, 0x10020f654\nADRL            X4, aMakesSureThatS; \"Makes sure that spawn groups are trigge\"... ; +0x13c, 0x10020f65c\nMOV             X0, X19                                                ; +0x144, 0x10020f664\nMOV             W2, #0xF                                               ; +0x148, 0x10020f668\nBL              GJOptionsLayer__addToggle                              ; +0x14c, 0x10020f66c\nLDR             X8, [X19,#0x460]                                       ; +0x150, 0x10020f670\nLDRB            W3, [X8,#0x1C7]                                        ; +0x154, 0x10020f674\nADRL            X1, aFixRadiusColli; \"Fix Radius Collision\"            ; +0x158, 0x10020f678\nADRL            X4, aReplacesThePla; \"Replaces the player hitbox with a circl\"... ; +0x160, 0x10020f680\nMOV             X0, X19                                                ; +0x168, 0x10020f688\nMOV             W2, #0x10                                              ; +0x16c, 0x10020f68c\nBL              GJOptionsLayer__addToggle                              ; +0x170, 0x10020f690\nLDR             X8, [X19,#0x460]                                       ; +0x174, 0x10020f694\nLDRB            W3, [X8,#0x1CC]                                        ; +0x178, 0x10020f698\nADRL            X1, aReverseSync; \"Reverse Sync\"                       ; +0x17c, 0x10020f69c\nADRL            X4, aSlowsDownOrSpe; \"Slows down or speeds up the player when\"... ; +0x184, 0x10020f6a4\nMOV             X0, X19                                                ; +0x18c, 0x10020f6ac\nMOV             W2, #0x13                                              ; +0x190, 0x10020f6b0\nBL              GJOptionsLayer__addToggle                              ; +0x194, 0x10020f6b4\nLDR             X8, [X19,#0x460]                                       ; +0x198, 0x10020f6b8\nLDRB            W3, [X8,#0x1CD]                                        ; +0x19c, 0x10020f6bc\nADRL            X1, aDecreaseBoostS; \"Decrease Boost Slide\"            ; +0x1a0, 0x10020f6c0\nADRL            X4, aSlideLessAfter; \"Slide less after dashing or being launc\"... ; +0x1a8, 0x10020f6c8\nMOV             X0, X19                                                ; +0x1b0, 0x10020f6d0\nMOV             W2, #0x16                                              ; +0x1b4, 0x10020f6d4\nBL              GJOptionsLayer__addToggle                              ; +0x1b8, 0x10020f6d8\nLDR             X8, [X19,#0x460]                                       ; +0x1bc, 0x10020f6dc\nLDRB            W8, [X8,#0x1CE]                                        ; +0x1c0, 0x10020f6e0\nTBZ             W8, #0, loc_10020F6F4                                  ; +0x1c4, 0x10020f6e4\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x1c8, 0x10020f6e8\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x1cc, 0x10020f6ec\nRET                                                                    ; +0x1d0, 0x10020f6f0\nADRL            X1, aEnableImpulseF; \"Enable Impulse Fix\"              ; +0x1d4, 0x10020f6f4\nADRL            X4, aFixMovingPlatf; \"Fix moving platform impulse bugs in pla\"... ; +0x1dc, 0x10020f6fc\nMOV             X0, X19                                                ; +0x1e4, 0x10020f704\nMOV             W2, #0x17                                              ; +0x1e8, 0x10020f708\nMOV             W3, #0                                                 ; +0x1ec, 0x10020f70c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x1f0, 0x10020f710\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x1f4, 0x10020f714\nB               GJOptionsLayer__addToggle                              ; +0x1f8, 0x10020f718", "xrefs": ["<???> @ 0x1008f8d08"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}