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/>.
10 /** @file 32bpp_sse4_anim.hpp A SSE4 32 bpp blitter with animation support. */
12 #ifndef BLITTER_32BPP_SSE4_ANIM_HPP
13 #define BLITTER_32BPP_SSE4_ANIM_HPP
17 #include "32bpp_anim.hpp"
18 #include "32bpp_sse4.hpp"
20 /** The SSE4 32 bpp blitter with palette animation. */
21 class Blitter_32bppSSE4_Anim FINAL
: public Blitter_32bppAnim
{
25 typedef SSESprite Sprite
;
27 static const char name
[]; ///< Name of the blitter.
28 static const char desc
[]; ///< Description of the blitter.
30 static bool usable (void)
32 return HasCPUIDFlag (1, 2, 19);
35 template <BlitterMode mode
, SSESprite::ReadMode read_mode
, SSESprite::BlockType bt_last
, bool translucent
, bool animated
>
36 void Draw (const Blitter::BlitterParams
*bp
, ZoomLevel zoom
);
37 template <BlitterMode mode
, SSESprite::ReadMode read_mode
, SSESprite::BlockType bt_last
, bool translucent
>
38 void Draw (const Blitter::BlitterParams
*bp
, ZoomLevel zoom
, bool animated
);
39 /* virtual */ void Draw(Blitter::BlitterParams
*bp
, BlitterMode mode
, ZoomLevel zoom
);
41 ::Sprite
*Encode (const SpriteLoader::Sprite
*sprite
, bool is_font
, AllocatorProc
*allocator
) OVERRIDE
43 return SSESprite::encode (sprite
, is_font
, allocator
);
48 #endif /* BLITTER_32BPP_SSE4_ANIM_HPP */