mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-25 08:22:17 +00:00
Codechange: Change ScreenshotCallback into a std::function, so there is no need for void* user data.
This commit is contained in:
@@ -41,7 +41,7 @@ class ScreenshotProvider_Pcx : public ScreenshotProvider {
|
||||
public:
|
||||
ScreenshotProvider_Pcx() : ScreenshotProvider("pcx", "PCX", 20) {}
|
||||
|
||||
bool MakeImage(const char *name, ScreenshotCallback *callb, void *userdata, uint w, uint h, int pixelformat, const Colour *palette) override
|
||||
bool MakeImage(const char *name, const ScreenshotCallback &callb, uint w, uint h, int pixelformat, const Colour *palette) override
|
||||
{
|
||||
uint maxlines;
|
||||
uint y;
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
uint i;
|
||||
|
||||
/* render the pixels into the buffer */
|
||||
callb(userdata, buff.data(), y, w, n);
|
||||
callb(buff.data(), y, w, n);
|
||||
y += n;
|
||||
|
||||
/* write them to pcx */
|
||||
|
||||
Reference in New Issue
Block a user