Merge pull request #2007 from cawtds/ub-fix-battle-transition

UB fix in battle_transition.c
This commit is contained in:
Martin Griffin 2024-08-21 19:08:07 +01:00 committed by GitHub
commit ac28fc52e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1907,7 +1907,11 @@ static bool8 ClockwiseWipe_TopRight(struct Task *task)
{ {
sTransitionData->VBlank_DMA = FALSE; 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); InitBlackWipe(sTransitionData->data, DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sTransitionData->tWipeEndX, -1, 1, 1);
#endif
do do
{ {
gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX + 1) | ((DISPLAY_WIDTH / 2) << 8); gScanlineEffectRegBuffers[0][sTransitionData->tWipeCurrY] = (sTransitionData->tWipeCurrX + 1) | ((DISPLAY_WIDTH / 2) << 8);