diff options
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r-- | src/gfx.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp index e90e2babf..5a1f75abc 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -797,7 +797,11 @@ void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSpri _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite); } else if (pal != PAL_NONE) { - _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; + if (HasBit(pal, PALETTE_TEXT_RECOLOUR)) { + SetColourRemap((TextColour)GB(pal, 0, PALETTE_WIDTH)); + } else { + _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; + } GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, pal == PALETTE_CRASH ? BM_CRASH_REMAP : BM_COLOUR_REMAP, sub, real_sprite); } else { GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite); @@ -820,7 +824,11 @@ void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite, zoom); } else if (pal != PAL_NONE) { - _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; + if (HasBit(pal, PALETTE_TEXT_RECOLOUR)) { + SetColourRemap((TextColour)GB(pal, 0, PALETTE_WIDTH)); + } else { + _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1; + } GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, pal == PALETTE_CRASH ? BM_CRASH_REMAP : BM_COLOUR_REMAP, sub, real_sprite, zoom); } else { GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite, zoom); |