[Scummvm-git-logs] scummvm master -> 5da9ba491f6f219814f8257682f13c1eefb3b322
dreammaster
noreply at scummvm.org
Tue Feb 11 05:37:57 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5da9ba491f GOT: Add support for playing shareware version
Commit: 5da9ba491f6f219814f8257682f13c1eefb3b322
https://github.com/scummvm/scummvm/commit/5da9ba491f6f219814f8257682f13c1eefb3b322
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-10T21:37:11-08:00
Commit Message:
GOT: Add support for playing shareware version
Note that technically the shareware version has a different
splash screen that isn't implemented, plus it shows some
ordering screens on exit that likewise isn't supported.
Changed paths:
engines/got/events.cpp
engines/got/vars.cpp
engines/got/views/dialogs/main_menu.cpp
engines/got/views/story.cpp
diff --git a/engines/got/events.cpp b/engines/got/events.cpp
index b15363048b2..d2256760aa1 100644
--- a/engines/got/events.cpp
+++ b/engines/got/events.cpp
@@ -58,7 +58,7 @@ void Events::runGame() {
saveSlot = -1;
}
if (saveSlot == -1)
- addView(isDemo() ? "Game" : "SplashScreen");
+ addView("SplashScreen");
// Main game loop
Common::Event e;
diff --git a/engines/got/vars.cpp b/engines/got/vars.cpp
index 2ee4b383f22..17ffdaa3cb3 100644
--- a/engines/got/vars.cpp
+++ b/engines/got/vars.cpp
@@ -52,10 +52,6 @@ void Vars::load() {
_musicFlag = !ConfMan.getBool("music_mute");
_soundFlag = !ConfMan.getBool("sfx_mute");
- if (g_engine->isDemo()) {
- _demo = _cheat = true;
- }
-
if (_currentLevel != 23)
_storyFlag = false;
diff --git a/engines/got/views/dialogs/main_menu.cpp b/engines/got/views/dialogs/main_menu.cpp
index bc50336ada1..2798730a60e 100644
--- a/engines/got/views/dialogs/main_menu.cpp
+++ b/engines/got/views/dialogs/main_menu.cpp
@@ -48,7 +48,16 @@ void MainMenu::selected() {
switch (_selectedItem) {
case 0:
_G(demo) = false;
- addView("SelectGame");
+
+ if (g_events->isDemo()) {
+ // The shareware release only has part 1
+ g_vars->setArea(1);
+ initGame();
+ replaceView("Story", true, true);
+ } else {
+ // Full game. Select the game part
+ addView("SelectGame");
+ }
break;
case 1:
diff --git a/engines/got/views/story.cpp b/engines/got/views/story.cpp
index c33524097e6..d6717e129ad 100644
--- a/engines/got/views/story.cpp
+++ b/engines/got/views/story.cpp
@@ -31,7 +31,9 @@ namespace Views {
#define MAX_Y 236
bool Story::msgFocus(const FocusMessage &msg) {
- resourceRead(Common::String::format("STORY%d", _G(area)), _G(tmpBuff));
+ Common::String storyName = g_events->isDemo() ? "STORY" :
+ Common::String::format("STORY%d", _G(area));
+ resourceRead(storyName, _G(tmpBuff));
byte paletteBuffer[PALETTE_SIZE] = {};
resourceRead("STORYPAL", paletteBuffer);
More information about the Scummvm-git-logs
mailing list