Skip to content

Commit

Permalink
CGE: Add ending message to tell the user he finished the game. Fix bu…
Browse files Browse the repository at this point in the history
…g #3538396
  • Loading branch information
Strangerke committed Jun 27, 2012
1 parent f32c9a7 commit ee14ef5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions engines/cge/cge.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 2 additions & 0 deletions engines/cge/cge.h
Expand Up @@ -78,6 +78,8 @@ class Talk;
#define kMapZCnt 20
#define kMapTop 80

#define kSayTheEnd 41

// our engine debug channels
enum {
kCGEDebugBitmap = 1 << 0,
Expand Down

0 comments on commit ee14ef5

Please sign in to comment.