(svn r27953) -Cleanup: Adjust other languages for r27952
[openttd.git] / src / blitter / 32bpp_optimized.hpp
blobc261aa33d65de7270463bcddb38e69c297d92701
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file 32bpp_optimized.hpp Optimized 32 bpp blitter. */
12 #ifndef BLITTER_32BPP_OPTIMIZED_HPP
13 #define BLITTER_32BPP_OPTIMIZED_HPP
15 #include "32bpp_simple.hpp"
17 /** The optimised 32 bpp blitter (without palette animation). */
18 class Blitter_32bppOptimized : public Blitter_32bppSimple {
19 public:
20 /** Data stored about a (single) sprite. */
21 struct SpriteData {
22 uint32 offset[ZOOM_LVL_COUNT][2]; ///< Offsets (from .data) to streams for different zoom levels, and the normal and remap image information.
23 byte data[]; ///< Data, all zoomlevels.
26 /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
27 /* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
29 /* virtual */ const char *GetName() { return "32bpp-optimized"; }
31 template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
34 /** Factory for the optimised 32 bpp blitter (without palette animation). */
35 class FBlitter_32bppOptimized : public BlitterFactory {
36 public:
37 FBlitter_32bppOptimized() : BlitterFactory("32bpp-optimized", "32bpp Optimized Blitter (no palette animation)") {}
38 /* virtual */ Blitter *CreateInstance() { return new Blitter_32bppOptimized(); }
41 #endif /* BLITTER_32BPP_OPTIMIZED_HPP */