Skip to content

Commit

Permalink
Merge pull request #2007 from cawtds/ub-fix-battle-transition
Browse files Browse the repository at this point in the history
UB fix in battle_transition.c
  • Loading branch information
mrgriffin authored Aug 21, 2024
2 parents 56d3faa + 5eea3d3 commit ac28fc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/battle_transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,11 @@ static bool8 ClockwiseWipe_TopRight(struct Task *task)
{
sTransitionData->VBlank_DMA = FALSE;

#ifdef UBFIX
InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, 0, 1, 1);
#else
InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, -1, 1, 1);
#endif
do
{
gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX + 1) | ((DISPLAY_WIDTH / 2) << 8);
Expand Down

0 comments on commit ac28fc5

Please sign in to comment.