summaryrefslogtreecommitdiff
path: root/include/battle.h
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-04 22:42:28 -0400
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-04 22:42:28 -0400
commitb4c6e0560a7b1310cc08b93ea04935d4fbb7c3de (patch)
tree8f4bded9d721a993674a4e5d9eeb57ad86580d39 /include/battle.h
parenteb802f60a26d72e23c5e381bc06de2a7f3bfc7c0 (diff)
BAD_MEM macros to MEM_ALT
Diffstat (limited to 'include/battle.h')
-rw-r--r--include/battle.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/battle.h b/include/battle.h
index 9adcaaf95..dc9ac93cc 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -694,15 +694,18 @@ extern u8 ewram[];
// functions that invoke this macro will not match without this egregeous
// assumption about the variable names, so in order to avoid this assumption,
// we opt to pass the variables themselves, even though it is likely that
-// Sogabe assumed the variables were named src and dest.
-#define BAD_MEMSET(data, c, size, var, dest) \
+// Sogabe assumed the variables were named src and dest. Trust me: I tried to
+// avoid assuming variable names, but the ROM just will not match without the
+// assumptions. Therefore, these macros are bad practice, but I'm putting them
+// here anyway.
+#define MEMSET_ALT(data, c, size, var, dest) \
{ \
dest = (u8 *)data; \
for(var = 0; var < (u32)size; var++) \
dest[var] = c; \
} \
-#define BAD_MEMCPY(data, dest, size, var, src) \
+#define MEMCPY_ALT(data, dest, size, var, src) \
{ \
src = (u8 *)data; \
for(var = 0; var < (u32)size; var++) \