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);
41 enum ReadMode : uint8_t {
48 enum BlockType : uint8_t {
59 enum class SpriteFlag : uint8_t {
69 uint32_t sprite_offset = 0;
70 uint32_t mv_offset = 0;
71 uint16_t sprite_line_size = 0;
72 uint16_t sprite_width = 0;
76 std::array<SpriteInfo, ZOOM_LVL_END> infos{};
87 template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last,
bool translucent>
91 return Blitter_32bppSSE_Base::Encode(sprite, allocator);
94 std::string_view
GetName()
override {
return "32bpp-sse2"; }
101 std::unique_ptr<Blitter>
CreateInstance()
override {
return std::make_unique<Blitter_32bppSSE2>(); }
Types related to SSE 32 bpp blitter.
BlitterMode
The modes of blitting we can do.
The base factory, keeping track of all blitters.
virtual std::unique_ptr< 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.
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.
Parameters related to blitting.
Data structure describing a sprite.
ZoomLevel
All zoom levels we know.