summaryrefslogtreecommitdiff
path: root/src/blitter/32bpp_anim.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blitter/32bpp_anim.hpp')
-rw-r--r--src/blitter/32bpp_anim.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp
index 39a55c514..862a21c5d 100644
--- a/src/blitter/32bpp_anim.hpp
+++ b/src/blitter/32bpp_anim.hpp
@@ -20,6 +20,7 @@ private:
uint8 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
int anim_buf_width; ///< The width of the animation buffer.
int anim_buf_height; ///< The height of the animation buffer.
+ Palette palette; ///< The current palette.
public:
Blitter_32bppAnim() :
@@ -36,13 +37,21 @@ public:
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
/* virtual */ int BufferSize(int width, int height);
- /* virtual */ void PaletteAnimate(uint start, uint count);
+ /* virtual */ void PaletteAnimate(const Palette &palette);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ const char *GetName() { return "32bpp-anim"; }
/* virtual */ int GetBytesPerPixel() { return 5; }
/* virtual */ void PostResize();
+ /**
+ * Look up the colour in the current palette.
+ */
+ inline uint32 LookupColourInPalette(uint index)
+ {
+ return this->palette.palette[index].data;
+ }
+
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
};