Use PokeNav macros

This commit is contained in:
PokeCodec 2020-09-03 11:52:17 -04:00
parent ae9a60eb2a
commit 3746efb9c2
2 changed files with 11 additions and 10 deletions

View file

@ -436,9 +436,10 @@ static u32 LoopedTask_ScrollMenuHeaderUp(s32 a0)
if (ChangeBgY(0, 384, 2) <= 0)
{
ChangeBgY(0, 0, 0);
return 4;
return LT_FINISH;
}
return 2;
return LT_PAUSE;
}
void CopyPaletteIntoBufferUnfaded(const u16 *palette, u32 bufferOffset, u32 size)
@ -494,7 +495,7 @@ void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *pale
g1 = ((((GET_G(*a1) << 8) - (g << 8)) / a3) * a4) >> 8;
b1 = ((((GET_B(*a1) << 8) - (b << 8)) / a3) * a4) >> 8;
r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of (r + r1 & 0x1F)
r = (r + r1) & 0x1F; //_RGB(r + r1, g + g1, b + b1); doesn't match; I have to assign the value of ((r + r1) & 0x1F) to r1
g = (g + g1) & 0x1F; //See above
b = (b + b1) & 0x1F; //See above

View file

@ -195,19 +195,19 @@ u32 sub_81D04C4(struct PokenavSub13 *structPtr)
sub_81D0814(structPtr);
return 1;
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN && structPtr->field_8->unk2 < structPtr->field_8->unk0 - 1)
if (gMain.newAndRepeatedKeys & DPAD_DOWN && structPtr->field_8->unk2 < structPtr->field_8->unk0 - 1)
{
structPtr->field_8->unk2++;
structPtr->field_C = 0;
sub_81D0814(structPtr);
return 1;
}
else if (gMain.newKeys & A_BUTTON)
if (gMain.newKeys & A_BUTTON)
{
structPtr->field_98 = sub_81D0548;
return 2;
}
else if (gMain.newKeys & B_BUTTON)
if (gMain.newKeys & B_BUTTON)
{
structPtr->field_98 = sub_81D05D4;
return 5;
@ -219,13 +219,13 @@ u32 sub_81D0548(struct PokenavSub13 *structPtr)
{
if (gMain.newAndRepeatedKeys & DPAD_UP && sub_81D05DC(structPtr))
return 3;
else if (gMain.newAndRepeatedKeys & DPAD_DOWN && sub_81D061C(structPtr))
if (gMain.newAndRepeatedKeys & DPAD_DOWN && sub_81D061C(structPtr))
return 3;
else if (gMain.newAndRepeatedKeys & DPAD_LEFT && sub_81D0664(structPtr))
if (gMain.newAndRepeatedKeys & DPAD_LEFT && sub_81D0664(structPtr))
return 3;
else if (gMain.newAndRepeatedKeys & DPAD_RIGHT && sub_81D0688(structPtr))
if (gMain.newAndRepeatedKeys & DPAD_RIGHT && sub_81D0688(structPtr))
return 3;
else if (gMain.newKeys & B_BUTTON)
if (gMain.newKeys & B_BUTTON)
{
structPtr->field_98 = sub_81D04C4;
return 4;