Difference between revisions of "Conditional Out of Bounds"

From Custom Mario Kart
Jump to navigation Jump to search
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[File:lecode-ver-36x160.png|right]]
+
[[File:LE-CODE Logo (Vertical).png|right]]
 
Currently, there are two different codes available:
 
Currently, there are two different codes available:
 
* [[Conditional Out of Bounds (kHacker35000vr)]]
 
* [[Conditional Out of Bounds (kHacker35000vr)]]
 
* [[Conditional Out of Bounds (Riidefi)]]
 
* [[Conditional Out of Bounds (Riidefi)]]
  
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.  
+
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 Wii Tanks]], and [[Block Plaza (Race)]]), 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.  
+
Given that track(s) using kHacker35000vr's version are using a route value of 1 ([[CTR N. Gin Labs|<small>CTR</small> N. Gin Labs]] v1.4k2), and track(s) using Riidefi's version are using a route value of 0xff (<small>CTR</small> N. Gin Labs v1.4r, [[WP Tanks!|<small>WP</small> Tanks!]] and [[Block Plaza (Race) (Block Plaza Edit) (Brawlboxgaming)|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.  
  
In the [[LE-CODE]], which will implement both cheat codes as of version b26, this is done using the following code:  
+
As of [[LE-CODE]] [[LE-CODE#b26|build 26]], both cheat codes are implemented using the following code:
  
 +
<spoiler text="Assembler code">
 
<pre>
 
<pre>
 
/* conditional_oob.S
 
/* conditional_oob.S
Line 15: Line 16:
 
  *  code by Riidefi and kHacker35000vr
 
  *  code by Riidefi and kHacker35000vr
 
  *
 
  *
  *  Allows you to use a conditional Out-of-Bounds.
+
  *  Allows you to use a conditional Out of Bounds.
  
 
  *  Uses "Conditional OOB v2.0" by Riidefi and
 
  *  Uses "Conditional OOB v2.0" by Riidefi and
Line 132: Line 133:
 
     b error
 
     b error
  
</pre>
+
</pre></spoiler>
  
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.  
+
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.  
  
 
{{disambig}}
 
{{disambig}}
[[category:LE-CODE]]
+
[[Category:LE-CODE]]

Latest revision as of 13:30, 24 August 2021

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.