diff options
Diffstat (limited to 'sword1/logic.cpp')
-rw-r--r-- | sword1/logic.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/sword1/logic.cpp b/sword1/logic.cpp index 177e4e63c8..8e1c24edbe 100644 --- a/sword1/logic.cpp +++ b/sword1/logic.cpp @@ -32,6 +32,7 @@ #include "sword1.h" #include "music.h" #include "swordres.h" +#include "animation.h" #include "debug.h" @@ -43,7 +44,7 @@ namespace Sword1 { uint32 Logic::_scriptVars[NUM_SCRIPT_VARS]; -Logic::Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu) { +Logic::Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, SoundMixer *mixer) { _objMan = pObjMan; _resMan = resMan; _screen = pScreen; @@ -55,6 +56,8 @@ Logic::Logic(ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, _screen->useTextManager(_textMan); _router = new Router(_objMan, _resMan); _eventMan = NULL; + _system = system; + _mixer = mixer; } void Logic::initialize(void) { @@ -903,7 +906,36 @@ int Logic::fnSetPaletteToCut(Object *cpt, int32 id, int32 c, int32 d, int32 e, i } int Logic::fnPlaySequence(Object *cpt, int32 id, int32 sequenceId, int32 d, int32 e, int32 f, int32 z, int32 x) { - warning("fnPlaySequence(%d) called", sequenceId); + + static char *sequence_list[20] = { + "ferrari", // 0 CD2 ferrari running down fitz in sc19 + "ladder", // 1 CD2 george walking down ladder to dig sc24->sc$ + "steps", // 2 CD2 george walking down steps sc23->sc24 + "sewer", // 3 CD1 george entering sewer sc2->sc6 + "intro", // 4 CD1 intro sequence ->sc1 + "river", // 5 CD1 george being thrown into river by flap & g$ + "truck", // 6 CD2 truck arriving at bull's head sc45->sc53/4 + "grave", // 7 BOTH george's grave in scotland, from sc73 + from sc38 $ + "montfcon", // 8 CD2 monfaucon clue in ireland dig, sc25 + "tapestry", // 9 CD2 tapestry room beyond spain well, sc61 + "ireland", // 10 CD2 ireland establishing shot europe_map->sc19 + "finale", // 11 CD2 grand finale at very end, from sc73 + "history", // 12 CD1 George's history lesson from Nico, in sc10 + "spanish", // 13 CD2 establishing shot for 1st visit to Spain, europe_m$ + "well", // 14 CD2 first time being lowered down well in Spai$ + "candle", // 15 CD2 Candle burning down in Spain mausoleum sc59 + "geodrop", // 16 CD2 from sc54, George jumping down onto truck + "vulture", // 17 CD2 from sc54, vultures circling George's dead body + "enddemo", // 18 --- for end of single CD demo + "credits", // 19 CD2 credits, to follow "finale" sequence + // etc. + }; + + warning("fnPlaySequence(%d) called", sequenceId); + MoviePlayer player(_screen, _mixer, _system); + + player.play(sequence_list[sequenceId]); + //_scriptVars[NEW_PALETTE] = 1; /* the logic usually calls fnFadeDown before playing the sequence, so we have to set NEW_PALETTE now to force a palette refresh */ |