From b4c6e0560a7b1310cc08b93ea04935d4fbb7c3de Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 4 Nov 2017 22:42:28 -0400 Subject: BAD_MEM macros to MEM_ALT --- include/battle.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/battle.h') 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++) \ -- cgit v1.2.3