summaryrefslogtreecommitdiff
path: root/include/gba/macro.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-23 12:57:46 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-23 12:57:46 -0500
commitfdd7e7cb848747a1e0ace8a63d29aaa22dfd1140 (patch)
tree6ddaed4de52bfcc517d573a8f30c5bd0a1650782 /include/gba/macro.h
parentbb8f652504f886af296ffcaac57bf76cdc893c97 (diff)
parent1c1ce902515ccb3ccecde29611711c9b1a3ce955 (diff)
Merge branch 'master' into cable_car
Diffstat (limited to 'include/gba/macro.h')
-rw-r--r--include/gba/macro.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gba/macro.h b/include/gba/macro.h
index a183a44fc..67d2b3a07 100644
--- a/include/gba/macro.h
+++ b/include/gba/macro.h
@@ -103,6 +103,22 @@
} \
}
+#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 DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16)
#define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32)