diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-07-08 16:03:32 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2020-07-08 16:03:32 -0400 |
commit | beeb673ba16e02cacadb2de0ee3608d2106ed14a (patch) | |
tree | 8924e783fc8af67286cf45abcef95c065a3fd223 /src/berry_blender.c | |
parent | 2ed1f7c6f92abe93d86b921709576b82970f0848 (diff) | |
parent | ebade7affb31d5bcdc17cdcd3895758010ee6f66 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald into add-flagvarsave
Diffstat (limited to 'src/berry_blender.c')
-rw-r--r-- | src/berry_blender.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/berry_blender.c b/src/berry_blender.c index 2a122541d..a2a96c089 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1246,7 +1246,7 @@ static void sub_8080018(void) if (++sBerryBlenderData->framesToWait > 20) { ClearDialogWindowAndFrameToTransparent(4, TRUE); - if (GetBlockReceivedStatus() == sub_800A9D8()) + if (GetBlockReceivedStatus() == GetLinkPlayerCountAsBitFlags()) { for (i = 0; i < GetLinkPlayerCount(); i++) { @@ -1500,7 +1500,7 @@ static void sub_80808D4(void) switch (sBerryBlenderData->mainState) { case 0: - sub_800B4C0(); + SetWirelessCommType0(); sub_8080588(); Blender_SetParticipantBerryData(0, gSpecialVar_ItemId); Blender_CopyBerryData(&sBerryBlenderData->blendedBerries[0], gSpecialVar_ItemId); @@ -1664,7 +1664,7 @@ static void sub_80808D4(void) static void sub_8080DF8(void) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < CMD_LENGTH / 2; i++) { gSendCmd[0] = 0; gSendCmd[2] = 0; @@ -2202,6 +2202,11 @@ static s16 sub_8081BD4(void) return sUnknown_03000E06; } +#if MODERN +// TODO remove this as soon as the code below is understood +// add a UBFIX if required (code buggy?) +__attribute__((optimize("no-aggressive-loop-optimizations"))) +#endif static void Blender_CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 playersNo, u8 *flavors, u16 maxRPM) { s32 i, j; |