From 04d42638cde9022523910b9ec75130bd85ec1fa5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 4 Aug 2014 09:21:39 -0400 Subject: ACCESS: Fleshed out beginning of title sequence, added Screen::clip --- engines/access/amazon/amazon_game.cpp | 37 ++++++++++++++++++++++++++++++----- engines/access/amazon/amazon_game.h | 2 +- 2 files changed, 33 insertions(+), 6 deletions(-) (limited to 'engines/access/amazon') diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 3f8ae73faa..30733087dd 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -30,19 +30,46 @@ AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc) AccessEngine(syst, gameDesc) { } +AmazonEngine::~AmazonEngine() { +} + + void AmazonEngine::doTitle() { _screen->setDisplayScan(); + _destIn = (byte *)_buffer2.getPixels(); + _screen->forceFadeOut(); _events->hideCursor(); - _sound->_soundTable[0] = _sound->loadSound(98, 30); + _sound->queueSound(0, 98, 30); _sound->_soundPriority[0] = 1; - _sound->_soundTable[1] = _sound->loadSound(98, 8); - _sound->_soundPriority[1] = 2; _screen->_loadPalFlag = false; - byte *scr = _files->loadScreen(0, 3); - _screen->copyBuffer(scr); + _files->loadScreen(0, 3); + + _buffer2.copyFrom(*_screen); + _buffer1.copyFrom(*_screen); + _screen->forceFadeIn(); + _sound->playSound(1); + + _objectsTable = _files->loadFile(0, 2); + _sound->playSound(1); + + _screen->_loadPalFlag = false; + _files->loadScreen(0, 4); + _sound->playSound(1); + + _buffer2.copyFrom(*_screen); + _buffer1.copyFrom(*_screen); + _sound->playSound(1); + + const int COUNTDOWN[6] = { 2, 0x80, 1, 0x7d, 0, 0x87 }; + for (int _pCount = 0; _pCount < 3; ++_pCount) { + _buffer2.copyFrom(_buffer1); + int id = READ_LE_UINT16(COUNTDOWN + _pCount * 4); + int xp = READ_LE_UINT16(COUNTDOWN + _pCount * 4 + 2); + _screen->plotImage(_objectsTable, id, Common::Point(xp, 71)); + } } } // End of namespace Amazon diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h index 30ec2c6519..33d7833670 100644 --- a/engines/access/amazon/amazon_game.h +++ b/engines/access/amazon/amazon_game.h @@ -35,7 +35,7 @@ protected: public: AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc); - virtual ~AmazonEngine() {} + virtual ~AmazonEngine(); }; } // End of namespace Amazon -- cgit v1.2.3