diff options
author | truelight <truelight@openttd.org> | 2007-06-17 20:30:28 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-17 20:30:28 +0000 |
commit | 003375d3755fe06227894e941b177491770c17fe (patch) | |
tree | e0105857aa1562ca3ca15a5e7df7e49bfc939456 /src/screenshot.cpp | |
parent | b0b4820387ec6f0214b43dc61b452fa73ca8a09a (diff) | |
download | openttd-003375d3755fe06227894e941b177491770c17fe.tar.xz |
(svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
Note: this allows much easier adding other types of video-drivers, like OpenGL
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 78235553d..c03eab59a 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -16,7 +16,7 @@ #include "date.h" #include "string.h" #include "helpers.hpp" -#include "blitter/blitter.hpp" +#include "blitter/factory.hpp" #include "fileio.h" char _screenshot_format_name[8]; @@ -483,8 +483,9 @@ void SetScreenshotFormat(int i) /* screenshot generator that dumps the current video buffer */ static void CurrentScreenCallback(void *userdata, void *buf, uint y, uint pitch, uint n) { - void *src = _screen.renderer->MoveTo(_screen.dst_ptr, 0, y); - _screen.renderer->CopyToBuffer(src, buf, _screen.width, n, pitch); + Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); + void *src = blitter->MoveTo(_screen.dst_ptr, 0, y); + blitter->CopyToBuffer(src, buf, _screen.width, n, pitch); } /* generate a large piece of the world */ |