Conditional Out of Bounds

From Custom Mario Kart
Revision as of 13:30, 24 August 2021 by Krummers (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
LE-CODE Logo (Vertical).png

Currently, there are two different codes available:

Both of these cheat codes are using AREA type 10, and use its parameters in an incompatible way. kHacker35000vr's patch is only active if the "Route" setting of the AREA is not 0, but Riidefi's patch is always active. In order to support both of these codes in a custom track distribution, the patches need to be modified.

Given that track(s) using kHacker35000vr's version are using a route value of 1 (CTR N. Gin Labs v1.4k2), and track(s) using Riidefi's version are using a route value of 0xff (CTR N. Gin Labs v1.4r, WP Tanks! and Block Plaza (Race) (Brawlboxgaming)), the easiest way to do that is to patch kHacker35000vr's version to only run for AREA route 1, and to patch Riidefi's version to only run for AREA route 0xff.

As of LE-CODE build 26, both cheat codes are implemented using the following code:

Assembler code


This makes the distribution compatible with tracks created for either version of the out of bounds patch, and track authors can then freely choose which one to use.