[Scummvm-git-logs] scummvm master -> 0a942b1cb10f0f00d71582c971ec1e3b060cd015

sev- sev at scummvm.org
Wed May 27 10:45:04 UTC 2020


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

Summary:
84c763a048 NULL: Add 16bit support
0a942b1cb1 NULL: Store the parameters passed to initSize()


Commit: 84c763a048110e7fbbdcd994cbba8730822d3a7a
    https://github.com/scummvm/scummvm/commit/84c763a048110e7fbbdcd994cbba8730822d3a7a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-05-27T12:44:59+02:00

Commit Message:
NULL: Add 16bit support

Changed paths:
    backends/graphics/null/null-graphics.h
    configure


diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h
index d050e98a03..a215ec8a61 100644
--- a/backends/graphics/null/null-graphics.h
+++ b/backends/graphics/null/null-graphics.h
@@ -33,11 +33,17 @@ public:
 	void setFeatureState(OSystem::Feature f, bool enable) override {}
 	bool getFeatureState(OSystem::Feature f) const override { return false; }
 
-	inline Graphics::PixelFormat getScreenFormat() const override {
+	Graphics::PixelFormat getScreenFormat() const override {
 		return Graphics::PixelFormat::createFormatCLUT8();
 	}
-	inline Common::List<Graphics::PixelFormat> getSupportedFormats() const override {
+
+	Common::List<Graphics::PixelFormat> getSupportedFormats() const override {
 		Common::List<Graphics::PixelFormat> list;
+		list.push_back(Graphics::PixelFormat(2, 5, 6, 5, 0, 11,  5,  0,  0)); // BBDoU, Frotz, HDB, Hopkins, Nuvie, Petka, Riven, Sherlock (3DO), Titanic, Tony, Ultima 4, Ultima 8, ZVision
+		list.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16,  8,  0)); // Full Pipe, Gnap (little endian), Griffon, Groovie 2, SCI32 (HQ videos), Sludge, Sword25, Ultima 8, Wintermute
+		list.push_back(Graphics::PixelFormat(4, 8, 8, 8, 8,  0,  8, 16, 24)); // Gnap (big endian)
+		list.push_back(Graphics::PixelFormat(2, 5, 5, 5, 0, 10,  5,  0,  0)); // SCUMM HE99+, Last Express
+		list.push_back(Graphics::PixelFormat(2, 5, 5, 5, 1, 10,  5,  0, 15)); // Dragons
 		list.push_back(Graphics::PixelFormat::createFormatCLUT8());
 		return list;
 	}
@@ -62,7 +68,7 @@ public:
 
 	void showOverlay() override {}
 	void hideOverlay() override {}
-	Graphics::PixelFormat getOverlayFormat() const override { return Graphics::PixelFormat(); }
+	Graphics::PixelFormat getOverlayFormat() const override { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
 	void clearOverlay() override {}
 	void grabOverlay(void *buf, int pitch) const override {}
 	void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override {}
diff --git a/configure b/configure
index 6b7c6e44da..0c8971ee1a 100755
--- a/configure
+++ b/configure
@@ -3940,7 +3940,7 @@ fi
 # Enable 16bit support only for backends which support it
 #
 case $_backend in
-	3ds | android | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | psp2 | samsungtv | sdl | switch | tizen | webos | wii)
+	3ds | android | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | null | openpandora | psp | psp2 | samsungtv | sdl | switch | tizen | webos | wii)
 		if test "$_16bit" = auto ; then
 			_16bit=yes
 		else


Commit: 0a942b1cb10f0f00d71582c971ec1e3b060cd015
    https://github.com/scummvm/scummvm/commit/0a942b1cb10f0f00d71582c971ec1e3b060cd015
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-05-27T12:44:59+02:00

Commit Message:
NULL: Store the parameters passed to initSize()

Changed paths:
    backends/graphics/null/null-graphics.h


diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h
index a215ec8a61..23dba1423d 100644
--- a/backends/graphics/null/null-graphics.h
+++ b/backends/graphics/null/null-graphics.h
@@ -34,7 +34,7 @@ public:
 	bool getFeatureState(OSystem::Feature f) const override { return false; }
 
 	Graphics::PixelFormat getScreenFormat() const override {
-		return Graphics::PixelFormat::createFormatCLUT8();
+		return _format;
 	}
 
 	Common::List<Graphics::PixelFormat> getSupportedFormats() const override {
@@ -47,14 +47,20 @@ public:
 		list.push_back(Graphics::PixelFormat::createFormatCLUT8());
 		return list;
 	}
-	void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override {}
+
+	void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override {
+		_width = width;
+		_height = height;
+		_format = format ? *format : Graphics::PixelFormat::createFormatCLUT8();
+	}
+
 	virtual int getScreenChangeID() const override { return 0; }
 
 	void beginGFXTransaction() override {}
 	OSystem::TransactionError endGFXTransaction() override { return OSystem::kTransactionSuccess; }
 
-	int16 getHeight() const override { return 0; }
-	int16 getWidth() const override { return 0; }
+	int16 getHeight() const override { return _height; }
+	int16 getWidth() const override { return _width; }
 	void setPalette(const byte *colors, uint start, uint num) override {}
 	void grabPalette(byte *colors, uint start, uint num) const override {}
 	void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override {}
@@ -72,13 +78,17 @@ public:
 	void clearOverlay() override {}
 	void grabOverlay(void *buf, int pitch) const override {}
 	void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override {}
-	int16 getOverlayHeight() const override { return 0; }
-	int16 getOverlayWidth() const override { return 0; }
+	int16 getOverlayHeight() const override { return _height; }
+	int16 getOverlayWidth() const override { return _width; }
 
 	bool showMouse(bool visible) override { return !visible; }
 	void warpMouse(int x, int y) override {}
 	void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override {}
 	void setCursorPalette(const byte *colors, uint start, uint num) override {}
+
+private:
+	uint _width, _height;
+	Graphics::PixelFormat _format;
 };
 
 #endif




More information about the Scummvm-git-logs mailing list