# 32bpp_anim.hpp

Go to the documentation of this file.

    00001 /* $Id: 32bpp_anim.hpp 15428 2009-02-09 02:57:15Z rubidium $ */
    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 DrawColourMappingRect(void *dst, int width, int height, int pal);
    00026   /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
    00027   /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
    00028   /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
    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   /* virtual */ int GetBytesPerPixel() { return 5; }
    00038
    00039   template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
    00040 };
    00041
    00042 class FBlitter_32bppAnim: public BlitterFactory<FBlitter_32bppAnim> {
    00043 public:
    00044   /* virtual */ const char *GetName() { return "32bpp-anim"; }
    00045   /* virtual */ const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; }
    00046   /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
    00047 };
    00048
    00049 #endif /* BLITTER_32BPP_ANIM_HPP */