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/blitter/32bpp_simple.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/blitter/32bpp_simple.cpp')
-rw-r--r-- | src/blitter/32bpp_simple.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index c858736cf..3dc5ee096 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -3,7 +3,6 @@ #include "../gfx.h" #include "../debug.h" #include "../table/sprites.h" -#include "../renderer/32bpp.hpp" #include "32bpp_simple.hpp" static FBlitter_32bppSimple iFBlitter_32bppSimple; @@ -108,7 +107,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo if (src->m == 0) { if (src->a != 0) *dst = ComposeColorRGBA(src->r, src->g, src->b, src->a, *dst); } else { - if (bp->remap[src->m] != 0) *dst = ComposeColorPA(Renderer_32bpp::LookupColourInPalette(bp->remap[src->m]), src->a, *dst); + if (bp->remap[src->m] != 0) *dst = ComposeColorPA(this->LookupColourInPalette(bp->remap[src->m]), src->a, *dst); } break; @@ -176,7 +175,7 @@ Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::Alloc for (int i = 0; i < sprite->height * sprite->width; i++) { if (dst[i].m != 0) { /* Pre-convert the mapping channel to a RGB value */ - uint color = Renderer_32bpp::LookupColourInPalette(dst[i].m); + uint color = this->LookupColourInPalette(dst[i].m); dst[i].r = GB(color, 16, 8); dst[i].g = GB(color, 8, 8); dst[i].b = GB(color, 0, 8); |