diff options
author | Eugene Sandulenko | 2006-11-06 13:40:24 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-11-06 13:40:24 +0000 |
commit | 8ef5e88323972fa8d2fe5e376c78a1903535f50a (patch) | |
tree | 387dfd64b52c3c1c3dea767d390d4edbfb07ff65 /engines/scumm/scumm.cpp | |
parent | da3e724a990e1d7482c1654623e01723ba890534 (diff) | |
download | scummvm-rg350-8ef5e88323972fa8d2fe5e376c78a1903535f50a.tar.gz scummvm-rg350-8ef5e88323972fa8d2fe5e376c78a1903535f50a.tar.bz2 scummvm-rg350-8ef5e88323972fa8d2fe5e376c78a1903535f50a.zip |
Add support for HE CUP demos based on cyx's standalone player.
svn-id: r24636
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 3cf046715e..9dc8bce477 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -60,6 +60,7 @@ #include "scumm/sound.h" #include "scumm/imuse/sysex.h" #include "scumm/he/sprite_he.h" +#include "scumm/he/cup_player_he.h" #include "scumm/util.h" #include "scumm/verbs.h" @@ -765,6 +766,51 @@ ScummEngine_v90he::~ScummEngine_v90he() { free(_hePalettes); } } + +ScummEngine_vCUPhe::ScummEngine_vCUPhe(OSystem *syst, const DetectorResult &dr) : Engine(syst){ + _syst = syst; + _game = dr.game; + _filenamePattern = dr.fp, + + _cupPlayer = new CUP_Player(syst, this, _mixer); +} + +ScummEngine_vCUPhe::~ScummEngine_vCUPhe() { + delete _cupPlayer; +} + +int ScummEngine_vCUPhe::init() { + _system->beginGFXTransaction(); + _system->initSize(640, 480); + initCommonGFX(true); + _system->endGFXTransaction(); + + return 0; +} + +int ScummEngine_vCUPhe::go() { + _cupPlayer->open(_filenamePattern.pattern); + _cupPlayer->play(); + _cupPlayer->close(); + + return 0; +} + +void ScummEngine_vCUPhe::parseEvents() { + OSystem::Event event; + + while (_system->pollEvent(event)) { + switch (event.type) { + case OSystem::EVENT_QUIT: + _quit = true; + break; + + default: + break; + } + } +} + #endif #ifndef DISABLE_SCUMM_7_8 @@ -868,7 +914,7 @@ int ScummEngine::init() { #endif - // The kGenAsIs method is only used for 'container files', i.e. files + // The kGenUnchanged method is only used for 'container files', i.e. files // that contain the real game files bundled together in an archive format. // This is the case of the NES, C64 and Mac versions of certain games. // Note: All of these can also occur in 'extracted' form, in which case they @@ -957,7 +1003,7 @@ int ScummEngine::init() { _fileHandle->close(); } else { - error("kGenAsIs used with unsupported platform"); + error("kGenUnchanged used with unsupported platform"); } } else { // Regular access, no container file involved |