32bpp_anim.hpp
Go to the documentation of this file.00001
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 void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
00025 void DrawColourMappingRect(void *dst, int width, int height, int pal);
00026 void SetPixel(void *video, int x, int y, uint8 colour);
00027 void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
00028 void DrawRect(void *video, int width, int height, uint8 colour);
00029 void CopyFromBuffer(void *video, const void *src, int width, int height);
00030 void CopyToBuffer(const void *video, void *dst, int width, int height);
00031 void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
00032 int BufferSize(int width, int height);
00033 void PaletteAnimate(uint start, uint count);
00034 Blitter::PaletteAnimation UsePaletteAnimation();
00035
00036 const char *GetName() { return "32bpp-anim"; }
00037 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 const char *GetName() { return "32bpp-anim"; }
00045 const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; }
00046 Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
00047 };
00048
00049 #endif