summaryrefslogtreecommitdiff
path: root/src/contest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/contest.c')
-rw-r--r--src/contest.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/contest.c b/src/contest.c
index 76e13781c..0c3a041b0 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -193,19 +193,6 @@ EWRAM_DATA struct ContestWinner gUnknown_02039F3C = {0};
u32 gContestRngValue;
-extern u16 gBattle_BG0_X;
-extern u16 gBattle_BG0_Y;
-extern u16 gBattle_BG1_X;
-extern s16 gBattle_BG1_Y;
-extern u16 gBattle_BG2_X;
-extern u16 gBattle_BG2_Y;
-extern u16 gBattle_BG3_X;
-extern u16 gBattle_BG3_Y;
-extern u16 gBattle_WIN0H;
-extern u16 gBattle_WIN0V;
-extern u16 gBattle_WIN1H;
-extern u16 gBattle_WIN1V;
-
extern const u16 gUnknown_08587C30[];
extern const struct BgTemplate gUnknown_08587F34[4];
extern const struct WindowTemplate gUnknown_08587F44[];
@@ -638,7 +625,8 @@ void sub_80D8108(u8 taskId)
gTasks[taskId].data[0]++;
break;
case 1:
- if ((gBattle_BG1_Y += 7) <= 160)
+ (s16)gBattle_BG1_Y += 7;
+ if ((s16)gBattle_BG1_Y <= 160)
break;
gTasks[taskId].data[0]++;
break;
@@ -1915,9 +1903,9 @@ void sub_80DA6B4(u8 taskId)
void sub_80DA700(u8 taskId)
{
gBattle_BG1_Y -= 7;
- if (gBattle_BG1_Y < 0)
+ if ((s16)gBattle_BG1_Y < 0)
gBattle_BG1_Y = 0;
- if (*(u16 *)&gBattle_BG1_Y == 0) // Why cast?
+ if (gBattle_BG1_Y == 0) // Why cast?
{
gTasks[taskId].func = sub_80DA740;
gTasks[taskId].data[0] = 0;