diff options
author | Benjamin Haisch | 2008-10-14 21:12:52 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-20 22:43:07 +0100 |
commit | 4b13982116828453efd4a445328d455d9b820149 (patch) | |
tree | 1d94348ce56b4836dc0aa2d24bc43bd85284f01b /engines/toltecs/toltecs.cpp | |
parent | f77960e81b5f0b17ebddd4b640cc315bcfc6ef78 (diff) | |
download | scummvm-rg350-4b13982116828453efd4a445328d455d9b820149.tar.gz scummvm-rg350-4b13982116828453efd4a445328d455d9b820149.tar.bz2 scummvm-rg350-4b13982116828453efd4a445328d455d9b820149.zip |
TOLTECS: Implemented preliminary sound playback; some stuff is still missing (correct volumes etc.)
Diffstat (limited to 'engines/toltecs/toltecs.cpp')
-rw-r--r-- | engines/toltecs/toltecs.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp index a5c1caf89f..3aa160ac72 100644 --- a/engines/toltecs/toltecs.cpp +++ b/engines/toltecs/toltecs.cpp @@ -47,6 +47,7 @@ #include "toltecs/script.h" #include "toltecs/screen.h" #include "toltecs/segmap.h" +#include "toltecs/sound.h" #include "toltecs/microtiles.h" namespace Toltecs { @@ -134,6 +135,8 @@ int ToltecsEngine::go() { _segmap = new SegmentMap(this); _moviePlayer = new MoviePlayer(this); _menuSystem = new MenuSystem(this); + + _sound = new Sound(this); _system->showMouse(true); @@ -141,7 +144,10 @@ int ToltecsEngine::go() { #ifdef TEST_MOVIE _screen->registerFont(0, 0x0D); _screen->registerFont(1, 0x0E); - _moviePlayer->playMovie(0x000012D8); + //_moviePlayer->playMovie(0x000012D8); + //_moviePlayer->playMovie(0x000012D7); + //_moviePlayer->playMovie(0x); + _moviePlayer->playMovie(0x000012E0); #endif //#define TEST_MENU @@ -151,7 +157,7 @@ int ToltecsEngine::go() { _screen->loadMouseCursor(12); _palette->loadAddPalette(9, 224); _palette->setDeltaPalette(_palette->getMainPalette(), 7, 0, 31, 224); - _screen->finishTextDrawItems(); + _screen->finishTalkTextItems(); _screen->clearSprites(); while (1) { updateInput(); @@ -174,6 +180,8 @@ int ToltecsEngine::go() { delete _segmap; delete _moviePlayer; delete _menuSystem; + + delete _sound; return 0; } @@ -335,7 +343,7 @@ void ToltecsEngine::setGuiHeight(int16 guiHeight) { void ToltecsEngine::setCamera(int16 x, int16 y) { - _screen->finishTextDrawItems(); + _screen->finishTalkTextItems(); /* // TODO: Fix checks; sometimes cameraY ended up being negative @@ -401,14 +409,14 @@ void ToltecsEngine::updateCamera() { //dirtyFullRefresh = -1; _cameraX = _newCameraX; _screen->_fullRefresh = true; - _screen->finishTextDrawItems(); + _screen->finishTalkTextItems(); } if (_cameraY != _newCameraY) { //dirtyFullRefresh = -1; _cameraY = _newCameraY; _screen->_fullRefresh = true; - _screen->finishTextDrawItems(); + _screen->finishTalkTextItems(); } debug(0, "ToltecsEngine::updateCamera() _cameraX = %d; _cameraY = %d", _cameraX, _cameraY); @@ -438,6 +446,7 @@ void ToltecsEngine::talk(int16 slotIndex, int16 slotOffset) { if (_doSpeech) { int16 resIndex = READ_LE_UINT16(scanData + 1); debug(0, "ToltecsEngine::talk() playSound(resIndex: %d)", resIndex); + _sound->playSpeech(resIndex); } if (_doText) { _screen->updateTalkText(slotIndex, slotOffset); |