aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorKari Salminen2008-08-06 20:41:53 +0000
committerKari Salminen2008-08-06 20:41:53 +0000
commita944497d7586dfb7adb6246667b4625b988a7542 (patch)
treec135ef05a2932588ba7af597d7ca87a5e049db5e /engines/cine
parent32ad70f60840cc2a6ac79a47dcb4b30b3e9fd7a9 (diff)
downloadscummvm-rg350-a944497d7586dfb7adb6246667b4625b988a7542.tar.gz
scummvm-rg350-a944497d7586dfb7adb6246667b4625b988a7542.tar.bz2
scummvm-rg350-a944497d7586dfb7adb6246667b4625b988a7542.zip
HACK: Force oxygen to maximum during Operation Stealth's first arcade sequence.
This way the arcade sequence is completable now. This hack should be removed later and the first arcade sequence be made properly playable! svn-id: r33667
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/gfx.cpp10
-rw-r--r--engines/cine/gfx.h2
-rw-r--r--engines/cine/main_loop.cpp14
3 files changed, 26 insertions, 0 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index cbddf0fc59..16bf4baa07 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -617,6 +617,11 @@ void FWRenderer::saveBgNames(Common::OutSaveFile &fHandle) {
fHandle.write(_bgName, 13);
}
+const char *FWRenderer::getBgName(uint idx) const {
+ assert(idx == 0);
+ return _bgName;
+}
+
/*! \brief Restore active and backup palette from save
* \param fHandle Savefile open for reading
*/
@@ -1332,6 +1337,11 @@ void OSRenderer::saveBgNames(Common::OutSaveFile &fHandle) {
}
}
+const char *OSRenderer::getBgName(uint idx) const {
+ assert(idx < 9);
+ return _bgTable[idx].name;
+}
+
/*! \brief Fade to black
* \bug Operation Stealth sometimes seems to fade to black using
* transformPalette resulting in double fadeout
diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h
index 6a3aa1ef89..c028aa123c 100644
--- a/engines/cine/gfx.h
+++ b/engines/cine/gfx.h
@@ -111,6 +111,7 @@ public:
virtual uint getScroll() const;
virtual void removeBg(unsigned int idx);
virtual void saveBgNames(Common::OutSaveFile &fHandle);
+ virtual const char *getBgName(uint idx = 0) const;
virtual void refreshPalette();
virtual void reloadPalette();
@@ -168,6 +169,7 @@ public:
uint getScroll() const;
void removeBg(unsigned int idx);
void saveBgNames(Common::OutSaveFile &fHandle);
+ const char *getBgName(uint idx = 0) const;
void refreshPalette();
void reloadPalette();
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index e5e670c973..e9fbe188b7 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -247,6 +247,20 @@ void CineEngine::mainLoop(int bootScriptIdx) {
}
do {
+ // HACK: Force amount of oxygen left to maximum during Operation Stealth's first arcade sequence.
+ // This makes it possible to pass the arcade sequence for now.
+ // FIXME: Remove the hack and make the first arcade sequence normally playable.
+ if (g_cine->getGameType() == Cine::GType_OS) {
+ Common::String bgName(renderer->getBgName());
+ // Check if the background is one of the three backgrounds
+ // that are only used during the first arcade sequence.
+ if (bgName == "28.PI1" || bgName == "29.PI1" || bgName == "30.PI1") {
+ static const uint oxygenObjNum = 202, maxOxygen = 264;
+ // Force the amount of oxygen left to the maximum.
+ objectTable[oxygenObjNum].x = maxOxygen;
+ }
+ }
+
stopMusicAfterFadeOut();
di = executePlayerInput();