null.hpp
Go to the documentation of this file.00001
00002
00005 #ifndef BLITTER_NULL_HPP
00006 #define BLITTER_NULL_HPP
00007
00008 #include "base.hpp"
00009 #include "factory.hpp"
00010
00011 class Blitter_Null : public Blitter {
00012 public:
00013 uint8 GetScreenDepth() { return 0; }
00014 void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
00015 void DrawColorMappingRect(void *dst, int width, int height, int pal) {};
00016 Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
00017 void *MoveTo(const void *video, int x, int y) { return NULL; };
00018 void SetPixel(void *video, int x, int y, uint8 color) {};
00019 void SetPixelIfEmpty(void *video, int x, int y, uint8 color) {};
00020 void DrawRect(void *video, int width, int height, uint8 color) {};
00021 void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 color) {};
00022 void CopyFromBuffer(void *video, const void *src, int width, int height) {};
00023 void CopyToBuffer(const void *video, void *dst, int width, int height) {};
00024 void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) {};
00025 void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) {};
00026 int BufferSize(int width, int height) { return 0; };
00027 void PaletteAnimate(uint start, uint count) { };
00028 Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
00029
00030 const char *GetName() { return "null"; }
00031 };
00032
00033 class FBlitter_Null: public BlitterFactory<FBlitter_Null> {
00034 public:
00035 const char *GetName() { return "null"; }
00036 const char *GetDescription() { return "Null Blitter (does nothing)"; }
00037 Blitter *CreateInstance() { return new Blitter_Null(); }
00038 };
00039
00040 #endif