[Scummvm-git-logs] scummvm master -> 9657799cef724fe182e6b79646bb245b91f2227a
dreammaster
paulfgilbert at gmail.com
Mon Jun 15 19:40:48 UTC 2020
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:
874bf6c376 GLK: COMPREHEND: Don't show picture toggled at startup
bd64a8a2cc GLK: COMPREHEND: CC: Add disk number to savegames
e63d79c0bd GLK: COMPREHEND: CC: Add title screen
9657799cef GLK: COMPREHEND: CC: Add crystal ball cutscene
Commit: 874bf6c3766ca9b6121f64d3403df8a733648617
https://github.com/scummvm/scummvm/commit/874bf6c3766ca9b6121f64d3403df8a733648617
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-15T12:40:02-07:00
Commit Message:
GLK: COMPREHEND: Don't show picture toggled at startup
Changed paths:
engines/glk/comprehend/comprehend.cpp
engines/glk/comprehend/game.cpp
diff --git a/engines/glk/comprehend/comprehend.cpp b/engines/glk/comprehend/comprehend.cpp
index 4231125b71..9a2ab3e094 100644
--- a/engines/glk/comprehend/comprehend.cpp
+++ b/engines/glk/comprehend/comprehend.cpp
@@ -225,7 +225,6 @@ void Comprehend::togglePictureVisibility() {
}
_graphicsEnabled = _topWindow != nullptr;
- print(_("Picture window toggled\n"));
}
} // namespace Comprehend
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index bd07a88349..b9903ab362 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1203,6 +1203,8 @@ void ComprehendGame::read_input() {
// Empty line, so toggle picture window visibility
g_comprehend->togglePictureVisibility();
+ g_comprehend->print(_("Picture window toggled\n"));
+
_updateFlags |= UPDATE_GRAPHICS;
update_graphics();
continue;
Commit: bd64a8a2ccb93b036461d781bbef46ab0cd4845d
https://github.com/scummvm/scummvm/commit/bd64a8a2ccb93b036461d781bbef46ab0cd4845d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-15T12:40:02-07:00
Commit Message:
GLK: COMPREHEND: CC: Add disk number to savegames
Changed paths:
engines/glk/comprehend/game_cc.cpp
engines/glk/comprehend/game_cc.h
diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index dd8840497b..fe528a4907 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -50,6 +50,11 @@ void CrimsonCrownGame::setupDisk(uint diskNum) {
_gameStrings = nullptr;
}
+void CrimsonCrownGame::synchronizeSave(Common::Serializer &s) {
+ ComprehendGame::synchronizeSave(s);
+ s.syncAsByte(_diskNum);
+}
+
void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
switch (operand) {
case 0x01:
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index cadca2f93e..abdb45ebb1 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -38,6 +38,7 @@ public:
void beforePrompt() override;
void handleSpecialOpcode(uint8 operand) override;
+ void synchronizeSave(Common::Serializer &s) override;
void setupDisk(uint diskNum);
};
Commit: e63d79c0bd31e6c689155e59117e2863afb14640
https://github.com/scummvm/scummvm/commit/e63d79c0bd31e6c689155e59117e2863afb14640
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-15T12:40:02-07:00
Commit Message:
GLK: COMPREHEND: CC: Add title screen
Changed paths:
engines/glk/comprehend/game_cc.cpp
engines/glk/comprehend/game_cc.h
diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index fe528a4907..bb0a6ac928 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -22,6 +22,7 @@
#include "glk/comprehend/game_cc.h"
#include "glk/comprehend/comprehend.h"
+#include "glk/comprehend/pics.h"
namespace Glk {
namespace Comprehend {
@@ -48,6 +49,14 @@ void CrimsonCrownGame::setupDisk(uint diskNum) {
_gameStrings = &CC1_STRINGS;
else
_gameStrings = nullptr;
+
+ _titleGraphicFile = "cctitle.ms1";
+}
+
+void CrimsonCrownGame::beforeGame() {
+ // Draw the title
+ g_comprehend->drawPicture(TITLE_IMAGE);
+ g_comprehend->readChar();
}
void CrimsonCrownGame::synchronizeSave(Common::Serializer &s) {
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index abdb45ebb1..f5d8bc45e3 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -36,6 +36,7 @@ public:
CrimsonCrownGame();
~CrimsonCrownGame() override {}
+ void beforeGame() override;
void beforePrompt() override;
void handleSpecialOpcode(uint8 operand) override;
void synchronizeSave(Common::Serializer &s) override;
Commit: 9657799cef724fe182e6b79646bb245b91f2227a
https://github.com/scummvm/scummvm/commit/9657799cef724fe182e6b79646bb245b91f2227a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-06-15T12:40:02-07:00
Commit Message:
GLK: COMPREHEND: CC: Add crystal ball cutscene
Changed paths:
engines/glk/comprehend/comprehend.cpp
engines/glk/comprehend/comprehend.h
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game_cc.cpp
engines/glk/comprehend/game_cc.h
engines/glk/comprehend/game_tr.cpp
diff --git a/engines/glk/comprehend/comprehend.cpp b/engines/glk/comprehend/comprehend.cpp
index 9a2ab3e094..7116e75a10 100644
--- a/engines/glk/comprehend/comprehend.cpp
+++ b/engines/glk/comprehend/comprehend.cpp
@@ -84,7 +84,7 @@ void Comprehend::initialize() {
_bottomWindow = (TextBufferWindow *)glk_window_open(0, 0, 0, wintype_TextBuffer, 1);
glk_set_window(_bottomWindow);
- togglePictureVisibility();
+ showGraphics();
_topWindow->fillRect(0, Rect(0, 0, _topWindow->_w, _topWindow->_h));
const Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
@@ -212,19 +212,25 @@ void Comprehend::clearScreen(bool isBright) {
drawPicture(isBright ? BRIGHT_ROOM : DARK_ROOM);
}
-void Comprehend::togglePictureVisibility() {
+void Comprehend::toggleGraphics() {
if (_topWindow) {
// Remove the picture window
glk_window_close(_topWindow);
_topWindow = nullptr;
+ _graphicsEnabled = false;
} else {
// Create the window again
+ showGraphics();
+ }
+}
+
+void Comprehend::showGraphics() {
+ if (!_topWindow) {
_topWindow = (GraphicsWindow *)glk_window_open(_bottomWindow,
winmethod_Above | winmethod_Fixed,
160 * SCALE_FACTOR, wintype_Graphics, 2);
+ _graphicsEnabled = true;
}
-
- _graphicsEnabled = _topWindow != nullptr;
}
} // namespace Comprehend
diff --git a/engines/glk/comprehend/comprehend.h b/engines/glk/comprehend/comprehend.h
index 9937280ca0..8f7ed8a350 100644
--- a/engines/glk/comprehend/comprehend.h
+++ b/engines/glk/comprehend/comprehend.h
@@ -159,7 +159,12 @@ public:
/**
* Toggles whether the picture window is visible
*/
- void togglePictureVisibility();
+ void toggleGraphics();
+
+ /**
+ * Ensures the picture window is visible
+ */
+ void showGraphics();
/**
* Returns true if the graphics area is visible
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index b9903ab362..ddec3210b9 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -1202,7 +1202,7 @@ void ComprehendGame::read_input() {
break;
// Empty line, so toggle picture window visibility
- g_comprehend->togglePictureVisibility();
+ g_comprehend->toggleGraphics();
g_comprehend->print(_("Picture window toggled\n"));
_updateFlags |= UPDATE_GRAPHICS;
diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index bb0a6ac928..09f79a6536 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -29,7 +29,7 @@ namespace Comprehend {
static const GameStrings CC1_STRINGS = {0x9};
-CrimsonCrownGame::CrimsonCrownGame() : ComprehendGame() {
+CrimsonCrownGame::CrimsonCrownGame() : ComprehendGame(), _diskNum(1) {
setupDisk(1);
}
@@ -66,19 +66,19 @@ void CrimsonCrownGame::synchronizeSave(Common::Serializer &s) {
void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
switch (operand) {
- case 0x01:
- // Enter the Vampire's throne room
+ case 1:
+ // Crystyal ball cutscene
assert(_diskNum == 1);
- eval_function(&_functions[0xe], nullptr, nullptr);
+ crystalBallCutscene();
break;
- case 0x03:
+ case 3:
// Game over - failure
setupDisk(1);
game_restart();
break;
- case 0x05:
+ case 5:
if (_diskNum == 1) {
// Finished disk 1
error("[Completed disk 1 - handle switch to disk 2]");
@@ -89,11 +89,11 @@ void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
}
break;
- case 0x06:
+ case 6:
game_save();
break;
- case 0x07:
+ case 7:
game_restore();
break;
@@ -102,6 +102,20 @@ void CrimsonCrownGame::handleSpecialOpcode(uint8 operand) {
}
}
+void CrimsonCrownGame::crystalBallCutscene() {
+ g_comprehend->showGraphics();
+
+ for (int screenNum = 38; screenNum <= 40; ++screenNum) {
+ g_comprehend->drawLocationPicture(screenNum);
+ g_comprehend->readChar();
+ if (g_comprehend->shouldQuit())
+ return;
+ }
+
+ // TODO: Is this actually a function call?
+ eval_function(&_functions[14], nullptr, nullptr);
+}
+
void CrimsonCrownGame::beforePrompt() {
// Clear the Sabrina/Erik action flags
_flags[0xa] = 0;
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index f5d8bc45e3..949fa211ad 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -32,6 +32,12 @@ class CrimsonCrownGame : public ComprehendGame {
private:
uint _diskNum;
+private:
+ /**
+ * Cutscene triggered when looking at crystal ball
+ */
+ void crystalBallCutscene();
+
public:
CrimsonCrownGame();
~CrimsonCrownGame() override {}
diff --git a/engines/glk/comprehend/game_tr.cpp b/engines/glk/comprehend/game_tr.cpp
index a7eecc4549..0c11eca08b 100644
--- a/engines/glk/comprehend/game_tr.cpp
+++ b/engines/glk/comprehend/game_tr.cpp
@@ -217,6 +217,7 @@ void TransylvaniaGame::handleSpecialOpcode(uint8 operand) {
case 5:
// Won the game
+ g_comprehend->showGraphics();
g_comprehend->drawLocationPicture(40);
game_restart();
break;
@@ -237,6 +238,7 @@ void TransylvaniaGame::handleSpecialOpcode(uint8 operand) {
case 9:
// Show the Zin screen in reponse to doing
// 'sing some enchanted evening' in his cabin.
+ g_comprehend->showGraphics();
g_comprehend->drawLocationPicture(41);
console_get_key();
_updateFlags |= UPDATE_GRAPHICS;
More information about the Scummvm-git-logs
mailing list