diff options
author | Strangerke | 2015-10-27 12:33:00 +0100 |
---|---|---|
committer | Strangerke | 2015-10-27 12:33:00 +0100 |
commit | 8aa06b4dd9f34e33a47a926695c3d67dab24073d (patch) | |
tree | 94a6dcf1df674d28dc478261c371be0671770eb9 /engines | |
parent | 18683f98b07a8eaa2975752ba56e361ec8e66721 (diff) | |
download | scummvm-rg350-8aa06b4dd9f34e33a47a926695c3d67dab24073d.tar.gz scummvm-rg350-8aa06b4dd9f34e33a47a926695c3d67dab24073d.tar.bz2 scummvm-rg350-8aa06b4dd9f34e33a47a926695c3d67dab24073d.zip |
MADS: Phantom: Implement scene 250
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/phantom/phantom_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes2.cpp | 83 | ||||
-rw-r--r-- | engines/mads/phantom/phantom_scenes2.h | 13 |
3 files changed, 97 insertions, 1 deletions
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp index 50c9341baa..275a03d7e5 100644 --- a/engines/mads/phantom/phantom_scenes.cpp +++ b/engines/mads/phantom/phantom_scenes.cpp @@ -92,7 +92,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { case 208: // stage and balcony view return new Scene208(vm); case 250: // cutscene - return new DummyScene(vm); // TODO + return new Scene250(vm); // Scene group #3 (catwalks, chandelier, lake / catacombs entrance) case 301: // catwalk #1 above stage diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp index b4dc8c9f6f..6454912c1e 100644 --- a/engines/mads/phantom/phantom_scenes2.cpp +++ b/engines/mads/phantom/phantom_scenes2.cpp @@ -6906,5 +6906,88 @@ void Scene208::animateBottomRightPeople() { /*------------------------------------------------------------------------*/ +Scene250::Scene250(MADSEngine *vm) : Scene2xx(vm) { +} + +void Scene250::synchronize(Common::Serializer &s) { + Scene2xx::synchronize(s); +} + +void Scene250::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene250::enter() { + warning("TODO: Switch to letter box view. See definition of MADS_MENU_Y"); + + _game._player._stepEnabled = false; + _game._player._visible = false; + + _game.loadQuoteSet(0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0); + _globals._animationIndexes[0] = _scene->loadAnimation("*RM150Q1", 1); +} + +void Scene250::step() { + if (_game._trigger == 1) + _scene->_sequences.setTimingTrigger(12, 2); + + if (_game._trigger == 2) { + int y = 68; + + _scene->_kernelMessages.add(Common::Point(160, y), 0x1110, 0x20, 0, 900, _game.getQuote(0x36)); + y += 16; + + if (_globals[kPlayerScore] > 250) + _globals[kPlayerScore] = 250; + + Common::String message = Common::String::format("%d", _globals[kPlayerScore]); + message += " "; + message += _game.getQuote(0x37); + message += " 250 "; + message += _game.getQuote(0x38); + + _scene->_kernelMessages.add(Common::Point(160, y), 0x1110, 0x20, 3, 900, message); + y += 16; + + _scene->_kernelMessages.add(Common::Point(160, y), 0x1110, 0x20, 0, 900, _game.getQuote(0x39)); + y += 16; + + int score = _globals[kPlayerScore]; + int messageId; + + if (score <= 25) + messageId = 0x3A; /* Stage sweeper */ + else if (score <= 50) + messageId = 0x3B; /* Dresser */ + else if (score <= 75) + messageId = 0x3C; /* Usher */ + else if (score <= 100) + messageId = 0x3D; /* Stagehand */ + else if (score <= 150) + messageId = 0x3E; /* Chorus Member */ + else if (score <= 200) + messageId = 0x3F; /* Supporting Player */ + else if (score <= 249) + messageId = 0x40; /* Star Player */ + else + messageId = 0x41; /* Director */ + + _scene->_kernelMessages.add(Common::Point(160, y), 0x1110, 0x20, 0, 900, _game.getQuote(messageId)); + _scene->_sequences.setTimingTrigger(930, 3); + } + + if (_game._trigger == 3) + _game._winStatus = 1; +} + +void Scene250::actions() { +} + +void Scene250::preActions() { +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Phantom } // End of namespace MADS diff --git a/engines/mads/phantom/phantom_scenes2.h b/engines/mads/phantom/phantom_scenes2.h index d5776685b4..7e86e2ce0f 100644 --- a/engines/mads/phantom/phantom_scenes2.h +++ b/engines/mads/phantom/phantom_scenes2.h @@ -288,6 +288,19 @@ public: virtual void preActions(); virtual void actions(); }; + +class Scene250 : public Scene2xx { +public: + Scene250(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); + + virtual void setup(); + virtual void enter(); + virtual void step(); + virtual void preActions(); + virtual void actions(); +}; + } // End of namespace Phantom } // End of namespace MADS |