From 58a348fd18727aab57c0f4f8ab4cc5ad893ee795 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Wed, 10 Jun 2009 05:35:54 +0000 Subject: Scumm engine now dynamically requests 16-bit color based on game features, (using ad-hoc request format) svn-id: r41417 --- engines/engine.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 45477f408d..8538cc779f 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,6 +29,9 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" +#ifdef ENABLE_16BIT +#include "graphics/pixelformat.h" +#endif class OSystem; @@ -59,6 +62,9 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ +#ifdef ENABLE_16BIT +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +#endif void initGraphics(int width, int height, bool defaultTo1xScaler); /** -- cgit v1.2.3 From 6adbd0c41e79b5a21f0430e060347d4978e9ce78 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Thu, 11 Jun 2009 05:56:00 +0000 Subject: Renamed Graphics::ColorFormat to Graphics::ColorMode, streamlined enum by removing order section and temporarily removing kFormatARGB1555 Converted cursor code to make use of _screenFormat, instead of a parameter passed directly to it by the engine. Adjusted scumm engine to account for these changes. This should probably have been two separate commits, but the changes concern the same files... svn-id: r41443 --- engines/engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 8538cc779f..87ee70b1b9 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -63,7 +63,7 @@ void initCommonGFX(bool defaultTo1XScaler); * mode. */ #ifdef ENABLE_16BIT -void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); -- cgit v1.2.3 From 8d306ebccfa7e88b2e4f4635bff3987e550f98d3 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 15 Jun 2009 09:45:19 +0000 Subject: Added kUnsupportedColorMode error code brought Scumm engine and SDL backend into compliance with API outlined in http://scummvmupthorn09.wordpress.com/2009/06/14/how-this-is-going-to-work/ Provided convenient Graphics::PixelFormat constructors for ColorMode enums, and bitformat integers. Removed last vestiges (I think) of initial cursor hack. svn-id: r41539 --- engines/engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 87ee70b1b9..1ea1b70b5d 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -63,7 +63,7 @@ void initCommonGFX(bool defaultTo1XScaler); * mode. */ #ifdef ENABLE_16BIT -void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); -- cgit v1.2.3 From f7dd1c15ed38418a0371032966144eb6c2e004cb Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 20 Jun 2009 05:23:09 +0000 Subject: renamed ENABLE_16BIT define to more accurate ENABLE_RGB_COLOR svn-id: r41696 --- engines/engine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 1ea1b70b5d..864450d6e1 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,7 +29,7 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" #endif @@ -62,7 +62,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); -- cgit v1.2.3 From 853aec05ba4485f0bfc90e7515322dfd56a8d4af Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 27 Jun 2009 05:58:44 +0000 Subject: changed initGraphics, and OSystem::initSize to take Graphics::PixelFormat * parameters instead of Graphics::PixelFormat parameters, to save unnecessary pixelformat initialization if ENABLE_RGB_COLOR is not set. svn-id: r41909 --- engines/engine.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 864450d6e1..67454629e7 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,9 +29,7 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" -#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" -#endif class OSystem; @@ -62,10 +60,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -#ifdef ENABLE_RGB_COLOR -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); -#endif -void initGraphics(int width, int height, bool defaultTo1xScaler); +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format = NULL); /** * Initializes graphics and shows error message. -- cgit v1.2.3 From 9e1916bcad3cc33a870bdbff5bd01b39e523492d Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Tue, 30 Jun 2009 07:30:57 +0000 Subject: renamed kTransactionPixelFormatNotSupported to kTransactionFormatNotSupported, retyped all Graphics::PixelFormat * parameters to const Graphics::PixelFormat *, (hopefully) repaired all memory leaks on screen and cursor format changes, provided OSystem::getScreenFormat and OSystem::getSupportedFormats methods for when ENABLE_RGB_COLOR is not set, completely forgot the "commit early, commit often" mantra. svn-id: r41972 --- engines/engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 67454629e7..d59e8ed9bd 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -60,7 +60,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format = NULL); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); /** * Initializes graphics and shows error message. -- cgit v1.2.3 From 22e09bedaaf125365c6905187db80e939a86df53 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 6 Jul 2009 07:40:28 +0000 Subject: Updated doxygen comments on API functions svn-id: r42166 --- engines/engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index c643d5895f..d570f18073 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -59,6 +59,8 @@ void initCommonGFX(bool defaultTo1XScaler); * * Errors out when backend is not able to switch to the specified * mode. + * + * Defaults to 256 color paletted mode if no graphics format is provided. */ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); -- cgit v1.2.3 From 2f370ef8ab65db8443c496c47de98740b31c4220 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 10 Jul 2009 10:43:48 +0000 Subject: Overloaded initGraphics to provide for simpler procedures for engines supporting more than one format. svn-id: r42330 --- engines/engine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index d570f18073..0f5585378b 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -62,7 +62,9 @@ void initCommonGFX(bool defaultTo1XScaler); * * Defaults to 256 color paletted mode if no graphics format is provided. */ -void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); +void initGraphics(int width, int height, bool defaultTo1xScaler); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List &formatList); /** * Initializes graphics and shows error message. -- cgit v1.2.3 From ddcab8169f45055c8272648279c3dd96432ba956 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 10 Jul 2009 10:47:25 +0000 Subject: updated comment on initGraphics as I should have done before commiting r42330. svn-id: r42332 --- engines/engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/engine.h') diff --git a/engines/engine.h b/engines/engine.h index 0f5585378b..cd39c0065d 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -61,6 +61,8 @@ void initCommonGFX(bool defaultTo1XScaler); * mode. * * Defaults to 256 color paletted mode if no graphics format is provided. + * Uses the backend's preferred format if graphics format pointer is NULL. + * Finds the best compatible format if a list of graphics formats is provided. */ void initGraphics(int width, int height, bool defaultTo1xScaler); void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format); -- cgit v1.2.3