diff options
author | truelight <truelight@openttd.org> | 2007-06-12 20:24:12 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-12 20:24:12 +0000 |
commit | 0e53fd6d328a128799034e155a92cf44fddc1cd0 (patch) | |
tree | bed173ca279e1556489d31b0b8aa873a6d1cf110 /src/renderer/8bpp.hpp | |
parent | b729f5d08da470a92f585e2758ceeba823014a93 (diff) | |
download | openttd-0e53fd6d328a128799034e155a92cf44fddc1cd0.tar.xz |
(svn r10121) -Codechange: split renderer from rest of code; no longer any code directly accesses the video-buffer
-Add: added NULL blitter and renderer, which are always used for -vnull
-Add: dedicated driver doesn't blit nor render by default. Can be overruled by user. (-D -b 8bpp-optimized)
-Remove: removed CTRL+D from win32, which is incompatible with above
-Add: extended screenshot support for PNG and BMP
-Codechange: remove all hardcoded 8bpp references and replace them with more dynamic ones
-Codechange: minor stuff in blitters
Diffstat (limited to 'src/renderer/8bpp.hpp')
-rw-r--r-- | src/renderer/8bpp.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/renderer/8bpp.hpp b/src/renderer/8bpp.hpp new file mode 100644 index 000000000..a8bb27a48 --- /dev/null +++ b/src/renderer/8bpp.hpp @@ -0,0 +1,29 @@ +/* $Id$ */ + +/** @file 8bpp.hpp */ + +#ifndef RENDERER_8BPP_HPP +#define RENDERER_8BPP_HPP + +#include "renderer.hpp" + +class Renderer_8bpp : public Renderer { +public: + /* virtual */ void *MoveTo(const void *video, int x, int y); + /* virtual */ void SetPixel(void *video, int x, int y, uint8 color); + /* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 color); + /* virtual */ void SetHorizontalLine(void *video, int width, uint8 color); + /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height, int src_pitch); + /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height, int dst_pitch); + /* virtual */ void MoveBuffer(void *video_dst, const void *video_src, int width, int height); + /* virtual */ int BufferSize(int width, int height); +}; + +class FRenderer_8bpp: public RendererFactory<FRenderer_8bpp> { +public: + /* virtual */ const char *GetName() { return "8bpp"; } + + /* virtual */ Renderer *CreateInstance() { return new Renderer_8bpp(); } +}; + +#endif /* RENDERER_8BPP_HPP */ |