mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
@@ -168,12 +168,12 @@ void macro_ShiftCurrentArgs(int32_t count)
|
||||
{
|
||||
if (!macroArgs) {
|
||||
error("Cannot shift macro arguments outside of a macro\n");
|
||||
} else if (count < 0) {
|
||||
error("Cannot shift arguments by negative amount %" PRId32 "\n", count);
|
||||
} else if (macroArgs->shift < macroArgs->nbArgs) {
|
||||
macroArgs->shift += count;
|
||||
if (macroArgs->shift > macroArgs->nbArgs)
|
||||
macroArgs->shift = macroArgs->nbArgs;
|
||||
else if (macroArgs->shift < 0)
|
||||
macroArgs->shift = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1487,6 +1487,7 @@ This is the only way of accessing the value of arguments from 10 to 256.
|
||||
.Pp
|
||||
.Ic SHIFT
|
||||
can optionally be given an integer parameter, and will apply the above shifting that number of times.
|
||||
A negative parameter will shift the arguments in reverse.
|
||||
.Ss Printing things during assembly
|
||||
The
|
||||
.Ic PRINT
|
||||
|
||||
Reference in New Issue
Block a user