diff options
author | huderlem <huderlem@gmail.com> | 2019-04-08 17:30:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-08 17:30:28 -0500 |
commit | ce93d3ab9ac460ba771863df60e36be8497b7c78 (patch) | |
tree | c0b78fe2cd3bd406c16d244dd257ccd5d751f9ef /src/script_pokemon_util_80F87D8.c | |
parent | c8ce1a0a1f533a265d5134660c31b1ec6e8b86e0 (diff) | |
parent | 50350cc2e1c26082f9d852e97e1698f7254d4145 (diff) |
Merge pull request #661 from Phlosioneer/contest-ai-cleanup
contest & contest_ai cleanup
Diffstat (limited to 'src/script_pokemon_util_80F87D8.c')
-rwxr-xr-x | src/script_pokemon_util_80F87D8.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c index 2f32951ed..2c7a9c775 100755 --- a/src/script_pokemon_util_80F87D8.c +++ b/src/script_pokemon_util_80F87D8.c @@ -227,7 +227,7 @@ void sub_80F8AFC(void) { int i; - if (gIsLinkContest & 1) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { for (i = 0; i < gNumLinkContestPlayers; i++) { @@ -256,7 +256,7 @@ void sub_80F8B94(void) struct Sprite *sprite; gReservedSpritePaletteCount = 12; - if (gIsLinkContest & 1) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { for (i = 0; i < gNumLinkContestPlayers; i++) { @@ -339,9 +339,9 @@ void ShowContestEntryMonPic(void) gMultiuseSpriteTemplate.paletteTag = palette->tag; spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0); - if (gIsLinkContest & 1) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { - if (!(gIsLinkContest & 4)) + if (!(gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER)) DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0); } else @@ -403,7 +403,7 @@ static void sub_80F8EE8(u8 taskId) void ScriptGetMultiplayerId(void) { - if ((gIsLinkContest & 1) && gNumLinkContestPlayers == 4 && !(gIsLinkContest & 2)) + if ((gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) && gNumLinkContestPlayers == 4 && !(gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)) gSpecialVar_Result = GetMultiplayerId(); else gSpecialVar_Result = 4; @@ -414,7 +414,7 @@ void ScriptRandom(void) u16 random; u16 *scriptPtr; - if (gIsLinkContest & 1) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { gContestRngValue = 1103515245 * gContestRngValue + 24691; random = gContestRngValue >> 16; @@ -436,7 +436,7 @@ u16 sub_80F903C(void) u8 sub_80F905C(void) { - if (gIsLinkContest & 2) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS) { CreateTask(sub_80F9088, 5); return 1; @@ -473,11 +473,11 @@ static void sub_80F9088(u8 taskId) void sub_80F90DC(void) { - if (gIsLinkContest & 2) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS) { if (gReceivedRemoteLinkPlayers) { - sub_800E0E8(); + LoadWirelessStatusIndicatorSpriteGfx(); CreateWirelessStatusIndicatorSprite(8, 8); } } @@ -485,7 +485,7 @@ void sub_80F90DC(void) void sub_80F910C(void) { - if (gIsLinkContest & 2) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS) { if (gReceivedRemoteLinkPlayers) DestroyWirelessStatusIndicatorSprite(); @@ -494,7 +494,7 @@ void sub_80F910C(void) u8 sub_80F9134(void) { - if (gIsLinkContest & 4) + if (gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER) return 1; else return 0; @@ -502,12 +502,12 @@ u8 sub_80F9134(void) void sub_80F9154(void) { - gIsLinkContest = 0; + gLinkContestFlags = 0; } u8 sub_80F9160(void) { - if (gIsLinkContest & 2) + if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS) return 1; else return 0; |