summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_message.c1
-rw-r--r--src/battle_pike.c2
-rw-r--r--src/battle_util.c1
-rw-r--r--src/berry.c1
-rw-r--r--src/berry_blender.c1
-rw-r--r--src/berry_tag_screen.c1
-rw-r--r--src/field_effect.c4
-rw-r--r--src/field_weather.c8
-rw-r--r--src/menu_specialized.c1
-rw-r--r--src/pokeblock.c1
-rw-r--r--src/util.c7
11 files changed, 11 insertions, 17 deletions
diff --git a/src/battle_message.c b/src/battle_message.c
index 3920f94cf..46444a8fa 100644
--- a/src/battle_message.c
+++ b/src/battle_message.c
@@ -21,7 +21,6 @@
#include "window.h"
#include "constants/battle_dome.h"
#include "constants/battle_string_ids.h"
-#include "constants/berry.h"
#include "constants/frontier_util.h"
#include "constants/items.h"
#include "constants/moves.h"
diff --git a/src/battle_pike.c b/src/battle_pike.c
index a161b88b8..ed18b2f71 100644
--- a/src/battle_pike.c
+++ b/src/battle_pike.c
@@ -1326,7 +1326,7 @@ bool8 InBattlePike(void)
return gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM
|| gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
|| gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS
- || gMapHeader.mapLayoutId == LAYOUT_UNKNOWN_084693AC;
+ || gMapHeader.mapLayoutId == LAYOUT_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_UNUSED;
}
static void SetHintedRoom(void)
diff --git a/src/battle_util.c b/src/battle_util.c
index b7919f904..210e418c6 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -29,7 +29,6 @@
#include "constants/battle_move_effects.h"
#include "constants/battle_script_commands.h"
#include "constants/battle_string_ids.h"
-#include "constants/berry.h"
#include "constants/hold_effects.h"
#include "constants/items.h"
#include "constants/moves.h"
diff --git a/src/berry.c b/src/berry.c
index 022fdc934..ea62deabf 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -11,7 +11,6 @@
#include "random.h"
#include "string_util.h"
#include "text.h"
-#include "constants/berry.h"
#include "constants/event_object_movement.h"
#include "constants/items.h"
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 08a25c58a..252407562 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -34,7 +34,6 @@
#include "new_game.h"
#include "save.h"
#include "strings.h"
-#include "constants/berry.h"
#include "constants/game_stat.h"
#include "constants/items.h"
#include "constants/rgb.h"
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 089228b17..5be149b0f 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -26,7 +26,6 @@
#include "item_menu_icons.h"
#include "decompress.h"
#include "international_string_util.h"
-#include "constants/berry.h"
#include "constants/items.h"
#include "constants/rgb.h"
#include "constants/songs.h"
diff --git a/src/field_effect.c b/src/field_effect.c
index b1837c514..467a0f656 100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -967,8 +967,8 @@ void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b)
curBlue -= ((curBlue * b) >> 4);
color = curRed;
- color |= curGreen << 5;
- color |= curBlue << 10;
+ color |= (curGreen << 5);
+ color |= (curBlue << 10);
gPlttBufferFaded[i] = color;
}
diff --git a/src/field_weather.c b/src/field_weather.c
index 25ee0582a..02e3a0cb0 100644
--- a/src/field_weather.c
+++ b/src/field_weather.c
@@ -494,7 +494,7 @@ static void ApplyGammaShift(u8 startPalIndex, u8 numPalettes, s8 gammaIndex)
r = gammaTable[baseColor.r];
g = gammaTable[baseColor.g];
b = gammaTable[baseColor.b];
- gPlttBufferFaded[palOffset++] = (b << 10) | (g << 5) | r;
+ gPlttBufferFaded[palOffset++] = RGB2(r, g, b);
}
}
@@ -579,7 +579,7 @@ static void ApplyGammaShiftWithBlend(u8 startPalIndex, u8 numPalettes, s8 gammaI
r += ((rBlend - r) * blendCoeff) >> 4;
g += ((gBlend - g) * blendCoeff) >> 4;
b += ((bBlend - b) * blendCoeff) >> 4;
- gPlttBufferFaded[palOffset++] = (b << 10) | (g << 5) | r;
+ gPlttBufferFaded[palOffset++] = RGB2(r, g, b);
}
}
@@ -636,7 +636,7 @@ static void ApplyDroughtGammaShiftWithBlend(s8 gammaIndex, u8 blendCoeff, u16 bl
g2 += ((gBlend - g2) * blendCoeff) >> 4;
b2 += ((bBlend - b2) * blendCoeff) >> 4;
- gPlttBufferFaded[palOffset++] = (b2 << 10) | (g2 << 5) | r2;
+ gPlttBufferFaded[palOffset++] = RGB2(r2, g2, b2);
}
}
}
@@ -678,7 +678,7 @@ static void ApplyFogBlend(u8 blendCoeff, u16 blendColor)
g += ((gBlend - g) * blendCoeff) >> 4;
b += ((bBlend - b) * blendCoeff) >> 4;
- gPlttBufferFaded[palOffset] = (b << 10) | (g << 5) | r;
+ gPlttBufferFaded[palOffset] = RGB2(r, g, b);
palOffset++;
}
}
diff --git a/src/menu_specialized.c b/src/menu_specialized.c
index 7de963893..74e3455c3 100644
--- a/src/menu_specialized.c
+++ b/src/menu_specialized.c
@@ -23,7 +23,6 @@
#include "text_window.h"
#include "trig.h"
#include "window.h"
-#include "constants/berry.h"
#include "constants/songs.h"
#include "gba/io_reg.h"
diff --git a/src/pokeblock.c b/src/pokeblock.c
index 0bfb10632..4485fe1ef 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -29,7 +29,6 @@
#include "task.h"
#include "text.h"
#include "text_window.h"
-#include "constants/berry.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/rgb.h"
diff --git a/src/util.c b/src/util.c
index 8aa54857a..a4e3fa4cf 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2,6 +2,7 @@
#include "util.h"
#include "sprite.h"
#include "palette.h"
+#include "constants/rgb.h"
const u32 gBitTable[] =
{
@@ -271,8 +272,8 @@ void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor)
s8 g = data1->g;
s8 b = data1->b;
struct PlttData *data2 = (struct PlttData *)&blendColor;
- gPlttBufferFaded[index] = ((r + (((data2->r - r) * coeff) >> 4)) << 0)
- | ((g + (((data2->g - g) * coeff) >> 4)) << 5)
- | ((b + (((data2->b - b) * coeff) >> 4)) << 10);
+ gPlttBufferFaded[index] = RGB(r + (((data2->r - r) * coeff) >> 4),
+ g + (((data2->g - g) * coeff) >> 4),
+ b + (((data2->b - b) * coeff) >> 4));
}
}