[Scummvm-git-logs] scummvm master -> da960cd939c32c15f13a37e6c5c554046c95b5c3

sev- sev at scummvm.org
Sun Apr 18 13:28:55 UTC 2021


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

Summary:
601de67de1 GRAPHICS: Add a basic keyBlit() function
8dda238e6a GRAPHICS: Avoid modifying the built-in Topaz font data
376defbdbf GUI: Minor simplification to the EE graphics code
ac15a0017a GUI: Fix screen resizing when EE is active
da960cd939 GUI: Add EE to the GUI keymap


Commit: 601de67de170e0b82636424ad662b32d5ccf6095
    https://github.com/scummvm/scummvm/commit/601de67de170e0b82636424ad662b32d5ccf6095
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-04-18T15:28:51+02:00

Commit Message:
GRAPHICS: Add a basic keyBlit() function

Changed paths:
    graphics/conversion.cpp
    graphics/conversion.h


diff --git a/graphics/conversion.cpp b/graphics/conversion.cpp
index 0ff2c6e674..edbe8df248 100644
--- a/graphics/conversion.cpp
+++ b/graphics/conversion.cpp
@@ -50,6 +50,53 @@ void copyBlit(byte *dst, const byte *src,
 
 namespace {
 
+template<typename Size>
+inline void keyBlitLogic(byte *dst, const byte *src, const uint w, const uint h,
+						 const uint srcDelta, const uint dstDelta, const uint32 key) {
+	for (uint y = 0; y < h; ++y) {
+		for (uint x = 0; x < w; ++x) {
+			uint32 color = *(const Size *)src;
+			if (color != key)
+				*(Size *)dst = color;
+
+			src += sizeof(Size);
+			dst += sizeof(Size);
+		}
+
+		src += srcDelta;
+		dst += dstDelta;
+	}
+}
+
+} // End of anonymous namespace
+
+// Function to blit a rect with a transparent color key
+bool keyBlit(byte *dst, const byte *src,
+			   const uint dstPitch, const uint srcPitch,
+			   const uint w, const uint h,
+			   const uint bytesPerPixel, const uint32 key) {
+	if (dst == src)
+		return true;
+
+	// Faster, but larger, to provide optimized handling for each case.
+	const uint srcDelta = (srcPitch - w * bytesPerPixel);
+	const uint dstDelta = (dstPitch - w * bytesPerPixel);
+
+	if (bytesPerPixel == 1) {
+		keyBlitLogic<uint8>(dst, src, w, h, srcDelta, dstDelta, key);
+	} else if (bytesPerPixel == 2) {
+		keyBlitLogic<uint16>(dst, src, w, h, srcDelta, dstDelta, key);
+	} else if (bytesPerPixel == 4) {
+		keyBlitLogic<uint32>(dst, src, w, h, srcDelta, dstDelta, key);
+	} else {
+		return false;
+	}
+
+	return true;
+}
+
+namespace {
+
 template<typename SrcColor, typename DstColor, bool backward>
 inline void crossBlitLogic(byte *dst, const byte *src, const uint w, const uint h,
 						   const PixelFormat &srcFmt, const PixelFormat &dstFmt,
diff --git a/graphics/conversion.h b/graphics/conversion.h
index 4729bc2e72..02d989495f 100644
--- a/graphics/conversion.h
+++ b/graphics/conversion.h
@@ -70,6 +70,22 @@ void copyBlit(byte *dst, const byte *src,
 			   const uint w, const uint h,
 			   const uint bytesPerPixel);
 
+/**
+ * Blits a rectangle with a transparent color key.
+ *
+ * @param dst			the buffer which will recieve the converted graphics data
+ * @param src			the buffer containing the original graphics data
+ * @param dstPitch		width in bytes of one full line of the dest buffer
+ * @param srcPitch		width in bytes of one full line of the source buffer
+ * @param w				the width of the graphics data
+ * @param h				the height of the graphics data
+ * @param bytesPerPixel	the number of bytes per pixel
+ * @param key			the transparent color key
+ */
+bool keyBlit(byte *dst, const byte *src,
+			   const uint dstPitch, const uint srcPitch,
+			   const uint w, const uint h,
+			   const uint bytesPerPixel, const uint32 key);
 /**
  * Blits a rectangle from one graphical format to another.
  *


Commit: 8dda238e6aedbf1cb4fbaab72388d8e719eb122a
    https://github.com/scummvm/scummvm/commit/8dda238e6aedbf1cb4fbaab72388d8e719eb122a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-04-18T15:28:51+02:00

Commit Message:
GRAPHICS: Avoid modifying the built-in Topaz font data

Changed paths:
    graphics/fonts/amigafont.cpp
    graphics/fonts/amigafont.h


diff --git a/graphics/fonts/amigafont.cpp b/graphics/fonts/amigafont.cpp
index 5c051e36f4..2a38096067 100644
--- a/graphics/fonts/amigafont.cpp
+++ b/graphics/fonts/amigafont.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "common/stream.h"
+#include "common/memstream.h"
 #include "common/textconsole.h"
 #include "graphics/surface.h"
 #include "graphics/fonts/amigafont.h"
@@ -28,7 +29,7 @@
 namespace Graphics {
 
 // For the data source and license look into gui/themes/fonts/topaz in ScummVM distribution
-static byte amigaTopazFont[2600] = {
+static const byte amigaTopazFont[2600] = {
 	0x00, 0x00, 0x03, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x79, 0x00, 0x00, 0x03, 0xe9, 0x00, 0x00, 0x02, 0x79,
 	0x70, 0xff, 0x4e, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
@@ -195,17 +196,22 @@ static byte amigaTopazFont[2600] = {
 };
 
 AmigaFont::AmigaFont(Common::SeekableReadStream *stream) {
+	Common::SeekableReadStream *tmp;
 	if (!stream) {
-		_data = amigaTopazFont + 32; // skips dummy header
-		_needCleanup = false;
+		tmp = new Common::MemoryReadStream(amigaTopazFont, sizeof(amigaTopazFont), DisposeAfterUse::NO);
 	} else {
-		stream->seek(32);	// skips dummy header
+		tmp = stream;
+	}
+
+	tmp->seek(32);	// skips dummy header
 
-		uint dataSize = stream->size() - stream->pos();
-		_data = (byte *)malloc(dataSize);
-		stream->read(_data, dataSize);
+	uint dataSize = tmp->size() - tmp->pos();
+	_data = (byte *)malloc(dataSize);
+	tmp->read(_data, dataSize);
 
-		_needCleanup = true;
+	if (tmp != stream) {
+		delete tmp;
+		tmp = nullptr;
 	}
 
 	_font = (AmigaDiskFont *)(_data + 78);
@@ -239,8 +245,7 @@ AmigaFont::AmigaFont(Common::SeekableReadStream *stream) {
 }
 
 AmigaFont::~AmigaFont() {
-	if (_needCleanup)
-		free(_data);
+	free(_data);
 }
 
 int AmigaFont::getFontHeight() const {
diff --git a/graphics/fonts/amigafont.h b/graphics/fonts/amigafont.h
index 068f13b152..7fa3fd4325 100644
--- a/graphics/fonts/amigafont.h
+++ b/graphics/fonts/amigafont.h
@@ -64,8 +64,6 @@ class AmigaFont : public Font {
 	uint32			_pitch;
 	int             _maxCharWidth;
 
-	bool            _needCleanup;
-
 private:
 	uint16 getPixels(byte c) const;
 	uint16 getOffset(byte c) const;


Commit: 376defbdbfa64e0885849667d3c0d0a552fbcffe
    https://github.com/scummvm/scummvm/commit/376defbdbfa64e0885849667d3c0d0a552fbcffe
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-04-18T15:28:51+02:00

Commit Message:
GUI: Minor simplification to the EE graphics code

Changed paths:
    gui/about.cpp


diff --git a/gui/about.cpp b/gui/about.cpp
index 75ea76fbf2..894c417533 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -27,6 +27,7 @@
 #include "common/system.h"
 #include "common/translation.h"
 #include "common/util.h"
+#include "graphics/conversion.h"
 #include "graphics/surface.h"
 #include "graphics/fonts/amigafont.h"
 #include "gui/about.h"
@@ -413,7 +414,7 @@ private:
 	float _scale;
 	bool _inited;
 
-	uint32 _colorBlue, _colorOrange;
+	uint32 _colorBlack, _colorBlue, _colorOrange, _colorKey;
 
 	void cls(bool update = true);
 	void loadSounds();
@@ -474,8 +475,10 @@ EE::EE() {
 	_format = g_system->getOverlayFormat();
 	_back.create(_windowW, _windowH, _format);
 
-	_colorBlue   = _format.RGBToColor(5 * 16, 7 * 16, 8 * 16);
-	_colorOrange = _format.RGBToColor(15 * 16, 7 * 16, 8 * 16);
+	_colorBlack  = _format.RGBToColor( 0 * 16,  0 * 16,  0 * 16);
+	_colorBlue   = _format.RGBToColor( 5 * 16,  7 * 16,  8 * 16);
+	_colorOrange = _format.RGBToColor(15 * 16,  7 * 16,  8 * 16);
+	_colorKey    = _colorBlack;
 
 	init();
 }
@@ -486,7 +489,7 @@ EE::~EE() {
 }
 
 void EE::cls(bool update) {
-	_back.fillRect(Common::Rect(0, 0, _windowW, _windowH), 0);
+	_back.fillRect(Common::Rect(0, 0, _windowW, _windowH), _colorBlack);
 
 	if (update)
 		g_system->copyRectToOverlay(_back.getPixels(), _back.pitch, _windowX, _windowY, _windowW, _windowH);
@@ -1110,26 +1113,7 @@ void EE::draw(int sn, int x1, int y1) {
 	int x = x1 * _scale;
 	int y = y1 * _scale;
 
-	if (_back.format.bytesPerPixel == 2) {
-		for (int y_ = 0; y_ < _sp[sn].h; y_++) {
-			uint16 *src = (uint16 *)_sp[sn].getBasePtr(0, y_);
-			uint16 *dst = (uint16 *)_back.getBasePtr(x, y + y_);
-
-			for (int x_ = 0; x_ < _sp[sn].w; x_++, dst++, src++)
-				if (*src != 0)
-					*dst = *src;
-		}
-	} else {
-		for (int y_ = 0; y_ < _sp[sn].h; y_++) {
-			uint32 *src = (uint32 *)_sp[sn].getBasePtr(0, y_);
-			uint32 *dst = (uint32 *)_back.getBasePtr(x, y + y_);
-
-			for (int x_ = 0; x_ < _sp[sn].w; x_++, dst++, src++)
-				if (*src != 0 && *src != 0xff000000 && *src != 0xff)
-					*dst = *src;
-		}
-	}
-
+	Graphics::keyBlit((byte *)_back.getBasePtr(x, y), (const byte *)_sp[sn].getPixels(), _back.pitch, _sp[sn].pitch, _sp[sn].w, _sp[sn].h, _back.format.bytesPerPixel, _colorKey);
 	g_system->copyRectToOverlay(_back.getBasePtr(x, y), _back.pitch, _windowX + x, _windowY + y, _sp[sn].w, _sp[sn].h);
 }
 
@@ -1354,10 +1338,7 @@ void EE::genSprites() {
 
 				pixels >>= 1;
 
-				if (_back.format.bytesPerPixel == 2)
-					*((uint16 *)tmp.getBasePtr(posx, posy)) = (uint16)palette[color + 8];
-				else if (_back.format.bytesPerPixel == 4)
-					*((uint32 *)tmp.getBasePtr(posx, posy)) = palette[color + 8];
+				tmp.setPixel(posx, posy, palette[color + 8]);
 			}
 		}
 
@@ -1388,10 +1369,7 @@ void EE::genSprites() {
 				if (x == 15)
 					pixels = *ptr;
 
-				if (_back.format.bytesPerPixel == 2)
-					*((uint16 *)tmp.getBasePtr(posx, y)) = (uint16)palette[color + 4 * (s / 3)];
-				else if (_back.format.bytesPerPixel == 4)
-					*((uint32 *)tmp.getBasePtr(posx, y)) = palette[color + 4 * (s / 3)];
+				tmp.setPixel(posx, y, palette[color + 4 * (s / 3)]);
 			}
 		}
 
@@ -1407,7 +1385,7 @@ void EE::genSprites() {
 	tmp.create(w, h, g_system->getOverlayFormat());
 	for (int hl = 0; hl < 2; hl++) {
 		for (int i = 0; i < 6; i++) {
-			tmp.fillRect(Common::Rect(0, 0, w, h), hl == 1 ? _colorBlue : 0);
+			tmp.fillRect(Common::Rect(0, 0, w, h), hl == 1 ? _colorBlue : _colorKey);
 
 			char buf[100];
 			int c;
@@ -1415,7 +1393,7 @@ void EE::genSprites() {
 				buf[c] = codes[c + 23 * i] - 3 - c % 6;
 			buf[c] = 0;
 
-			int c1 = i == 0 ? _colorOrange : hl == 1 ? 0 : _colorBlue;
+			int c1 = i == 0 ? _colorOrange : hl == 1 ? _colorKey : _colorBlue;
 
 			_font.drawString(&tmp, buf, 0, 1, w, c1, Graphics::kTextAlignLeft, 0, false);
 
@@ -1431,7 +1409,7 @@ void EE::genSprites() {
 	h = 10;
 	tmp.create(w, h, g_system->getOverlayFormat());
 	for (int i = 0; i < 12; i++) {
-		tmp.fillRect(Common::Rect(0, 0, w, h), 0);
+		tmp.fillRect(Common::Rect(0, 0, w, h), _colorKey);
 
 		char buf[2];
 		buf[0] = i == 10 ? '*' : i == 11 ? ' ' : '0' + i;


Commit: ac15a0017a74094582009ad04225b58cc87bcfd0
    https://github.com/scummvm/scummvm/commit/ac15a0017a74094582009ad04225b58cc87bcfd0
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-04-18T15:28:51+02:00

Commit Message:
GUI: Fix screen resizing when EE is active

Changed paths:
    gui/about.cpp


diff --git a/gui/about.cpp b/gui/about.cpp
index 894c417533..009dcd5702 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -436,7 +436,7 @@ private:
 	void game();
 	void playSound(int d);
 
-	void genSprites();
+	void setupGraphics();
 	void genField();
 };
 
@@ -455,31 +455,6 @@ bool EEHandler::handleKeyDown(Common::KeyState &state) {
 }
 
 EE::EE() {
-	if (g_system->getOverlayWidth() < 320 || g_system->getOverlayHeight() < 200) {
-		warning("EE: Screen is too small");
-		_inited = false;
-
-		return;
-	}
-
-	// Determine scale factor
-	float scaleX = g_system->getOverlayWidth() * 0.9 / 320;
-	float scaleY = g_system->getOverlayHeight() * 0.9 / 200;
-	_scale = MAX(1.0f, MIN(scaleX, scaleY));
-
-	_windowW = 320 * _scale;
-	_windowH = 200 * _scale;
-	_windowX = (g_system->getOverlayWidth() > 320) ? (g_system->getOverlayWidth() - _windowW) / 2 : 0;
-	_windowY = (g_system->getOverlayHeight() > 200) ? (g_system->getOverlayHeight() - _windowH) / 2 : 0;
-
-	_format = g_system->getOverlayFormat();
-	_back.create(_windowW, _windowH, _format);
-
-	_colorBlack  = _format.RGBToColor( 0 * 16,  0 * 16,  0 * 16);
-	_colorBlue   = _format.RGBToColor( 5 * 16,  7 * 16,  8 * 16);
-	_colorOrange = _format.RGBToColor(15 * 16,  7 * 16,  8 * 16);
-	_colorKey    = _colorBlack;
-
 	init();
 }
 
@@ -501,7 +476,7 @@ void EE::run() {
 
 	_shouldQuit = false;
 
-	genSprites();
+	setupGraphics();
 
 	init();
 
@@ -513,6 +488,10 @@ void EE::run() {
 			case Common::EVENT_RETURN_TO_LAUNCHER:
 				_shouldQuit = true;
 				break;
+			case Common::EVENT_SCREEN_CHANGED:
+				if (g_gui.checkScreenChange())
+					setupGraphics();
+				break;
 			case Common::EVENT_LBUTTONDOWN:
 				break;
 			case Common::EVENT_KEYDOWN:
@@ -1056,8 +1035,6 @@ void EE::computer1() {
 }
 
 void EE::init() {
-	cls();
-
 	_rnd = 0;
 	_starter = _winner = _hits = 0;
 	_bvelx = _bvely = 0;
@@ -1313,7 +1290,27 @@ const char *codes =
 "Dvhgkm#Ztrsm|ffrs(#$%&'#$%&O}pes&}{1$M{tiq$%&'#$M{tiq${y5(Fsrv||hv%&'#$"
 "Hutxxxjx'~v2%N|udr%&'#Gtsw}wiw&}{1$Hutxxxjx'#$%&'(#$%W|qw$%&'(#$%&'";
 
-void EE::genSprites() {
+void EE::setupGraphics() {
+	// Determine scale factor
+	float scaleX = g_system->getOverlayWidth() * 0.9 / 320;
+	float scaleY = g_system->getOverlayHeight() * 0.9 / 200;
+	_scale = MIN(scaleX, scaleY);
+
+	_windowW = 320 * _scale;
+	_windowH = 200 * _scale;
+	_windowX = (g_system->getOverlayWidth() > 320) ? (g_system->getOverlayWidth() - _windowW) / 2 : 0;
+	_windowY = (g_system->getOverlayHeight() > 200) ? (g_system->getOverlayHeight() - _windowH) / 2 : 0;
+
+	_format = g_system->getOverlayFormat();
+	_back.create(_windowW, _windowH, _format);
+
+	_colorBlack  = _format.RGBToColor( 0 * 16,  0 * 16,  0 * 16);
+	_colorBlue   = _format.RGBToColor( 5 * 16,  7 * 16,  8 * 16);
+	_colorOrange = _format.RGBToColor(15 * 16,  7 * 16,  8 * 16);
+	_colorKey    = _colorBlack;
+
+	cls();
+
 	uint32 palette[12];
 	for (int i = 0; i < 10 * 3; i += 3)
 		palette[i / 3] = _back.format.RGBToColor(spcolors[i] * 16, spcolors[i + 1] * 16, spcolors[i + 2] * 16);


Commit: da960cd939c32c15f13a37e6c5c554046c95b5c3
    https://github.com/scummvm/scummvm/commit/da960cd939c32c15f13a37e6c5c554046c95b5c3
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-04-18T15:28:51+02:00

Commit Message:
GUI: Add EE to the GUI keymap

Changed paths:
    backends/keymapper/standard-actions.cpp
    backends/keymapper/standard-actions.h
    engines/pegasus/pegasus.cpp
    engines/wintermute/keymapper_tables.h
    gui/gui-manager.cpp


diff --git a/backends/keymapper/standard-actions.cpp b/backends/keymapper/standard-actions.cpp
index 9bb13eed91..0f2dab111c 100644
--- a/backends/keymapper/standard-actions.cpp
+++ b/backends/keymapper/standard-actions.cpp
@@ -38,5 +38,6 @@ const char *kStandardActionOpenMainMenu  = "MENU";
 const char *kStandardActionLoad          = "LOAD";
 const char *kStandardActionSave          = "SAVE";
 const char *kStandardActionOpenSettings  = "OPTS";
+const char *kStandardActionEE            = "WTF";
 
 } //namespace Common
diff --git a/backends/keymapper/standard-actions.h b/backends/keymapper/standard-actions.h
index 8b5b5f1205..f89e8ee1ab 100644
--- a/backends/keymapper/standard-actions.h
+++ b/backends/keymapper/standard-actions.h
@@ -52,6 +52,7 @@ extern const char *kStandardActionOpenMainMenu;
 extern const char *kStandardActionLoad;
 extern const char *kStandardActionSave;
 extern const char *kStandardActionOpenSettings;
+extern const char *kStandardActionEE;
 
 } //namespace Common
 
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 7884191bc7..1ea22f7571 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -2801,7 +2801,7 @@ Common::KeymapArray PegasusEngine::initKeymaps() {
 	// WORKAROUND: I'm also accepting 'e' here since an
 	// alt+click is often intercepted by the OS. 'e' is used as the
 	// easter egg key in Buried in Time and Legacy of Time.
-	act = new Action("WTF", _("???"));
+	act = new Action(kStandardActionEE, _("???"));
 	act->setCustomEngineActionEvent(kPegasusActionEnableEasterEgg);
 	act->addDefaultInputMapping("e");
 	engineKeyMap->addAction(act);
diff --git a/engines/wintermute/keymapper_tables.h b/engines/wintermute/keymapper_tables.h
index 62141001f0..3a1480eab1 100644
--- a/engines/wintermute/keymapper_tables.h
+++ b/engines/wintermute/keymapper_tables.h
@@ -295,7 +295,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("MOUSE_MIDDLE"); // original mouse
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_HOME);
 		act->addDefaultInputMapping("HOME"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -322,7 +322,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("JOY_RIGHT"); // extra joy
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_HOME);
 		act->addDefaultInputMapping("HOME"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -426,7 +426,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("HASH"); // original keyboard
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_HOME);
 		act->addDefaultInputMapping("HOME"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -554,7 +554,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("JOY_Y"); // extra joy
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KeyState(KEYCODE_n, 'n'));
 		act->addDefaultInputMapping("n"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -594,7 +594,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
 		gameKeyMap->addAction(act);
 	} else if (gameId == "escapemansion") {
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_F1);
 		act->addDefaultInputMapping("F1"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -732,7 +732,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		}
 
 		if (extra.hasPrefix("1.2.362.")) {
-			act = new Action("WTF", _("???"));
+			act = new Action(kStandardActionEE, _("???"));
 			act->setKeyEvent(KeyState(KEYCODE_z, 'z'));
 			act->addDefaultInputMapping("z"); // original keyboard
 			//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -940,7 +940,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("HASH"); // original keyboard
 		gameKeyMap->addAction(act);
 	} else if (gameId == "knossos") {
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KeyState(KEYCODE_a, 'a', KBD_SHIFT));
 		act->addDefaultInputMapping("S+a"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -987,7 +987,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("MOUSE_WHEEL_DOWN"); // original mouse
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_F10);
 		act->addDefaultInputMapping("F10"); // original keyboard
 		act->addDefaultInputMapping("PAGEDOWN"); // original keyboard
@@ -1219,7 +1219,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 
 		Common::String extra = ConfMan.get("extra", target);
 		if (extra.hasSuffix("2015")) {
-			act = new Action("WTF", _("???"));
+			act = new Action(kStandardActionEE, _("???"));
 			act->setKeyEvent(KeyState(KEYCODE_q, 'q'));
 			act->addDefaultInputMapping("q"); // original keyboard
 			//TODO: extra joy control, e.g. "JOY_R+JOY_A"
@@ -1441,7 +1441,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("F7"); // original keyboard
 		gameKeyMap->addAction(act);
 	} else if (gameId == "thelostcrowngha") {
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_F1);
 		act->addDefaultInputMapping("F1"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -1495,7 +1495,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("MOUSE_WHEEL_UP"); // extra mouse
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_HOME);
 		act->addDefaultInputMapping("HOME"); // original keyboard
 		//TODO: extra joy control, e.g. "JOY_R+JOY_B"
@@ -1553,7 +1553,7 @@ inline Common::KeymapArray getWintermuteKeymaps(const char *target, const Common
 		act->addDefaultInputMapping("MOUSE_WHEEL_UP"); // extra mouse
 		gameKeyMap->addAction(act);
 
-		act = new Action("WTF", _("???"));
+		act = new Action(kStandardActionEE, _("???"));
 		act->setKeyEvent(KEYCODE_HOME);
 		act->addDefaultInputMapping("HOME"); // original keyboard
 		gameKeyMap->addAction(act);
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 105aa25948..1c33fbbbf5 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -183,6 +183,12 @@ Common::Keymap *GuiManager::getKeymap() const {
 	act->addDefaultInputMapping("JOY_RIGHT");
 	guiMap->addAction(act);
 
+	act = new Action(kStandardActionEE, _("???"));
+	act->setKeyEvent(KEYCODE_v);
+	act->addDefaultInputMapping("v");
+	act->addDefaultInputMapping("JOY_RIGHT_STICK");
+	guiMap->addAction(act);
+
 	return guiMap;
 }
 




More information about the Scummvm-git-logs mailing list