Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef BLITTER_32BPP_ANIM_HPP
00013 #define BLITTER_32BPP_ANIM_HPP
00014
00015 #include "32bpp_optimized.hpp"
00016
00018 class Blitter_32bppAnim FINAL : public Blitter_32bppOptimized {
00019 private:
00020 uint16 *anim_buf;
00021 int anim_buf_width;
00022 int anim_buf_height;
00023 Palette palette;
00024
00025 public:
00026 Blitter_32bppAnim() :
00027 anim_buf(NULL),
00028 anim_buf_width(0),
00029 anim_buf_height(0)
00030 {}
00031
00032 void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
00033 void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
00034 void SetPixel(void *video, int x, int y, uint8 colour);
00035 void DrawRect(void *video, int width, int height, uint8 colour);
00036 void CopyFromBuffer(void *video, const void *src, int width, int height);
00037 void CopyToBuffer(const void *video, void *dst, int width, int height);
00038 void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
00039 int BufferSize(int width, int height);
00040 void PaletteAnimate(const Palette &palette);
00041 Blitter::PaletteAnimation UsePaletteAnimation();
00042
00043 const char *GetName() { return "32bpp-anim"; }
00044 int GetBytesPerPixel() { return 6; }
00045 void PostResize();
00046
00050 inline Colour LookupColourInPalette(uint index)
00051 {
00052 return this->palette.palette[index];
00053 }
00054
00055 template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
00056 };
00057
00059 class FBlitter_32bppAnim: public BlitterFactory<FBlitter_32bppAnim> {
00060 public:
00061 const char *GetName() { return "32bpp-anim"; }
00062 const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; }
00063 Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
00064 };
00065
00066 #endif