mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
better matching approach than upstream
This commit is contained in:
parent
61b7b45084
commit
afdcb69bf4
@ -3869,14 +3869,17 @@ static void HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused)
|
|||||||
for (i = 0; i < SCREEN_COUNT; i++)
|
for (i = 0; i < SCREEN_COUNT; i++)
|
||||||
{
|
{
|
||||||
u8 row = (i * 7) + 1;
|
u8 row = (i * 7) + 1;
|
||||||
u16 newPalette = 0x4000;
|
u16 newPalette;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
newPalette = 0x4000;
|
||||||
if (i == selectedScreen)
|
if (i == selectedScreen)
|
||||||
do newPalette = 0x2000; while (0);
|
newPalette = 0x2000;
|
||||||
|
} while (0);
|
||||||
|
|
||||||
for (j = 0; j < 7; j++)
|
for (j = 0; j < 7; j++)
|
||||||
{
|
{
|
||||||
j++;j--;
|
|
||||||
ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette;
|
ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette;
|
||||||
ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette;
|
ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette;
|
||||||
}
|
}
|
||||||
@ -3905,7 +3908,6 @@ static void HighlightSubmenuScreenSelectBarItem(u8 a, u16 b)
|
|||||||
|
|
||||||
for (j = 0; j < 7; j++)
|
for (j = 0; j < 7; j++)
|
||||||
{
|
{
|
||||||
j++;j--;
|
|
||||||
ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette;
|
ptr[row + j] = (ptr[row + j] % 0x1000) | newPalette;
|
||||||
ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette;
|
ptr[row + j + 0x20] = (ptr[row + j + 0x20] % 0x1000) | newPalette;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user