diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /engines/saga/introproc_ite.cpp | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'engines/saga/introproc_ite.cpp')
-rw-r--r-- | engines/saga/introproc_ite.cpp | 70 |
1 files changed, 62 insertions, 8 deletions
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp index 0b129dbcc0..3c10cbe1dd 100644 --- a/engines/saga/introproc_ite.cpp +++ b/engines/saga/introproc_ite.cpp @@ -59,6 +59,11 @@ namespace Saga { #define RID_ITE_FAIREPATH_SCENE 1564 #define RID_ITE_FAIRETENT_SCENE 1567 +// Intro scenes - DOS demo +#define RID_ITE_INTRO_ANIM_SCENE_DOS_DEMO 298 +#define RID_ITE_CAVE_SCENE_DOS_DEMO 302 +#define RID_ITE_VALLEY_SCENE_DOS_DEMO 310 + // ITE intro music #define MUSIC_INTRO 9 #define MUSIC_TITLE_THEME 10 @@ -75,22 +80,24 @@ LoadSceneParams ITE_IntroList[] = { {RID_ITE_FAIRETENT_SCENE, kLoadByResourceId, Scene::SC_ITEIntroFaireTentProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE} }; -int Scene::ITEStartProc() { - size_t scenesCount; - size_t i; +LoadSceneParams ITE_DOS_Demo_IntroList[] = { + {RID_ITE_INTRO_ANIM_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_CAVE_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroCaveDemoProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_VALLEY_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroValleyProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, +}; +int Scene::ITEStartProc() { LoadSceneParams firstScene; LoadSceneParams tempScene; + bool dosDemo = (_vm->getFeatures() & GF_ITE_DOS_DEMO); + int scenesCount = (!dosDemo) ? ARRAYSIZE(ITE_IntroList) : ARRAYSIZE(ITE_DOS_Demo_IntroList); - scenesCount = ARRAYSIZE(ITE_IntroList); - - for (i = 0; i < scenesCount; i++) { - tempScene = ITE_IntroList[i]; + for (int i = 0; i < scenesCount; i++) { + tempScene = (!dosDemo) ? ITE_IntroList[i] : ITE_DOS_Demo_IntroList[i]; tempScene.sceneDescriptor = _vm->_resource->convertResourceId(tempScene.sceneDescriptor); _vm->_scene->queueScene(tempScene); } - firstScene.loadFlag = kLoadBySceneNumber; firstScene.sceneDescriptor = _vm->getStartSceneNumber(); firstScene.sceneSkipTarget = true; @@ -437,6 +444,53 @@ int Scene::ITEIntroCaveCommonProc(int param, int caveScene) { return 0; } +int Scene::ITEIntroCaveDemoProc(int param) { + Event event; + EventColumns *eventColumns = NULL; + + switch (param) { + case SCENE_BEGIN: + // Begin palette cycling animation for candles + event.type = kEvTOneshot; + event.code = kPalAnimEvent; + event.op = kEventCycleStart; + event.time = 0; + eventColumns = _vm->_events->chain(eventColumns, event); + + // Queue narrator dialogue list + for (int i = 0; i < 11; i++) { + // Play voice + event.type = kEvTOneshot; + event.code = kVoiceEvent; + event.op = kEventPlay; + event.param = i; + event.time = _vm->_sndRes->getVoiceLength(i); + _vm->_events->chain(eventColumns, event); + } + + // End scene after last dialogue over + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = INTRO_VOICE_PAD; + _vm->_events->chain(eventColumns, event); + + break; + case SCENE_END: + break; + + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroCaveDemoProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroCaveDemoProc(param); +} + // Handles first introductory cave painting scene int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) { return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 1); |