From 2dd706ca5410d98ad214ceff7026d6db276f4d5a Mon Sep 17 00:00:00 2001 From: melthelesbian <44884535+melthelesbian@users.noreply.github.com> Date: Tue, 25 Dec 2018 12:50:15 -0500 Subject: use max mon moves constant where able (#480) * use max mon moves constant where able * fix errors in script commands file * fix more errors --- src/contest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index 34662b490..c3ce9c9aa 100644 --- a/src/contest.c +++ b/src/contest.c @@ -271,7 +271,7 @@ void LoadContestBgAfterMoveAnim(void) CopyBgTilemapBufferToVram(3); LoadCompressedPalette(gUnknown_08C16E90, 0, 0x200); sub_80D782C(); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u32 var = 5 + i; @@ -747,7 +747,7 @@ void sub_80D8490(u8 taskId) gBattle_BG0_Y = 0xA0; gBattle_BG2_Y = 0xA0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 move = gContestMons[gContestPlayerMonIndex].moves[i]; u8 *r5 = sp8; @@ -782,7 +782,7 @@ void sub_80D8610(u8 taskId) u8 numMoves = 0; s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (gContestMons[gContestPlayerMonIndex].moves[i] != MOVE_NONE) numMoves++; -- cgit v1.2.3 From 7f6f6c33ab9a9a5ab97aff8976ea2cb153106624 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 26 Dec 2018 13:05:02 +0100 Subject: Fix BgAttributes --- src/contest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index c3ce9c9aa..0f29f4ad9 100644 --- a/src/contest.c +++ b/src/contest.c @@ -285,7 +285,7 @@ void sub_80D779C(void) ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, gUnknown_08587F34, ARRAY_COUNT(gUnknown_08587F34)); - SetBgAttribute(3, BG_CTRL_ATTR_PRIORITY, 1); + SetBgAttribute(3, BG_ATTR_WRAPAROUND, 1); for (i = 0; i < 4; i++) { SetBgTilemapBuffer(i, gContestResources->field_24[i]); -- cgit v1.2.3