Fix issues according to feedback
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#ifndef GUARD_RGB_H
|
#ifndef GUARD_RGB_H
|
||||||
#define GUARD_RGB_H
|
#define GUARD_RGB_H
|
||||||
|
|
||||||
#define R(color) ((color) & 0x1F)
|
#define GET_R(color) ((color) & 0x1F)
|
||||||
#define G(color) (((color) >> 5) & 0x1F)
|
#define GET_G(color) (((color) >> 5) & 0x1F)
|
||||||
#define B(color) (((color) >> 10) & 0x1F)
|
#define GET_B(color) (((color) >> 10) & 0x1F)
|
||||||
|
|
||||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||||
|
|||||||
+1
-1
@@ -2513,7 +2513,7 @@ void CreateFrontierBrainPokemon(void)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
j = Random32(); //Should be one while loop, but that doesn't match
|
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));
|
} while (sFrontierBrainsMons[facility][symbol][i].nature != GetNatureFromPersonality(j));
|
||||||
CreateMon(&gEnemyParty[monPartyId],
|
CreateMon(&gEnemyParty[monPartyId],
|
||||||
sFrontierBrainsMons[facility][symbol][i].species,
|
sFrontierBrainsMons[facility][symbol][i].species,
|
||||||
|
|||||||
+11
-11
@@ -5238,20 +5238,20 @@ static void Task_ExitSearchWaitForFade(u8 taskId)
|
|||||||
|
|
||||||
void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width)
|
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
|
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.
|
u32 ptr = (u32)GetBgTilemapBuffer(3); //This should be a pointer, but this only matches as a u32.
|
||||||
|
|
||||||
for (i = 0; i < width; i++)
|
for (i = 0; i < width; i++)
|
||||||
{
|
{
|
||||||
temp = *(u16 *)(ptr + (y+0)*64 + (x+i)*2);
|
temp = *(u16 *)(ptr + (y + 0) * 64 + (x + i) * 2);
|
||||||
temp &= 0x0fff;
|
temp &= 0x0fff;
|
||||||
temp |= (flags << 12);
|
temp |= (flags << 12);
|
||||||
*(u16 *)(ptr + (y+0)*64 + (x+i)*2) = temp;
|
*(u16 *)(ptr + (y + 0) * 64 + (x + i) * 2) = temp;
|
||||||
|
|
||||||
temp = *(u16 *)(ptr + (y+1)*64 + (x+i)*2);
|
temp = *(u16 *)(ptr + (y + 1) * 64 + (x + i) * 2);
|
||||||
temp &= 0x0fff;
|
temp &= 0x0fff;
|
||||||
temp |= (flags << 12);
|
temp |= (flags << 12);
|
||||||
*(u16 *)(ptr + (y+1)*64 + (x+i)*2) = temp;
|
*(u16 *)(ptr + (y + 1) * 64 + (x + i) * 2) = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
int r1, g1, b1;
|
||||||
while (a2--)
|
while (a2--)
|
||||||
{
|
{
|
||||||
|
r = GET_R(*a0);
|
||||||
|
g = GET_G(*a0);
|
||||||
|
b = GET_B(*a0);
|
||||||
|
|
||||||
r = R(*a0);
|
r1 = ((((GET_R(*a1) << 8) - (r << 8)) / a3) * a4) >> 8;
|
||||||
g = G(*a0);
|
g1 = ((((GET_G(*a1) << 8) - (g << 8)) / a3) * a4) >> 8;
|
||||||
b = B(*a0);
|
b1 = ((((GET_B(*a1) << 8) - (b << 8)) / a3) * a4) >> 8;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
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)
|
||||||
g = (g + g1) & 0x1F; //See above
|
g = (g + g1) & 0x1F; //See above
|
||||||
|
|||||||
Reference in New Issue
Block a user