diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-03-05 16:21:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 16:21:48 -0500 |
commit | 44f47ab524f0b3b7648e5f66dfaf014488fc21e3 (patch) | |
tree | f05b0cdb3e31020ea0d1c9025b922972f8a4eb51 /include/gba/macro.h | |
parent | 3d5d298c63a88c1a581b58d44dcc3706a7799c04 (diff) | |
parent | 2e8d5d6279088ac5a2aad108f9ce895b2619e3bb (diff) |
Merge pull request #288 from PikalaxALT/dodrio_berry_picking
Dodrio Berry Picking
Diffstat (limited to 'include/gba/macro.h')
-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) \ |