[Scummvm-git-logs] scummvm master -> 8594f25b26a36d210ba9bb27a97b243853ed0b71

sev- sev at scummvm.org
Sat Oct 10 16:00:22 UTC 2020


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5a47b09455 BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend
196a25dd30 BACKENDS: Add missing override keywords
8594f25b26 BACKENDS: Add comment to describe the purpose of BaseBackend


Commit: 5a47b0945559b2c92407c3f43fe6018da0839c51
    https://github.com/scummvm/scummvm/commit/5a47b0945559b2c92407c3f43fe6018da0839c51
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-10-10T18:00:17+02:00

Commit Message:
BACKENDS: Move default implementations of getScreenPixelBuffer into BaseBackend

Changed paths:
    backends/base-backend.cpp
    backends/base-backend.h
    backends/platform/3ds/osystem-graphics.cpp
    backends/platform/3ds/osystem.h
    backends/platform/dc/dc.h
    backends/platform/dc/display.cpp
    backends/platform/ds/arm9/source/osystem_ds.cpp
    backends/platform/ds/arm9/source/osystem_ds.h
    backends/platform/iphone/osys_main.h
    backends/platform/iphone/osys_video.mm
    backends/platform/n64/osys_n64.h
    backends/platform/n64/osys_n64_base.cpp
    backends/platform/psp/osys_psp.cpp
    backends/platform/psp/osys_psp.h
    backends/platform/wii/osystem.h
    backends/platform/wii/osystem_gfx.cpp


diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp
index 5fcee25b9f..98c4ce0a6a 100644
--- a/backends/base-backend.cpp
+++ b/backends/base-backend.cpp
@@ -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)
diff --git a/backends/base-backend.h b/backends/base-backend.h
index 0e776574f8..c74d2ee7db 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -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);
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp
index c902018a10..7c11acd67b 100644
--- a/backends/platform/3ds/osystem-graphics.cpp
+++ b/backends/platform/3ds/osystem-graphics.cpp
@@ -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);
diff --git a/backends/platform/3ds/osystem.h b/backends/platform/3ds/osystem.h
index c5c182879d..79428f0010 100644
--- a/backends/platform/3ds/osystem.h
+++ b/backends/platform/3ds/osystem.h
@@ -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();
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index f8f8416941..9c1ff0451c 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -98,8 +98,6 @@ protected:
 
 public:
 
-  virtual Graphics::PixelBuffer getScreenPixelBuffer();
-
   // Determine the pixel format currently in use for screen rendering.
   Graphics::PixelFormat getScreenFormat() const;
 
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index b3171a4a03..bb7919a519 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -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];
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 0a4f054ebf..3e80c8b6b8 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -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
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index c61842181b..052790395b 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -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);
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index e737c96178..a5755062bf 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -130,7 +130,6 @@ public:
 
 	virtual void beginGFXTransaction();
 	virtual TransactionError endGFXTransaction();
-	virtual Graphics::PixelBuffer getScreenPixelBuffer();
 
 	virtual int16 getHeight();
 	virtual int16 getWidth();
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index 22b5081850..07fc93ce8d 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -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];
 }
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index f29a140ca9..40e7e3b33e 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -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);
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index ef9278c8ba..d163746ce3 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -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;
 }
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 5dba7f8803..b5a612d41c 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -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();
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index e3bf787eca..8e263e2898 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -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);
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 90520b7d5e..350a3f45a0 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -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);
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index d1e7e0c434..6a7adce3dd 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -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");


Commit: 196a25dd304f735f0a3b20229fea7e2645dd99d5
    https://github.com/scummvm/scummvm/commit/196a25dd304f735f0a3b20229fea7e2645dd99d5
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-10-10T18:00:17+02:00

Commit Message:
BACKENDS: Add missing override keywords

Changed paths:
    backends/base-backend.h


diff --git a/backends/base-backend.h b/backends/base-backend.h
index c74d2ee7db..5d23003a56 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -28,12 +28,12 @@
 
 class BaseBackend : public OSystem {
 public:
-	virtual void initBackend();
+	virtual void initBackend() override;
 
-	virtual Graphics::PixelBuffer getScreenPixelBuffer();
-	virtual void displayMessageOnOSD(const Common::U32String &msg);
-	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) {}
-	virtual void fillScreen(uint32 col);
+	virtual Graphics::PixelBuffer getScreenPixelBuffer() override;
+	virtual void displayMessageOnOSD(const Common::U32String &msg) override;
+	virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override {}
+	virtual void fillScreen(uint32 col) override;
 };
 
 class EventsBaseBackend : virtual public BaseBackend, Common::EventSource {


Commit: 8594f25b26a36d210ba9bb27a97b243853ed0b71
    https://github.com/scummvm/scummvm/commit/8594f25b26a36d210ba9bb27a97b243853ed0b71
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-10-10T18:00:17+02:00

Commit Message:
BACKENDS: Add comment to describe the purpose of BaseBackend

Changed paths:
    backends/base-backend.h


diff --git a/backends/base-backend.h b/backends/base-backend.h
index 5d23003a56..2f5228ff0f 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -26,6 +26,10 @@
 #include "common/system.h"
 #include "common/events.h"
 
+/**
+ * Subclass of OSystem that contains default implementations of functions that would
+ * cause circular dependencies if they were implemented in common/system.cpp
+ */
 class BaseBackend : public OSystem {
 public:
 	virtual void initBackend() override;




More information about the Scummvm-git-logs mailing list