shithub: pokecrystal

Download patch

ref: 860585b0af688dc0b6e9655f44b31316dcbabf97
parent: 753ed7186c8346ea49ad1eb347f1194a687d21ad
author: Rangi <[email protected]>
date: Fri Oct 29 13:33:52 EDT 2021

Clarify documentation of maskbits

--- a/macros/code.asm
+++ b/macros/code.asm
@@ -24,8 +24,8 @@
 ENDM
 
 maskbits: MACRO
-; masks just enough bits to cover the first argument
-; the second argument is an optional shift amount
+; masks just enough bits to cover values 0 to \1 - 1
+; \2 is an optional shift amount
 ; e.g. "maskbits 26" becomes "and %00011111" (since 26 - 1 = %00011001)
 ; and "maskbits 3, 2" becomes "and %00001100" (since "maskbits 3" becomes %00000011)
 ; example usage in rejection sampling: