diff options
author | Benjamin Haisch | 2008-09-16 07:20:44 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:06 +0100 |
commit | 3b89304dd970f2e29e48b6c28fac293c40a5a88d (patch) | |
tree | dc1b5b64cc23a4e482ff9e84586370f477b13985 /engines/toltecs/toltecs.cpp | |
parent | d09fbbabe66b583d06482a5b25f46b2eebf63d1e (diff) | |
download | scummvm-rg350-3b89304dd970f2e29e48b6c28fac293c40a5a88d.tar.gz scummvm-rg350-3b89304dd970f2e29e48b6c28fac293c40a5a88d.tar.bz2 scummvm-rg350-3b89304dd970f2e29e48b6c28fac293c40a5a88d.zip |
TOLTECS: Forgot script.cpp.
And some tests for menu & movie player in toltecs.cpp.
Diffstat (limited to 'engines/toltecs/toltecs.cpp')
-rw-r--r-- | engines/toltecs/toltecs.cpp | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp index 6bc13401f7..b6d96330f3 100644 --- a/engines/toltecs/toltecs.cpp +++ b/engines/toltecs/toltecs.cpp @@ -39,12 +39,16 @@ #include "toltecs/toltecs.h" #include "toltecs/animation.h" +#include "toltecs/menu.h" +#include "toltecs/movie.h" #include "toltecs/palette.h" #include "toltecs/resource.h" #include "toltecs/script.h" #include "toltecs/screen.h" #include "toltecs/segmap.h" +#include "toltecs/microtiles.h" + namespace Toltecs { struct GameSettings { @@ -130,14 +134,54 @@ int ToltecsEngine::go() { _anim = new AnimationPlayer(this); _palette = new Palette(this); _segmap = new SegmentMap(this); + _moviePlayer = new MoviePlayer(this); + _menuSystem = new MenuSystem(this); _system->showMouse(true); -#if 1 +//#define TEST_MOVIE +#ifdef TEST_MOVIE + _screen->registerFont(0, 0x0D); + _screen->registerFont(1, 0x0E); + _moviePlayer->playMovie(0x000012D8); +#endif + +//#define TEST_MENU +#ifdef TEST_MENU + _screen->registerFont(0, 0x0D); + _screen->registerFont(1, 0x0E); + _screen->loadMouseCursor(12); + _palette->loadAddPalette(9, 224); + _palette->setDeltaPalette(_palette->getMainPalette(), 7, 0, 31, 224); + _screen->finishTextDrawItems(); + _screen->clearSprites(); + while (1) { + updateInput(); + _menuSystem->update(); + updateScreen(); + } +#endif +//#define TEST_MICROTILES +#ifdef TEST_MICROTILES + MicroTileArray *uta = new MicroTileArray(0, 0, 640, 480); + uta->unite(Common::Rect(10, 10, 50, 50)); + uta->unite(Common::Rect(45, 45, 60, 60)); + Common::Rect *rects; + int n_rects; + n_rects = uta->getRectangles(rects); + printf("n_rects = %d\n", n_rects); fflush(stdout); + for (int i = 0; i < n_rects; i++) { + printf("%d, %d, %d, %d\n", rects[i].left, rects[i].top, rects[i].right, rects[i].bottom); + fflush(stdout); + } + _system->quit(); + delete uta; +#endif + +#if 1 _script->loadScript(0, 0); _script->runScript(0); - #endif delete _arc; @@ -147,6 +191,8 @@ int ToltecsEngine::go() { delete _anim; delete _palette; delete _segmap; + delete _moviePlayer; + delete _menuSystem; return 0; } |