Simplify division in berry_crush and field weather functions
This commit is contained in:
+1
-6
@@ -277,7 +277,6 @@ static void BuildColorMaps(void)
|
||||
u16 brightnessDelta;
|
||||
u16 colorMapIndex;
|
||||
u16 baseBrightness;
|
||||
u32 remainingBrightness;
|
||||
s16 diff;
|
||||
|
||||
sPaletteColorMapTypes = sBasePaletteColorMapTypes;
|
||||
@@ -305,11 +304,7 @@ static void BuildColorMaps(void)
|
||||
}
|
||||
|
||||
baseBrightness = curBrightness;
|
||||
remainingBrightness = 0x1f00 - curBrightness;
|
||||
if ((0x1f00 - curBrightness) < 0)
|
||||
remainingBrightness += 0xf;
|
||||
|
||||
brightnessDelta = remainingBrightness / (NUM_WEATHER_COLOR_MAPS - 3);
|
||||
brightnessDelta = (0x1f00 - curBrightness) / (NUM_WEATHER_COLOR_MAPS - 3);
|
||||
if (colorVal < 12)
|
||||
{
|
||||
// For shadows (color values < 12), the remaining color mappings are
|
||||
|
||||
Reference in New Issue
Block a user