OpenTTD Source: src/blitter/32bpp_anim_sse2.hpp Source File

OpenTTD Source 1.11.0-RC1

32bpp_anim_sse2.hpp
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10 #ifndef BLITTER_32BPP_SSE2_ANIM_HPP
11 #define BLITTER_32BPP_SSE2_ANIM_HPP
12
13 #ifdef WITH_SSE
14
15 #ifndef SSE_VERSION
16 #define SSE_VERSION 2
17 #endif
18
19 #ifndef FULL_ANIMATION
20 #define FULL_ANIMATION 1
21 #endif
22
23 #include "32bpp_anim.hpp"
24 #include "32bpp_sse2.hpp"
25
27 class Blitter_32bppSSE2_Anim : public Blitter_32bppAnim {
28 public:
29 void PaletteAnimate(const Palette &palette) override;
30 const char *GetName() override { return "32bpp-sse2-anim"; }
31 };
32
34 class FBlitter_32bppSSE2_Anim : public BlitterFactory {
35 public:
36 FBlitter_32bppSSE2_Anim() : BlitterFactory("32bpp-sse2-anim", "32bpp partially SSE2 Animation Blitter (palette animation)", HasCPUIDFlag(1, 3, 26)) {}
37 Blitter *CreateInstance() override { return new Blitter_32bppSSE2_Anim(); }
38 };
39
40 #endif /* WITH_SSE */
41 #endif /* BLITTER_32BPP_ANIM_HPP */
BlitterFactory::CreateInstance
virtual Blitter * CreateInstance()=0
Create an instance of this Blitter-class.
32bpp_sse2.hpp
Blitter
How all blitters should look like.
Definition: base.hpp:28
BlitterFactory
The base factory, keeping track of all blitters.
Definition: factory.hpp:23
Blitter_32bppAnim::PaletteAnimate
void PaletteAnimate(const Palette &palette) override
Called when the 8bpp palette is changed; you should redraw all pixels on the screen that are equal to...
Definition: 32bpp_anim.cpp:486
Blitter_32bppAnim::GetName
const char * GetName() override
Get the name of the blitter, the same as the Factory-instance returns.
Definition: 32bpp_anim.hpp:50
Blitter_32bppAnim
The optimised 32 bpp blitter with palette animation.
Definition: 32bpp_anim.hpp:16
32bpp_anim.hpp
Palette
Information about the currently used palette.
Definition: gfx_type.h:313
HasCPUIDFlag
bool HasCPUIDFlag(uint type, uint index, uint bit)
Check whether the current CPU has the given flag.
Definition: cpu.cpp:141