summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frontier_util.c2
-rw-r--r--src/pokedex.c22
-rw-r--r--src/pokenav_main_menu.c13
3 files changed, 18 insertions, 19 deletions
diff --git a/src/frontier_util.c b/src/frontier_util.c
index 38eaa3713..a36e2ec9f 100644
--- a/src/frontier_util.c
+++ b/src/frontier_util.c
@@ -2513,7 +2513,7 @@ void CreateFrontierBrainPokemon(void)
do
{
j = Random32(); //Should be one while loop, but that doesn't match
- } while (IsShinyOtIdPersonality(FRONTIER_BRAIN_OTID, j)); //See above comment
+ } while (IsShinyOtIdPersonality(FRONTIER_BRAIN_OTID, j));
} while (sFrontierBrainsMons[facility][symbol][i].nature != GetNatureFromPersonality(j));
CreateMon(&gEnemyParty[monPartyId],
sFrontierBrainsMons[facility][symbol][i].species,
diff --git a/src/pokedex.c b/src/pokedex.c
index 6146bcc05..c9fa2f691 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -5238,20 +5238,20 @@ static void Task_ExitSearchWaitForFade(u8 taskId)
void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width)
{
- u16 i, temp; //This would have been better as a pointer but here we are
- u32 ptr = (u32)GetBgTilemapBuffer(3); //this should be a pointer, but this only matches as a u32.
+ u16 i, temp; //This would have been better as a pointer but here we are
+ u32 ptr = (u32)GetBgTilemapBuffer(3); //This should be a pointer, but this only matches as a u32.
for (i = 0; i < width; i++)
{
- temp = *(u16 *)(ptr + (y+0)*64 + (x+i)*2);
- temp &= 0x0fff;
- temp |= (flags << 12);
- *(u16 *)(ptr + (y+0)*64 + (x+i)*2) = temp;
-
- temp = *(u16 *)(ptr + (y+1)*64 + (x+i)*2);
- temp &= 0x0fff;
- temp |= (flags << 12);
- *(u16 *)(ptr + (y+1)*64 + (x+i)*2) = temp;
+ temp = *(u16 *)(ptr + (y + 0) * 64 + (x + i) * 2);
+ temp &= 0x0fff;
+ temp |= (flags << 12);
+ *(u16 *)(ptr + (y + 0) * 64 + (x + i) * 2) = temp;
+
+ temp = *(u16 *)(ptr + (y + 1) * 64 + (x + i) * 2);
+ temp &= 0x0fff;
+ temp |= (flags << 12);
+ *(u16 *)(ptr + (y + 1) * 64 + (x + i) * 2) = temp;
}
}
diff --git a/src/pokenav_main_menu.c b/src/pokenav_main_menu.c
index a2adebc27..cdaa0b3d6 100644
--- a/src/pokenav_main_menu.c
+++ b/src/pokenav_main_menu.c
@@ -486,14 +486,13 @@ void sub_81C79BC(const u16 *a0, const u16 *a1, int a2, int a3, int a4, u16 *pale
int r1, g1, b1;
while (a2--)
{
+ r = GET_R(*a0);
+ g = GET_G(*a0);
+ b = GET_B(*a0);
- r = R(*a0);
- g = G(*a0);
- b = B(*a0);
-
- r1 = ((((R(*a1) << 8) - (r << 8)) / a3) * a4) >> 8;
- g1 = ((((G(*a1) << 8) - (g << 8)) / a3) * a4) >> 8;
- b1 = ((((B(*a1) << 8) - (b << 8)) / a3) * a4) >> 8;
+ r1 = ((((GET_R(*a1) << 8) - (r << 8)) / a3) * a4) >> 8;
+ 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)
g = (g + g1) & 0x1F; //See above