diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-03-05 13:58:14 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-03-05 13:58:14 -0500 |
commit | b56c2b75b4be20c37e0863a10a3e21c58976f8e2 (patch) | |
tree | 3822ca802fac9529746ca72454f23b60bebca5e6 /include | |
parent | cb99443c51d6263425fb4d853177efc07aee5fb9 (diff) |
Finish dodrio_berry_picking_2.c
Diffstat (limited to 'include')
-rw-r--r-- | include/gba/macro.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/gba/macro.h b/include/gba/macro.h index a3e870210..6cf2e1651 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -105,20 +105,21 @@ } \ } -#define DmaClearLarge(dmaNum, dest, size, block, bit) \ -{ \ - u32 _size = size; \ - while (1) \ - { \ - DmaFill##bit(dmaNum, 0, dest, (block)); \ - dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaFill##bit(dmaNum, 0, dest, _size); \ - break; \ - } \ - } \ +#define DmaClearLarge(dmaNum, dest, size, block, bit) \ +{ \ + void *_dest = dest; \ + u32 _size = size; \ + while (1) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, (block)); \ + _dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, _size); \ + break; \ + } \ + } \ } #define DmaFillLarge(dmaNum, value, dest, size, block, bit) \ |