diff --git a/data/tilesets/secondary/rustboro/metatiles.bin b/data/tilesets/secondary/rustboro/metatiles.bin index 585e3a6c29..63ecf0306e 100644 Binary files a/data/tilesets/secondary/rustboro/metatiles.bin and b/data/tilesets/secondary/rustboro/metatiles.bin differ diff --git a/data/tilesets/secondary/rustboro/palettes/06.pal b/data/tilesets/secondary/rustboro/palettes/06.pal index 5851fc31aa..e73db0e700 100644 --- a/data/tilesets/secondary/rustboro/palettes/06.pal +++ b/data/tilesets/secondary/rustboro/palettes/06.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 224 120 +224 136 8 255 255 255 -238 238 213 -205 205 164 +216 224 232 +184 200 224 136 144 152 131 131 139 98 98 123 -65 74 106 -41 49 90 +64 72 104 +40 48 88 205 213 230 139 180 213 -205 238 189 -164 205 172 -139 189 139 -123 164 74 -115 197 164 +128 128 136 +216 224 232 +0 0 0 +0 0 0 +248 224 120 diff --git a/data/tilesets/secondary/rustboro/tiles.png b/data/tilesets/secondary/rustboro/tiles.png index 0ae3620c7d..3c71f263bb 100644 Binary files a/data/tilesets/secondary/rustboro/tiles.png and b/data/tilesets/secondary/rustboro/tiles.png differ diff --git a/src/palette.c b/src/palette.c index 593c9bcd45..f433f442b2 100644 --- a/src/palette.c +++ b/src/palette.c @@ -983,24 +983,27 @@ void TimePalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor) { u16 i; s8 r, g, b; struct PlttData *data2 = (struct PlttData *)&blendColor; + struct PlttData *data3; + struct PlttData *blendData; + u16 altBlendIndices = 0; for (i = 0; i < numEntries; i++) { u16 index = i + palOffset; struct PlttData *data1 = (struct PlttData *)&gPlttBufferUnfaded[index]; if (i == 0) { - if (data1->unused_15) { // Use transparency color to blend - data2 = data1; + if (data1->unused_15) { // Color 0 is a bitmask for which colors to blend; color 15 is the alt blend color gPlttBufferFaded[index] = gPlttBufferUnfaded[index]; + altBlendIndices = gPlttBufferUnfaded[index] & 0x7FFF; + data3 = (struct PlttData *)&gPlttBufferUnfaded[index+15]; } - else if (data2->unused_15) // Set transparency/blending color - gPlttBufferUnfaded[index] = gPlttBufferFaded[index] = blendColor; continue; } r = data1->r; g = data1->g; b = data1->b; - gPlttBufferFaded[index] = RGB(r + (((data2->r - r) * coeff) >> 4), - g + (((data2->g - g) * coeff) >> 4), - b + (((data2->b - b) * coeff) >> 4)); + blendData = (altBlendIndices && altBlendIndices & (1 << i)) ? data3 : data2; + gPlttBufferFaded[index] = RGB(r + (((blendData->r - r) * coeff) >> 4), + g + (((blendData->g - g) * coeff) >> 4), + b + (((blendData->b - b) * coeff) >> 4)); } }