[Scummvm-git-logs] scummvm master -> 826ad61d866bb34c830248287f51ef4c943e10d0

dreammaster paulfgilbert at gmail.com
Sat Jul 11 16:17:02 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:
a27cadedff GLK: Move _width/_height setting to Conf class
3aa714d382 GLK: COMPREHEND: Removed deprecated setup code
826ad61d86 TINSEL: Revert accidentally committed change in English DW1 detection


Commit: a27cadedff1e1cc65810317803ae36ac817f6b3f
    https://github.com/scummvm/scummvm/commit/a27cadedff1e1cc65810317803ae36ac817f6b3f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-07-11T09:16:47-07:00

Commit Message:
GLK: Move _width/_height setting to Conf class

Changed paths:
    engines/glk/conf.cpp
    engines/glk/conf.h
    engines/glk/glk.cpp


diff --git a/engines/glk/conf.cpp b/engines/glk/conf.cpp
index a57965d5e7..d51e4321f5 100644
--- a/engines/glk/conf.cpp
+++ b/engines/glk/conf.cpp
@@ -24,7 +24,6 @@
 #include "glk/utils.h"
 #include "glk/windows.h"
 #include "common/config-manager.h"
-#include "common/system.h"
 
 namespace Glk {
 
@@ -64,17 +63,17 @@ WindowStyleStatic G_STYLES[style_NUMSTYLES] = {
 Conf *g_conf;
 
 Conf::Conf(InterpreterType interpType) : _interpType(interpType), _graphics(true),
-		_rows(25), _cols(60), _lockRows(0), _lockCols(0), _wPaddingX(0),
-		_wPaddingY(0), _wBorderX(0), _wBorderY(0), _tMarginX(7), _tMarginY(7),
-		_gamma(1.0), _borderColor(0), _borderSave(0),
+		_width(640), _height(400), _screenFormat(2, 5, 6, 5, 0, 11, 5, 0, 0),
+		_rows(25), _cols(60), _lockRows(0), _lockCols(0), _wPaddingX(0), _wPaddingY(0),
+		_wBorderX(0), _wBorderY(0), _tMarginX(7), _tMarginY(7), _gamma(1.0),
+		_borderColor(0), _borderSave(0),
 		_windowColor(parseColor(WHITE)), _windowSave(parseColor(WHITE)),
 		_sound(true), _speak(false), _speakInput(false), _styleHint(1),
 		_scrollBg(parseColor(SCROLL_BG)), _scrollFg(parseColor(SCROLL_FG)),
-		_lcd(1), _scrollWidth(0), _safeClicks(false)
-{
+		_lcd(1), _scrollWidth(0), _safeClicks(false) {
 	g_conf = this;
-	_imageW = g_system->getWidth();
-	_imageH = g_system->getHeight();
+	_imageW = _width;
+	_imageH = _height;
 
 	_propInfo._morePrompt = "\207 more \207";
 	_propInfo._moreColor = 0;
@@ -105,7 +104,7 @@ Conf::Conf(InterpreterType interpType) : _interpType(interpType), _graphics(true
 	_wMarginY = _wMarginSaveY = DEFAULT_MARGIN_Y;
 
 	// For simplicity's sake, only allow graphics when in non-paletted graphics modes
-	if (g_system->getScreenFormat().bytesPerPixel == 1)
+	if (_screenFormat.bytesPerPixel == 1)
 		_graphics = false;
 
 	Common::copy(T_STYLES, T_STYLES + style_NUMSTYLES, _tStyles);
@@ -116,6 +115,8 @@ Conf::Conf(InterpreterType interpType) : _interpType(interpType), _graphics(true
 }
 
 void Conf::load() {
+	get("width", _width);
+	get("height", _height);
 	get("moreprompt", _propInfo._morePrompt);
 	get("morecolor", _propInfo._moreColor);
 	get("morecolor", _propInfo._moreSave);
@@ -128,6 +129,9 @@ void Conf::load() {
 	get("rows", _rows);
 	get("cols", _cols);
 
+	_imageW = _width;
+	_imageH = _height;
+
 	if (ConfMan.hasKey("leading"))
 		_monoInfo._leading = _propInfo._leading = static_cast<int>(atof(ConfMan.get("leading").c_str()) + 0.5);
 	if (ConfMan.hasKey("baseline"))
@@ -285,14 +289,14 @@ uint Conf::parseColor(const Common::String &str) {
 		rv = strtol(r, nullptr, 16);
 		gv = strtol(g, nullptr, 16);
 		bv = strtol(b, nullptr, 16);
-		return g_system->getScreenFormat().RGBToColor(rv, gv, bv);
+		return _screenFormat.RGBToColor(rv, gv, bv);
 	}
 
 	return 0;
 }
 
 uint Conf::parseColor(const byte *rgb) {
-	return g_system->getScreenFormat().RGBToColor(rgb[0], rgb[1], rgb[2]);
+	return _screenFormat.RGBToColor(rgb[0], rgb[1], rgb[2]);
 }
 
 } // End of namespace Glk
diff --git a/engines/glk/conf.h b/engines/glk/conf.h
index 5c0fef74df..ea48ccca4c 100644
--- a/engines/glk/conf.h
+++ b/engines/glk/conf.h
@@ -26,6 +26,7 @@
 #include "glk/glk_types.h"
 #include "glk/fonts.h"
 #include "glk/windows.h"
+#include "graphics/pixelformat.h"
 
 namespace Glk {
 
@@ -70,14 +71,16 @@ public:
 	/**
 	 * Parse a color
 	 */
-	static uint parseColor(const Common::String &str);
+	uint parseColor(const Common::String &str);
 
 	/**
 	 * Convert an RGB tuplet to a color
 	 */
-	static uint parseColor(const byte *rgb);
+	uint parseColor(const byte *rgb);
 
 public:
+	uint _width, _height;
+	Graphics::PixelFormat _screenFormat;
 	MonoFontInfo _monoInfo;
 	PropFontInfo _propInfo;
 	int _cols, _rows;
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp
index ab1ac80fa3..b146f0b02e 100644
--- a/engines/glk/glk.cpp
+++ b/engines/glk/glk.cpp
@@ -81,12 +81,12 @@ GlkEngine::~GlkEngine() {
 }
 
 void GlkEngine::initialize() {
-	initGraphicsMode();
-	createDebugger();
-
 	createConfiguration();
 	_conf->load();
 
+	initGraphicsMode();
+	createDebugger();
+
 	_screen = createScreen();
 	_screen->initialize();
 	_clipboard = new Clipboard();
@@ -107,19 +107,7 @@ Screen *GlkEngine::createScreen() {
 }
 
 void GlkEngine::initGraphicsMode() {
-	uint width = ConfMan.hasKey("width") ? ConfMan.getInt("width") : 640;
-	uint height = ConfMan.hasKey("height") ? ConfMan.getInt("height") : 480;
-	Common::List<Graphics::PixelFormat> formats = g_system->getSupportedFormats();
-	Graphics::PixelFormat format = formats.front();
-
-	for (Common::List<Graphics::PixelFormat>::iterator i = formats.begin(); i != formats.end(); ++i) {
-		if ((*i).bytesPerPixel > 1) {
-			format = *i;
-			break;
-		}
-	}
-
-	initGraphics(width, height, &format);
+	initGraphics(_conf->_width, _conf->_height, &_conf->_screenFormat);
 }
 
 void GlkEngine::createDebugger() {
@@ -287,8 +275,8 @@ void GlkEngine::beep() {
 }
 
 void GlkEngine::switchToWhiteOnBlack() {
-	const uint WHITE = Conf::parseColor("ffffff");
-	const uint BLACK = Conf::parseColor("000000");
+	const uint WHITE = _conf->parseColor("ffffff");
+	const uint BLACK = _conf->parseColor("000000");
 
 	_conf->_wMarginX = 0;
 	_conf->_wMarginY = 0;


Commit: 3aa714d382051787809f3c968c55414913128e8c
    https://github.com/scummvm/scummvm/commit/3aa714d382051787809f3c968c55414913128e8c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-07-11T09:16:47-07:00

Commit Message:
GLK: COMPREHEND: Removed deprecated setup code

Changed paths:
    engines/glk/comprehend/comprehend.cpp


diff --git a/engines/glk/comprehend/comprehend.cpp b/engines/glk/comprehend/comprehend.cpp
index 07e7225f50..422da185b6 100644
--- a/engines/glk/comprehend/comprehend.cpp
+++ b/engines/glk/comprehend/comprehend.cpp
@@ -86,13 +86,7 @@ void Comprehend::initialize() {
 
 	showGraphics();
 	_topWindow->fillRect(0, Rect(0, 0, _topWindow->_w, _topWindow->_h));
-/*
-	const Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
-	_bottomWindow->_stream->setZColors(
-		pixelFormat.RGBToColor(0xff, 0xff, 0xff),
-		pixelFormat.RGBToColor(0, 0, 0)
-	);
-*/
+
 	// Initialize drawing surface, and the archive that abstracts
 	// the room and item graphics as as individual files
 	_drawSurface = new DrawSurface();


Commit: 826ad61d866bb34c830248287f51ef4c943e10d0
    https://github.com/scummvm/scummvm/commit/826ad61d866bb34c830248287f51ef4c943e10d0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-07-11T09:16:47-07:00

Commit Message:
TINSEL: Revert accidentally committed change in English DW1 detection

Changed paths:
    engines/tinsel/detection_tables.h


diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index c623d1f0af..88e5e1cf33 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -384,10 +384,10 @@ static const TinselGameDescription gameDescriptions[] = {
 			"CD",
 			{
 				{"dw.scn", 0, "70955425870c7720d6eebed903b2ef41", 776188},
-				{"japanese.smp", 0, NULL, -1},
+				{"english.smp", 0, NULL, -1},
 				AD_LISTEND
 			},
-			Common::JA_JPN,
+			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_CD | ADGF_UNSTABLE,
 			GUIO0()




More information about the Scummvm-git-logs mailing list