aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge/cge.cpp12
-rw-r--r--engines/cge/cge.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 8ddb9be140..09fce6323c 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -30,6 +30,8 @@
#include "common/fs.h"
#include "engines/advancedDetector.h"
#include "engines/util.h"
+#include "gui/message.h"
+
#include "cge/cge.h"
#include "cge/vga13h.h"
#include "cge/cge_main.h"
@@ -195,6 +197,16 @@ Common::Error CGEEngine::run() {
// Run the game
cge_main();
+ // If game is finished, display ending message
+ if (_flag[3]) {
+ Common::String msg = Common::String(_text->getText(kSayTheEnd));
+ if (msg.size() != 0) {
+ g_system->delayMillis(10);
+ GUI::MessageDialog dialog(msg, "OK");
+ dialog.runModal();
+ }
+ }
+
// Remove game objects
deinit();
diff --git a/engines/cge/cge.h b/engines/cge/cge.h
index 4ebc836ee0..a5c6a62e34 100644
--- a/engines/cge/cge.h
+++ b/engines/cge/cge.h
@@ -78,6 +78,8 @@ class Talk;
#define kMapZCnt 20
#define kMapTop 80
+#define kSayTheEnd 41
+
// our engine debug channels
enum {
kCGEDebugBitmap = 1 << 0,