{"type": "func", "start": 4656004, "end": 4656060, "name": "GJBaseGameLayer::maxZOrderForShaderZ", "pseudocode": "// \n// GJBaseGameLayer::maxZOrderForShaderZ from 0x470b84 to 0x470bbc (56 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x47282c\n// > GJBaseGameLayer::triggerGradientCommand @ 0x47ca38\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\nint GJBaseGameLayer::maxZOrderForShaderZ(GJBaseGameLayer *a1, int a2)\n{\n  int result; // r0\n\n  switch ( a2 )\n  {\n    case 1:\n    case 2:\n      result = -1600;\n      break;\n    case 3:\n    case 4:\n    case 5:\n    case 6:\n    case 7:\n    case 9:\n    case 10:\n    case 11:\n    case 12:\n    case 13:\n    case 14:\n      result = GJBaseGameLayer::minZOrderForShaderZ(a1, a2 + 1) - 1;\n      break;\n    case 8:\n      result = (int)off_3C + 1;\n      break;\n    case 15:\n      result = 1400;\n      break;\n    default:\n      result = 0;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::maxZOrderForShaderZ from 0x470b84 to 0x470bbc (56 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x47282c\n; > GJBaseGameLayer::triggerGradientCommand @ 0x47ca38\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            {R3,LR}                                                ; +0x0, 0x470b84\nSUBS            R3, R1, #1; switch 15 cases                            ; +0x2, 0x470b86\nCMP             R3, #0xE                                               ; +0x4, 0x470b88\nBHI             def_470B8C; jumptable 00470B8C default case            ; +0x6, 0x470b8a\nTBB.W           [PC,R3]; switch jump                                   ; +0x8, 0x470b8c\nDCB 0x14; jump table for switch statement                              ; +0xc, 0x470b90\nDCB 0x14                                                               ; +0xd, 0x470b91\nDCB 0xA                                                                ; +0xe, 0x470b92\nDCB 0xA                                                                ; +0xf, 0x470b93\nDCB 0xA                                                                ; +0x10, 0x470b94\nDCB 0xA                                                                ; +0x11, 0x470b95\nDCB 0xA                                                                ; +0x12, 0x470b96\nDCB 8                                                                  ; +0x13, 0x470b97\nDCB 0xA                                                                ; +0x14, 0x470b98\nDCB 0xA                                                                ; +0x15, 0x470b99\nDCB 0xA                                                                ; +0x16, 0x470b9a\nDCB 0xA                                                                ; +0x17, 0x470b9b\nDCB 0xA                                                                ; +0x18, 0x470b9c\nDCB 0xA                                                                ; +0x19, 0x470b9d\nDCB 0xF                                                                ; +0x1a, 0x470b9e\nALIGN 2                                                                ; +0x1b, 0x470b9f\nMOVS            R0, #(off_3C+1); jumptable 00470B8C case 8             ; +0x1c, 0x470ba0\nPOP             {R3,PC}                                                ; +0x1e, 0x470ba2\nADDS            R1, #1; jumptable 00470B8C cases 3-7,9-14              ; +0x20, 0x470ba4\nBL              _ZN15GJBaseGameLayer19minZOrderForShaderZEi; GJBaseGameLayer::minZOrderForShaderZ(int) ; +0x22, 0x470ba6\nSUBS            R0, #1                                                 ; +0x26, 0x470baa\nPOP             {R3,PC}                                                ; +0x28, 0x470bac\nMOV.W           R0, #0x578; jumptable 00470B8C case 15                 ; +0x2a, 0x470bae\nPOP             {R3,PC}                                                ; +0x2e, 0x470bb2\nMOVS            R0, #0; jumptable 00470B8C default case                ; +0x30, 0x470bb4\nPOP             {R3,PC}                                                ; +0x32, 0x470bb6\nLDR             R0, =0xFFFFF9C0; jumptable 00470B8C cases 1,2          ; +0x34, 0x470bb8\nPOP             {R3,PC}                                                ; +0x36, 0x470bba", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x47282c", "GJBaseGameLayer::triggerGradientCommand @ 0x47ca38"], "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"}