Fixed mirage tower time blending.
This commit is contained in:
parent
7d8e63a44b
commit
c9845c66ee
1 changed files with 10 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "palette.h"
|
||||
#include "palette_util.h"
|
||||
#include "util.h"
|
||||
#include "overworld.h"
|
||||
|
||||
// "RouletteFlash" is more accurately a general flashing/fading util
|
||||
// this file handles fading the palettes for the color/icon selections on the Roulette wheel
|
||||
|
@ -385,7 +386,12 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend)
|
|||
if (--pulseBlendPalette->delayCounter == 0xFF)
|
||||
{
|
||||
pulseBlendPalette->delayCounter = pulseBlendPalette->pulseBlendSettings.delay;
|
||||
BlendPalette(pulseBlendPalette->pulseBlendSettings.paletteOffset, pulseBlendPalette->pulseBlendSettings.numColors, pulseBlendPalette->blendCoeff, pulseBlendPalette->pulseBlendSettings.blendColor);
|
||||
// TODO: Optimize pulse blending
|
||||
CpuFastCopy(gPlttBufferUnfaded + pulseBlendPalette->pulseBlendSettings.paletteOffset, gPlttBufferFaded + pulseBlendPalette->pulseBlendSettings.paletteOffset, 32);
|
||||
UpdatePalettesWithTime(1 << (pulseBlendPalette->pulseBlendSettings.paletteOffset >> 4));
|
||||
// pulseBlendSettings has a numColors field, but it is only ever set to 16 (for mirage tower)
|
||||
// So, it's ok to use the fine blending here which blends the entire palette
|
||||
BlendPalettesFine(1, gPlttBufferFaded + pulseBlendPalette->pulseBlendSettings.paletteOffset, gPlttBufferFaded + pulseBlendPalette->pulseBlendSettings.paletteOffset, pulseBlendPalette->blendCoeff, pulseBlendPalette->pulseBlendSettings.blendColor);
|
||||
switch (pulseBlendPalette->pulseBlendSettings.fadeType)
|
||||
{
|
||||
case 0: // Fade all the way to the max blend amount, then wrap around
|
||||
|
|
Loading…
Reference in a new issue