mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Fix issues according to feedback
This commit is contained in:
parent
1cdd0ac199
commit
3a2a2b6ba9
@ -1,9 +1,9 @@
|
||||
#ifndef GUARD_RGB_H
|
||||
#define GUARD_RGB_H
|
||||
|
||||
#define R(color) ((color) & 0x1F)
|
||||
#define G(color) (((color) >> 5) & 0x1F)
|
||||
#define B(color) (((color) >> 10) & 0x1F)
|
||||
#define GET_R(color) ((color) & 0x1F)
|
||||
#define GET_G(color) (((color) >> 5) & 0x1F)
|
||||
#define GET_B(color) (((color) >> 10) & 0x1F)
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user