OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
10 #ifndef BLITTER_32BPP_SSE2_HPP
11 #define BLITTER_32BPP_SSE2_HPP
20 #define SSE_TARGET "sse2"
23 #ifndef FULL_ANIMATION
24 #define FULL_ANIMATION 0
30 class 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"; }
virtual Blitter * CreateInstance()=0
Create an instance of this Blitter-class.
Sprite * Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override
Convert a sprite from the loader to our own format.
BlitterMode
The modes of blitting we can do.
The most trivial 32 bpp blitter (without palette animation).
How all blitters should look like.
@ ZOOM_LVL_END
End for iteration.
The base factory, keeping track of all blitters.
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.
std::string_view GetName() override
Get the name of the blitter, the same as the Factory-instance returns.
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Parameters related to blitting.
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override
Draw an image to the screen, given an amount of params defined above.
Data structure describing a sprite.
bool HasCPUIDFlag(uint type, uint index, uint bit)
Check whether the current CPU has the given flag.
ZoomLevel
All zoom levels we know.