[Scummvm-git-logs] scummvm master -> 327c819216f5be428ec1a89e45c187f380693e40

elasota noreply at scummvm.org
Sat Apr 29 21:03:13 UTC 2023


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

Summary:
055ca88677 VCRUISE: Add keybind handling and pause menu.
33931b731d VCRUISE: Clean up unused and uninitialized fields.
3c97cbc1d7 VCRUISE: Upgrade Reah from Unstable to Testing.
327c819216 NEWS: Add Reah announcement


Commit: 055ca886772c284822807363ca8b0ccbed6e6715
    https://github.com/scummvm/scummvm/commit/055ca886772c284822807363ca8b0ccbed6e6715
Author: elasota (ejlasota at gmail.com)
Date: 2023-04-29T17:02:49-04:00

Commit Message:
VCRUISE: Add keybind handling and pause menu.

Changed paths:
    engines/vcruise/menu.cpp
    engines/vcruise/menu.h
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/menu.cpp b/engines/vcruise/menu.cpp
index 9ca2eda7423..accaf524e2e 100644
--- a/engines/vcruise/menu.cpp
+++ b/engines/vcruise/menu.cpp
@@ -195,6 +195,13 @@ private:
 	};
 };
 
+class ReahPauseMenuPage : public ReahMenuBarPage {
+public:
+	ReahPauseMenuPage();
+
+	void addPageContents() override;
+};
+
 class ReahMainMenuPage : public ReahMenuPage {
 public:
 	void start() override;
@@ -489,7 +496,8 @@ void ReahMenuBarPage::start() {
 	bool menuButtonsEnabled[5] = {true, true, true, true, true};
 
 	menuButtonsEnabled[1] = _menuInterface->canSave();
-	menuButtonsEnabled[_page] = false;
+	if (_page < 5)
+		menuButtonsEnabled[_page] = false;
 
 	if (graphic) {
 		for (int buttonIndex = 0; buttonIndex < 5; buttonIndex++) {
@@ -832,6 +840,25 @@ void ReahQuitMenuPage::onButtonClicked(uint button, bool &outChangedState) {
 		onButtonClicked(kMenuBarButtonReturn, outChangedState);
 }
 
+ReahPauseMenuPage::ReahPauseMenuPage() : ReahMenuBarPage(static_cast<uint>(-1)) {
+}
+
+void ReahPauseMenuPage::addPageContents() {
+	Graphics::Surface *pauseGraphic = _menuInterface->getUIGraphic(20);
+
+	Graphics::ManagedSurface *menuSurf = _menuInterface->getMenuSurface();
+
+	uint32 blackColor = menuSurf->format.RGBToColor(0, 0, 0);
+
+	menuSurf->fillRect(Common::Rect(0, 44, 640, 392), blackColor);
+
+	if (pauseGraphic)
+		menuSurf->blitFrom(*pauseGraphic, Common::Point(164, 186));
+
+	_menuInterface->commitRect(Common::Rect(0, 44, 640, 392));
+}
+
+
 void ReahMainMenuPage::start() {
 	Graphics::Surface *bgGraphic = _menuInterface->getUIGraphic(0);
 
@@ -932,4 +959,8 @@ MenuPage *createMenuReahSound() {
 	return new ReahSoundMenuPage();
 }
 
+MenuPage *createMenuReahPause() {
+	return new ReahPauseMenuPage();
+}
+
 } // End of namespace VCruise
diff --git a/engines/vcruise/menu.h b/engines/vcruise/menu.h
index cf9407a37ea..7e88f08d12d 100644
--- a/engines/vcruise/menu.h
+++ b/engines/vcruise/menu.h
@@ -82,6 +82,7 @@ MenuPage *createMenuReahMain();
 MenuPage *createMenuReahHelp();
 MenuPage *createMenuReahSound();
 MenuPage *createMenuReahQuit();
+MenuPage *createMenuReahPause();
 
 } // End of namespace VCruise
 
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index d31c08d752c..d3bbed5c0aa 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1257,6 +1257,40 @@ bool Runtime::runIdle() {
 				drawCompass();
 				return true;
 			}
+		} else if (osEvent.type == kOSEventTypeKeymappedEvent) {
+			if (!_lmbDown) {
+				switch (osEvent.keymappedEvent) {
+				case kKeymappedEventHelp:
+					if (_gameID == GID_REAH)
+						changeToMenuPage(createMenuReahHelp());
+					else
+						error("Don't have a help menu for this game");
+					return true;
+				case kKeymappedEventLoadGame:
+					if (g_engine->loadGameDialog())
+						return true;
+					break;
+				case kKeymappedEventSaveGame:
+					if (g_engine->saveGameDialog())
+						return true;
+					break;
+				case kKeymappedEventPause:
+					if (_gameID == GID_REAH)
+						changeToMenuPage(createMenuReahPause());
+					else
+						error("Don't have a pause menu for this game");
+					return true;
+				case kKeymappedEventQuit:
+					if (_gameID == GID_REAH)
+						changeToMenuPage(createMenuReahQuit());
+					else
+						error("Don't have a quit menu for this game");
+					return true;
+
+				default:
+					break;
+				}
+			}
 		}
 	}
 


Commit: 33931b731d6681955fae58d52986478cb7e98e7e
    https://github.com/scummvm/scummvm/commit/33931b731d6681955fae58d52986478cb7e98e7e
Author: elasota (ejlasota at gmail.com)
Date: 2023-04-29T17:02:50-04:00

Commit Message:
VCRUISE: Clean up unused and uninitialized fields.

Changed paths:
    engines/vcruise/runtime.cpp
    engines/vcruise/runtime.h


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index d3bbed5c0aa..a41a008e982 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -188,7 +188,7 @@ const MapScreenDirectionDef *MapDef::getScreenDirection(uint screen, uint direct
 ScriptEnvironmentVars::ScriptEnvironmentVars() : lmb(false), lmbDrag(false), esc(false), exitToMenu(false), panInteractionID(0), fpsOverride(0), lastHighlightedItem(0) {
 }
 
-OSEvent::OSEvent() : type(kOSEventTypeInvalid), keyCode(static_cast<Common::KeyCode>(0)), keymappedEvent(kKeymappedEventNone) {
+OSEvent::OSEvent() : type(kOSEventTypeInvalid), keyCode(static_cast<Common::KeyCode>(0)), keymappedEvent(kKeymappedEventNone), timestamp(0) {
 }
 
 void Runtime::RenderSection::init(const Common::Rect &paramRect, const Graphics::PixelFormat &fmt) {
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 8c00b9f01f7..b95a50f9288 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -935,7 +935,6 @@ private:
 	uint32 _ambientSoundFinishTime;
 
 	bool _escOn;
-	bool _escUsed;
 	bool _debugMode;
 	bool _fastAnimationMode;
 


Commit: 3c97cbc1d79bb89f4f31c9b02c2f0cd4c35d5b81
    https://github.com/scummvm/scummvm/commit/3c97cbc1d79bb89f4f31c9b02c2f0cd4c35d5b81
Author: elasota (ejlasota at gmail.com)
Date: 2023-04-29T17:02:50-04:00

Commit Message:
VCRUISE: Upgrade Reah from Unstable to Testing.

Changed paths:
    engines/vcruise/configure.engine
    engines/vcruise/detection_tables.h


diff --git a/engines/vcruise/configure.engine b/engines/vcruise/configure.engine
index 5e9c125583f..5f94cf67101 100644
--- a/engines/vcruise/configure.engine
+++ b/engines/vcruise/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine vcruise "V-Cruise" no "" "" "16bit highres"
+add_engine vcruise "V-Cruise" yes "" "" "16bit highres"
diff --git a/engines/vcruise/detection_tables.h b/engines/vcruise/detection_tables.h
index a6896c34f51..ef4756d51c5 100644
--- a/engines/vcruise/detection_tables.h
+++ b/engines/vcruise/detection_tables.h
@@ -37,7 +37,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
 			AD_ENTRY1s("Reah.exe", "60ec19c53f1323cc7f0314f98d396283", 304128),
 			Common::UNK_LANG,
 			Common::kPlatformWindows,
-			ADGF_UNSTABLE | VCRUISE_GF_WANT_MP3,
+			ADGF_TESTING | VCRUISE_GF_WANT_MP3,
 			GUIO0()
 		},
 		GID_REAH,
@@ -49,7 +49,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
 			AD_ENTRY1s("Reah.exe", "77bc7f7819cdd443f52b193529138c87", 305664),
 			Common::UNK_LANG,
 			Common::kPlatformWindows,
-			ADGF_UNSTABLE,
+			ADGF_TESTING,
 			GUIO0()
 		},
 		GID_REAH,


Commit: 327c819216f5be428ec1a89e45c187f380693e40
    https://github.com/scummvm/scummvm/commit/327c819216f5be428ec1a89e45c187f380693e40
Author: elasota (ejlasota at gmail.com)
Date: 2023-04-29T17:02:50-04:00

Commit Message:
NEWS: Add Reah announcement

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 7507a6d9814..2b69549e551 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -6,6 +6,7 @@ For a more comprehensive changelog of the latest experimental code, see:
  New games:
    - Added support for macOS versions of Syberia and Syberia II.
    - Added support for The Vampire Diaries and Nancy Drew: Secrets Can Kill
+   - Added support for Reah: Face the Unknown
 
  New platforms:
    - Added libretro new shiny port.




More information about the Scummvm-git-logs mailing list