|
OpenTTD Source 20260311-master-g511d3794ce
|
Base interface for a SoundLoader implementation. More...
#include <screenshot_type.h>
Public Member Functions | |
| ScreenshotProvider (std::string_view name, std::string_view description, int priority) | |
| ~ScreenshotProvider () override | |
| Unregister ourselves from the screenshot providers. | |
| virtual bool | MakeImage (std::string_view name, const ScreenshotCallback &callb, uint w, uint h, int pixelformat, const Colour *palette) const =0 |
| Create and write an image to a file. | |
| Public Member Functions inherited from PriorityBaseProvider< ScreenshotProvider > | |
| constexpr | PriorityBaseProvider (std::string_view name, std::string_view description, int priority) |
| int | GetPriority () const |
| Public Member Functions inherited from BaseProvider< ScreenshotProvider > | |
| constexpr | BaseProvider (std::string_view name, std::string_view description) |
| virtual | ~BaseProvider ()=default |
| Ensure the destructor of the sub classes are called as well. | |
| std::string_view | GetName () const |
| std::string_view | GetDescription () const |
Additional Inherited Members | |
| Protected Attributes inherited from PriorityBaseProvider< ScreenshotProvider > | |
| const int | priority |
| Protected Attributes inherited from BaseProvider< ScreenshotProvider > | |
| const std::string_view | name |
| const std::string_view | description |
Base interface for a SoundLoader implementation.
Definition at line 27 of file screenshot_type.h.
|
inline |
Definition at line 29 of file screenshot_type.h.
|
inlineoverride |
Unregister ourselves from the screenshot providers.
Definition at line 35 of file screenshot_type.h.
|
pure virtual |
Create and write an image to a file.
| name | The file name to write to. |
| callb | The callback that fills a buffer with pixel data. |
| w | The width of the image. |
| h | The height of the image. |
| pixelformat | The number of bits per pixel for the image. |
| palette | The palette that is currently being used. |
Implemented in ScreenshotProvider_Bmp, ScreenshotProvider_Pcx, and ScreenshotProvider_Png.