Incorporated upstream fixes

This commit is contained in:
Eduardo Quezada 2023-10-02 17:20:17 -03:00
parent a6940c9e03
commit 4febd2cf55
5 changed files with 8 additions and 13 deletions

View file

@ -624,7 +624,7 @@ static void CreateApprenticeMenu(u8 menu)
left = 0;
top = 0;
#ifdef UBFIX
//return; TodoFix
return;
#endif
break;
}

View file

@ -70,7 +70,7 @@ void AnimTask_BlendBattleAnimPalExclude(u8 taskId)
// fall through
case ANIM_ATTACKER:
#ifdef UBFIX
//default: TodoFix
default:
#endif
animBattlers[0] = gBattleAnimAttacker;
break;

View file

@ -1843,11 +1843,8 @@ static void FillFactoryFrontierTrainerParty(u16 trainerId, u8 firstMonId)
{
// By mistake Battle Tower's Level 50 challenge number is used to determine the IVs for Battle Factory.
#ifdef BUGFIX
//TodoFix
u8 UNUSED lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
//u8 lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
//u8 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
u8 challengeNum = gSaveBlock2Ptr->frontier.factoryWinStreaks[battleMode][lvlMode] / FRONTIER_STAGES_PER_CHALLENGE;
#else
u8 UNUSED lvlMode = gSaveBlock2Ptr->frontier.lvlMode;

View file

@ -3864,7 +3864,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
case 0:
case 3:
#ifdef UBFIX
//default: TodoFix
default:
#endif
txtColor[0] = TEXT_COLOR_WHITE;
txtColor[1] = TEXT_COLOR_DARK_GRAY;

View file

@ -1401,8 +1401,7 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
u8 bm_slot_id, sendSlotFlag;
u8 frameSize;
#ifdef UBFIX
u8 *llFrameSize_p;
//u8 *llFrameSize_p = NULL; TodoFix
u8 *llFrameSize_p = NULL;
#else
u8 *llFrameSize_p;
#endif
@ -1432,8 +1431,7 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
llFrameSize_p = &gRfuLinkStatus->remainLLFrameSizeChild[bm_slot_id];
frameSize = llsf_struct[gRfuLinkStatus->parentChild].frameSize;
#ifdef UBFIX
if (subFrameSize > *llFrameSize_p || subFrameSize <= frameSize)
//if ((llFrameSize_p && subFrameSize > *llFrameSize_p) || subFrameSize <= frameSize) TodoFix
if ((llFrameSize_p && subFrameSize > *llFrameSize_p) || subFrameSize <= frameSize)
#else
if (subFrameSize > *llFrameSize_p || subFrameSize <= frameSize)
#endif
@ -1475,7 +1473,7 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
}
gRfuLinkStatus->sendSlotNIFlag |= bmSendSlot;
#ifdef UBFIX
//if (llFrameSize_p) TodoFix
if (llFrameSize_p)
#endif
*llFrameSize_p -= subFrameSize;
slotStatus_NI->send.state = SLOT_STATE_SEND_START;
@ -1487,7 +1485,7 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize,
slotStatus_UNI->send.src = src;
slotStatus_UNI->send.payloadSize = subFrameSize - frameSize;
#ifdef UBFIX
//if (llFrameSize_p) TodoFix
if (llFrameSize_p)
#endif
*llFrameSize_p -= subFrameSize;
slotStatus_UNI->send.state = SLOT_STATE_SEND_UNI;