BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend

This commit is contained in:
Cameron Cawley 2020-10-10 15:16:23 +01:00 committed by Eugene Sandulenko
parent d0fd0f1151
commit 5a47b09455
16 changed files with 8 additions and 45 deletions

View File

@ -22,6 +22,8 @@
#include "backends/base-backend.h"
#include "graphics/pixelbuffer.h"
#ifndef DISABLE_DEFAULT_EVENT_MANAGER
#include "backends/events/default/default-events.h"
#endif
@ -49,6 +51,11 @@ void BaseBackend::initBackend() {
OSystem::initBackend();
}
Graphics::PixelBuffer BaseBackend::getScreenPixelBuffer() {
warning("BaseBackend::getScreenPixelBuffer(): not implemented");
return Graphics::PixelBuffer();
}
void BaseBackend::fillScreen(uint32 col) {
Graphics::Surface *screen = lockScreen();
if (screen)

View File

@ -30,6 +30,7 @@ class BaseBackend : public OSystem {
public:
virtual void initBackend();
virtual Graphics::PixelBuffer getScreenPixelBuffer();
virtual void displayMessageOnOSD(const Common::U32String &msg);
virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) {}
virtual void fillScreen(uint32 col);

View File

@ -27,7 +27,6 @@
#include "backends/platform/3ds/config.h"
#include "common/rect.h"
#include "graphics/fontman.h"
#include "graphics/pixelbuffer.h"
#include "gui/gui-manager.h"
// Used to transfer the final rendered display to the framebuffer
@ -187,10 +186,6 @@ bool OSystem_3DS::setGraphicsMode(GraphicsModeID modeID) {
}
}
Graphics::PixelBuffer OSystem_3DS::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
void OSystem_3DS::initSize(uint width, uint height,
const Graphics::PixelFormat *format) {
debug("3ds initsize w:%d h:%d", width, height);

View File

@ -141,7 +141,6 @@ public:
virtual int getScreenChangeID() const { return _screenChangeId; };
GraphicsModeID chooseMode(Graphics::PixelFormat *format);
bool setGraphicsMode(GraphicsModeID modeID);
virtual Graphics::PixelBuffer getScreenPixelBuffer();
void beginGFXTransaction();
OSystem::TransactionError endGFXTransaction();

View File

@ -98,8 +98,6 @@ protected:
public:
virtual Graphics::PixelBuffer getScreenPixelBuffer();
// Determine the pixel format currently in use for screen rendering.
Graphics::PixelFormat getScreenFormat() const;

View File

@ -24,7 +24,6 @@
#include "common/scummsys.h"
#include "graphics/surface.h"
#include "graphics/pixelbuffer.h"
#include "dc.h"
#define SCREEN_W 640
@ -186,11 +185,6 @@ void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num) const
}
}
Graphics::PixelBuffer OSystem_Dreamcast::getScreenPixelBuffer()
{
return Graphics::PixelBuffer();
}
Graphics::PixelFormat OSystem_Dreamcast::getScreenFormat() const
{
return screenFormats[_screenFormat];

View File

@ -42,7 +42,6 @@
#include "common/str.h"
#include "cdaudio.h"
#include "graphics/surface.h"
#include "graphics/pixelbuffer.h"
#include "touchkeyboard.h"
#include "backends/fs/ds/ds-fs-factory.h"
@ -163,10 +162,6 @@ bool OSystem_DS::getFeatureState(Feature f) {
return false;
}
Graphics::PixelBuffer OSystem_DS::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
void OSystem_DS::initSize(uint width, uint height, const Graphics::PixelFormat *format) {
// For Lost in Time, the title screen is displayed in 640x400.
// In order to support this game, the screen mode is set, but

View File

@ -88,7 +88,6 @@ public:
virtual int16 getWidth();
virtual PaletteManager *getPaletteManager() { return this; }
virtual Graphics::PixelBuffer getScreenPixelBuffer();
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);

View File

@ -130,7 +130,6 @@ public:
virtual void beginGFXTransaction();
virtual TransactionError endGFXTransaction();
virtual Graphics::PixelBuffer getScreenPixelBuffer();
virtual int16 getHeight();
virtual int16 getWidth();

View File

@ -27,7 +27,6 @@
#include "backends/platform/iphone/iphone_video.h"
#include "graphics/conversion.h"
#include "graphics/pixelbuffer.h"
void OSystem_IPHONE::engineInit() {
EventsBaseBackend::engineInit();
@ -138,10 +137,6 @@ OSystem::TransactionError OSystem_IPHONE::endGFXTransaction() {
return _gfxTransactionError;
}
Graphics::PixelBuffer OSystem_IPHONE::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
void OSystem_IPHONE::updateOutputSurface() {
[g_iPhoneViewInstance performSelectorOnMainThread:@selector(initSurface) withObject:nil waitUntilDone: YES];
}

View File

@ -153,7 +153,6 @@ public:
virtual int16 getWidth();
virtual PaletteManager *getPaletteManager() { return this; }
virtual Graphics::PixelBuffer getScreenPixelBuffer();
protected:
// PaletteManager API
virtual void setPalette(const byte *colors, uint start, uint num);

View File

@ -32,7 +32,6 @@
#include "backends/fs/n64/n64-fs-factory.h"
#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "graphics/pixelbuffer.h"
typedef unsigned long long uint64;
@ -221,10 +220,6 @@ const OSystem::GraphicsMode* OSystem_N64::getSupportedGraphicsModes() const {
return s_supportedGraphicsModes;
}
Graphics::PixelBuffer OSystem_N64::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
int OSystem_N64::getDefaultGraphicsMode() const {
return OVERS_NTSC_340X240;
}

View File

@ -41,7 +41,6 @@
#include "backends/saves/default/default-saves.h"
#include "backends/timer/psp/timer.h"
#include "graphics/surface.h"
#include "graphics/pixelbuffer.h"
#include "audio/mixer_intern.h"
//#define __PSP_DEBUG_FUNCS__ /* For debugging function calls */
@ -131,10 +130,6 @@ const OSystem::GraphicsMode* OSystem_PSP::getSupportedGraphicsModes() const {
return _displayManager.getSupportedGraphicsModes();
}
Graphics::PixelBuffer OSystem_PSP::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
int OSystem_PSP::getDefaultGraphicsMode() const {
DEBUG_ENTER_FUNC();
return _displayManager.getDefaultGraphicsMode();

View File

@ -79,7 +79,6 @@ public:
virtual Graphics::PixelFormat getScreenFormat() const;
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
#endif
virtual Graphics::PixelBuffer getScreenPixelBuffer();
// Screen size
void initSize(uint width, uint height, const Graphics::PixelFormat *format);

View File

@ -166,8 +166,6 @@ protected:
virtual void setPalette(const byte *colors, uint start, uint num);
virtual void grabPalette(byte *colors, uint start, uint num) const;
public:
virtual Graphics::PixelBuffer getScreenPixelBuffer();
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void copyRectToScreen(const void *buf, int pitch, int x, int y,
int w, int h);

View File

@ -29,7 +29,6 @@
#include "common/config-manager.h"
#include "graphics/conversion.h"
#include "graphics/pixelbuffer.h"
#include "backends/fs/wii/wii-fs-factory.h"
#include "osystem.h"
@ -375,10 +374,6 @@ void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) const {
}
}
Graphics::PixelBuffer OSystem_Wii::getScreenPixelBuffer() {
return Graphics::PixelBuffer();
}
void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) {
if (!_texMouse.palette) {
printf("switching to palette based cursor\n");