aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/mads.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-19 23:17:57 -0500
committerPaul Gilbert2014-02-19 23:17:57 -0500
commit58bb1383d0b11d357128ca2b0a7634f091c0fb5b (patch)
tree433248f73b9a5d6987182353e04901cda28a7002 /engines/mads/mads.cpp
parent7593ec29d060268b7102509324d83e87c4ddd77c (diff)
downloadscummvm-rg350-58bb1383d0b11d357128ca2b0a7634f091c0fb5b.tar.gz
scummvm-rg350-58bb1383d0b11d357128ca2b0a7634f091c0fb5b.tar.bz2
scummvm-rg350-58bb1383d0b11d357128ca2b0a7634f091c0fb5b.zip
MADS: Added skeleton files for the game and dialogs
Diffstat (limited to 'engines/mads/mads.cpp')
-rw-r--r--engines/mads/mads.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 36b5ec51f5..05c11409db 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -44,6 +44,7 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
_events = nullptr;
_font = nullptr;
+ _game = nullptr;
_palette = nullptr;
_resources = nullptr;
_screen = nullptr;
@@ -54,6 +55,7 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
MADSEngine::~MADSEngine() {
delete _events;
delete _font;
+ delete _game;
delete _palette;
delete _resources;
delete _screen;
@@ -77,6 +79,7 @@ void MADSEngine::initialise() {
_screen = MSurface::init(true);
_sound = new SoundManager(this, _mixer);
_userInterface = UserInterface::init(this);
+ _game = Game::init(this);
_screen->empty();
}
@@ -85,11 +88,11 @@ Common::Error MADSEngine::run() {
initGraphics(MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, false);
initialise();
- Common::Event e;
- while (!shouldQuit()) {
- g_system->getEventManager()->pollEvent(e);
- g_system->delayMillis(10);
- }
+ // Run the game
+ _game->run();
+
+ // Dummy loop to keep application active
+ _events->handleEvents();
return Common::kNoError;
}