# 32bpp_anim.hpp

Go to the documentation of this file.

    00001 /* $Id: 32bpp_anim.hpp 11078 2007-09-09 23:16:01Z truelight $ */
    00002
    00005 #ifndef BLITTER_32BPP_ANIM_HPP
    00006 #define BLITTER_32BPP_ANIM_HPP
    00007
    00008 #include "32bpp_optimized.hpp"
    00009 #include "factory.hpp"
    00010
    00011 class Blitter_32bppAnim : public Blitter_32bppOptimized {
    00012 private:
    00013   uint8 *anim_buf;
    00014   int anim_buf_width;
    00015   int anim_buf_height;
    00016
    00017 public:
    00018   Blitter_32bppAnim() :
    00019     anim_buf(NULL),
    00020     anim_buf_width(0),
    00021     anim_buf_height(0)
    00022   {}
    00023
    00024   /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
    00025   /* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal);
    00026   /* virtual */ void SetPixel(void *video, int x, int y, uint8 color);
    00027   /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color);
    00028   /* virtual */ void DrawRect(void *video, int width, int height, uint8 color);
    00029   /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
    00030   /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
    00031   /* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
    00032   /* virtual */ int BufferSize(int width, int height);
    00033   /* virtual */ void PaletteAnimate(uint start, uint count);
    00034   /* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
    00035
    00036   /* virtual */ const char *GetName() { return "32bpp-anim"; }
    00037 };
    00038
    00039 class FBlitter_32bppAnim: public BlitterFactory<FBlitter_32bppAnim> {
    00040 public:
    00041   /* virtual */ const char *GetName() { return "32bpp-anim"; }
    00042   /* virtual */ const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; }
    00043   /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
    00044 };
    00045
    00046 #endif /* BLITTER_32BPP_ANIM_HPP */