aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorStrangerke2012-06-27 22:12:37 +0200
committerStrangerke2012-06-27 22:12:37 +0200
commitee14ef5348a38dd578e1f17f22c897f8ed9607a0 (patch)
tree49b11835d484defb18ed4b664e5bc473a5c09143 /engines/cge
parentf32c9a7735352784a501bf70a71137478cf9946f (diff)
downloadscummvm-rg350-ee14ef5348a38dd578e1f17f22c897f8ed9607a0.tar.gz
scummvm-rg350-ee14ef5348a38dd578e1f17f22c897f8ed9607a0.tar.bz2
scummvm-rg350-ee14ef5348a38dd578e1f17f22c897f8ed9607a0.zip
CGE: Add ending message to tell the user he finished the game. Fix bug #3538396
Diffstat (limited to 'engines/cge')
-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,