From a456295cbdac8fc0921b013f50df2ad4eb02ac8a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 11 Feb 2014 21:06:55 -0500 Subject: PEGASUS: Fix returning from Mars after destroying the robot's shuttle --- engines/pegasus/neighborhood/tsa/fulltsa.cpp | 22 ++++++++++++---------- engines/pegasus/neighborhood/tsa/tinytsa.cpp | 22 ++++++++++++---------- 2 files changed, 24 insertions(+), 20 deletions(-) (limited to 'engines/pegasus') diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp index 99efe10272..75f652ad56 100644 --- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp +++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp @@ -2691,16 +2691,18 @@ void FullTSA::receiveNotification(Notification *notification, const Notification } break; case kTSA37DownloadToOpMemReview: - switch (GameState.getTSAState()) { - case kPlayerOnWayToNorad: - g_opticalChip->playOpMemMovie(kPoseidonSpotID); - break; - case kPlayerOnWayToMars: - g_opticalChip->playOpMemMovie(kAriesSpotID); - break; - case kPlayerOnWayToWSC: - g_opticalChip->playOpMemMovie(kMercurySpotID); - break; + if (_vm->itemInBiochips(kOpticalBiochip)) { + switch (GameState.getTSAState()) { + case kPlayerOnWayToNorad: + g_opticalChip->playOpMemMovie(kPoseidonSpotID); + break; + case kPlayerOnWayToMars: + g_opticalChip->playOpMemMovie(kAriesSpotID); + break; + case kPlayerOnWayToWSC: + g_opticalChip->playOpMemMovie(kMercurySpotID); + break; + } } if (GameState.allTimeZonesFinished()) { diff --git a/engines/pegasus/neighborhood/tsa/tinytsa.cpp b/engines/pegasus/neighborhood/tsa/tinytsa.cpp index 0d11f5d904..0326c7f2ee 100644 --- a/engines/pegasus/neighborhood/tsa/tinytsa.cpp +++ b/engines/pegasus/neighborhood/tsa/tinytsa.cpp @@ -372,16 +372,18 @@ void TinyTSA::receiveNotification(Notification *notification, const Notification } break; case kTinyTSA37DownloadToOpMemReview: - switch (GameState.getTSAState()) { - case kPlayerOnWayToNorad: - g_opticalChip->playOpMemMovie(kPoseidonSpotID); - break; - case kPlayerOnWayToMars: - g_opticalChip->playOpMemMovie(kAriesSpotID); - break; - case kPlayerOnWayToWSC: - g_opticalChip->playOpMemMovie(kMercurySpotID); - break; + if (_vm->itemInBiochips(kOpticalBiochip)) { + switch (GameState.getTSAState()) { + case kPlayerOnWayToNorad: + g_opticalChip->playOpMemMovie(kPoseidonSpotID); + break; + case kPlayerOnWayToMars: + g_opticalChip->playOpMemMovie(kAriesSpotID); + break; + case kPlayerOnWayToWSC: + g_opticalChip->playOpMemMovie(kMercurySpotID); + break; + } } requestExtraSequence(kTinyTSA37OpMemReviewToMainMenu, kExtraCompletedFlag, kFilterNoInput); -- cgit v1.2.3 From 0593f434afcd772e6f171cc466d8ad714146e864 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 23 Feb 2014 14:49:19 -0500 Subject: PEGASUS: Force the inventory drawers closed when loading a game --- engines/pegasus/pegasus.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/pegasus') diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 0148470cd5..c45053dfed 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -431,6 +431,8 @@ void PegasusEngine::removeTimeBase(TimeBase *timeBase) { bool PegasusEngine::loadFromStream(Common::SeekableReadStream *stream) { // Dispose currently running stuff + lowerInventoryDrawerSync(); + lowerBiochipDrawerSync(); useMenu(0); useNeighborhood(0); removeAllItemsFromInventory(); -- cgit v1.2.3 From d04667e58a889e4744f36fb5797a69fa437a1abf Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 26 Feb 2014 21:56:40 -0500 Subject: PEGASUS: Fix being able to use the inventory from the pause screen Somehow, I completely missed implementing this function! --- engines/pegasus/pegasus.cpp | 9 +++++++++ engines/pegasus/pegasus.h | 1 + 2 files changed, 10 insertions(+) (limited to 'engines/pegasus') diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index c45053dfed..c5edd34a01 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -1462,6 +1462,15 @@ void PegasusEngine::throwAwayEverything() { g_interface = 0; } +InputBits PegasusEngine::getInputFilter() { + InputBits filter = InputHandler::getInputFilter(); + + if (isPaused()) + return filter & ~JMPPPInput::getItemPanelsInputFilter(); + + return filter; +} + void PegasusEngine::processShell() { checkCallBacks(); checkNotifications(); diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index 59637e38df..fb66eb7586 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -272,6 +272,7 @@ private: uint getNeighborhoodCD(const NeighborhoodID neighborhood) const; uint _currentCD; void initKeymap(); + InputBits getInputFilter(); // Menu GameMenu *_gameMenu; -- cgit v1.2.3 From 740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 27 Feb 2014 21:27:23 -0500 Subject: IMAGE: Move all ImageDecoders to image/ --- engines/pegasus/cursor.cpp | 6 +++--- engines/pegasus/surface.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/pegasus') diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp index ad0d2c2d7d..602ae88068 100644 --- a/engines/pegasus/cursor.cpp +++ b/engines/pegasus/cursor.cpp @@ -28,7 +28,7 @@ #include "common/system.h" #include "graphics/cursorman.h" #include "graphics/surface.h" -#include "graphics/decoders/pict.h" +#include "image/pict.h" #include "pegasus/cursor.h" #include "pegasus/graphics.h" @@ -148,7 +148,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) { Common::SeekableReadStream *pictStream = vm->_resFork->getResource(MKTAG('P', 'I', 'C', 'T'), cursorInfo.tag + 1000); if (pictStream) { - Graphics::PICTDecoder pict; + Image::PICTDecoder pict; if (!pict.loadStream(*pictStream)) error("Failed to decode cursor PICT %d", cursorInfo.tag + 1000); @@ -166,7 +166,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) { error("Failed to find color icon %d", cursorInfo.tag); // PixMap section - Graphics::PICTDecoder::PixMap pixMap = Graphics::PICTDecoder::readPixMap(*cicnStream); + Image::PICTDecoder::PixMap pixMap = Image::PICTDecoder::readPixMap(*cicnStream); // Mask section cicnStream->readUint32BE(); // mask baseAddr diff --git a/engines/pegasus/surface.cpp b/engines/pegasus/surface.cpp index cdcb3c6e79..cb1e2e7bcc 100644 --- a/engines/pegasus/surface.cpp +++ b/engines/pegasus/surface.cpp @@ -28,7 +28,7 @@ #include "common/stream.h" #include "common/system.h" #include "graphics/surface.h" -#include "graphics/decoders/pict.h" +#include "image/pict.h" #include "video/video_decoder.h" #include "pegasus/pegasus.h" @@ -101,7 +101,7 @@ void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id } bool Surface::getImageFromPICTStream(Common::SeekableReadStream *stream) { - Graphics::PICTDecoder pict; + Image::PICTDecoder pict; if (!pict.loadStream(*stream)) return false; -- cgit v1.2.3