summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-03 02:43:41 -0400
committerProjectRevoTPP <projectrevotpp@hotmail.com>2017-11-03 02:43:41 -0400
commit2f99edc6fd21d0af1bb05fae55302a46c744ffa6 (patch)
tree029550da939f992a73e3ff5e9f0d7c5baa1850f2 /include
parent1966f65696215a09066f6da70920703d6f3fd870 (diff)
NotInBattle
Diffstat (limited to 'include')
-rw-r--r--include/battle.h17
-rw-r--r--include/battle_anim.h3
2 files changed, 10 insertions, 10 deletions
diff --git a/include/battle.h b/include/battle.h
index 2b268c3c8..95dba4897 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -692,20 +692,21 @@ extern u8 ewram[];
// The compiler wont allow us to locally declare ptr in this macro; some
// functions that invoke this macro will not match without this egregeous
-// assumption about the variable names.
-#define BAD_MEMSET(data, c, size, var, ptr) \
+// 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) \
{ \
- ptr = (u8 *)data; \
+ dest = (u8 *)data; \
for(var = 0; var < (u32)size; var++) \
- ptr[var] = c; \
+ dest[var] = c; \
} \
-// TODO: Try to combine these macros.
-#define BAD_MEMSET_REVERSE(data, ptr2, size, var, ptr) \
+#define BAD_MEMCPY(data, dest, size, var, src) \
{ \
- ptr = (u8 *)data; \
+ src = (u8 *)data; \
for(var = 0; var < (u32)size; var++) \
- ptr2[var] = ptr[var]; \
+ dest[var] = src[var]; \
} \
typedef void (*BattleCmdFunc)(void);
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 2386c515c..a9405068d 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -55,13 +55,12 @@ struct UnknownStruct3
void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c);
bool8 IsAnimBankSpriteVisible(u8 a);
void sub_8076034(u8, u8);
-bool8 IsContest(void);
+bool8 NotInBattle(void);
void battle_anim_clear_some_data(void);
void move_anim_8072740(struct Sprite *sprite);
void DestroyAnimVisualTask(u8 task);
void DestroyAnimVisualTask(u8 task);
bool8 IsAnimBankSpriteVisible(u8);
-u8 IsContest();
#endif