10#ifndef BLITTER_32BPP_SSE2_HPP
11#define BLITTER_32BPP_SSE2_HPP
20#define SSE_TARGET "sse2"
24#define FULL_ANIMATION 0
30class Blitter_32bppSSE_Base {
32 virtual ~Blitter_32bppSSE_Base() =
default;
38 static_assert(
sizeof(MapValue) == 2);
61 SF_TRANSLUCENT = 1 << 1,
68 uint32_t sprite_offset;
70 uint16_t sprite_line_size;
71 uint16_t sprite_width;
88 template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last,
bool translucent>
92 return Blitter_32bppSSE_Base::Encode(sprite, allocator);
95 std::string_view
GetName()
override {
return "32bpp-sse2"; }
Types related to SSE 32 bpp blitter.
BlitterMode
The modes of blitting we can do.
The base factory, keeping track of all blitters.
virtual Blitter * CreateInstance()=0
Create an instance of this Blitter-class.
The most trivial 32 bpp blitter (without palette animation).
Sprite * Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override
Convert a sprite from the loader to our own format.
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override
Draw an image to the screen, given an amount of params defined above.
std::string_view GetName() override
Get the name of the blitter, the same as the Factory-instance returns.
How all blitters should look like.
Interface for something that can allocate memory for a sprite.
std::array< Sprite, ZOOM_LVL_END > SpriteCollection
Type defining a collection of sprites, one for each zoom level.
bool HasCPUIDFlag(uint type, uint index, uint bit)
Check whether the current CPU has the given flag.
#define DECLARE_ENUM_AS_BIT_SET(enum_type)
Operators to allow to work with enum as with type safe bit set in C++.
Parameters related to blitting.
Data structure describing a sprite.
ZoomLevel
All zoom levels we know.
@ ZOOM_LVL_END
End for iteration.