Merge tag '1.11.0-beta2' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release.yml # CMakeLists.txt # src/blitter/32bpp_optimized.cpp # src/debug.cpp # src/gfx.cpp # src/gfx_func.h # src/lang/czech.txt # src/lang/english.txt # src/lang/italian.txt # src/lang/swedish.txt # src/lang/ukrainian.txt # src/network/network_server.cpp # src/os/windows/crashlog_win.cpp # src/os/windows/win32.cpp # src/pathfinder/follow_track.hpp # src/screenshot.cpp # src/settings_type.h # src/spritecache.cpp # src/vehicle_gui.cpp # src/video/sdl2_v.cpp # src/video/video_driver.cpp # src/video/video_driver.hpp # src/video/win32_v.cpp
This commit is contained in:
@@ -43,7 +43,7 @@ DECLARE_ENUM_AS_BIT_SET(BlitterSpriteFlags);
|
||||
/**
|
||||
* How all blitters should look like. Extend this class to make your own.
|
||||
*/
|
||||
class Blitter {
|
||||
class Blitter : public SpriteEncoder {
|
||||
public:
|
||||
/** Parameters related to blitting. */
|
||||
struct BlitterParams {
|
||||
@@ -77,6 +77,11 @@ public:
|
||||
*/
|
||||
virtual uint8 GetScreenDepth() = 0;
|
||||
|
||||
bool Is32BppSupported() override
|
||||
{
|
||||
return this->GetScreenDepth() > 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw an image to the screen, given an amount of params defined above.
|
||||
*/
|
||||
@@ -93,11 +98,6 @@ public:
|
||||
*/
|
||||
virtual void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) = 0;
|
||||
|
||||
/**
|
||||
* Convert a sprite from the loader to our own format.
|
||||
*/
|
||||
virtual Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) = 0;
|
||||
|
||||
/**
|
||||
* Move the destination pointer the requested amount x and y, keeping in mind
|
||||
* any pitch and bpp of the renderer.
|
||||
@@ -228,6 +228,14 @@ public:
|
||||
*/
|
||||
virtual Blitter::PaletteAnimation UsePaletteAnimation() = 0;
|
||||
|
||||
/**
|
||||
* Does this blitter require a separate animation buffer from the video backend?
|
||||
*/
|
||||
virtual bool NeedsAnimationBuffer()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the blitter, the same as the Factory-instance returns.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user