richk@6720: /* $Id$ */ richk@6720: richk@6720: /** @file 32bpp_anim.hpp */ richk@6720: richk@6720: #ifndef BLITTER_32BPP_ANIM_HPP richk@6720: #define BLITTER_32BPP_ANIM_HPP richk@6720: rubidium@6870: #include "32bpp_optimized.hpp" richk@6720: #include "factory.hpp" richk@6720: rubidium@6870: class Blitter_32bppAnim : public Blitter_32bppOptimized { richk@6720: private: richk@6720: uint8 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation richk@6720: int anim_buf_width; richk@6720: int anim_buf_height; richk@6720: richk@6720: public: richk@6720: Blitter_32bppAnim() : richk@6720: anim_buf(NULL), richk@6720: anim_buf_width(0), richk@6720: anim_buf_height(0) richk@6720: {} richk@6720: richk@6720: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); richk@6720: /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal); richk@6720: /* virtual */ void SetPixel(void *video, int x, int y, uint8 color); richk@6720: /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); richk@6720: /* virtual */ void DrawRect(void *video, int width, int height, uint8 color); richk@6720: /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); richk@6720: /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); richk@6720: /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y); richk@6720: /* virtual */ int BufferSize(int width, int height); richk@6720: /* virtual */ void PaletteAnimate(uint start, uint count); richk@6720: /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation(); richk@6720: richk@6720: /* virtual */ const char *GetName() { return "32bpp-anim"; } richk@6720: }; richk@6720: richk@6720: class FBlitter_32bppAnim: public BlitterFactory { richk@6720: public: richk@6720: /* virtual */ const char *GetName() { return "32bpp-anim"; } richk@6720: /* virtual */ const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; } richk@6720: /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); } richk@6720: }; richk@6720: richk@6720: #endif /* BLITTER_32BPP_ANIM_HPP */