[Scummvm-cvs-logs] SF.net SVN: scummvm:[33667] scummvm/trunk/engines/cine

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Wed Aug 6 22:41:53 CEST 2008


Revision: 33667
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33667&view=rev
Author:   buddha_
Date:     2008-08-06 20:41:53 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
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!

Modified Paths:
--------------
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/gfx.h
    scummvm/trunk/engines/cine/main_loop.cpp

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2008-08-06 19:53:31 UTC (rev 33666)
+++ scummvm/trunk/engines/cine/gfx.cpp	2008-08-06 20:41:53 UTC (rev 33667)
@@ -617,6 +617,11 @@
 	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 @@
 	}
 }
 
+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

Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h	2008-08-06 19:53:31 UTC (rev 33666)
+++ scummvm/trunk/engines/cine/gfx.h	2008-08-06 20:41:53 UTC (rev 33667)
@@ -111,6 +111,7 @@
 	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 @@
 	uint getScroll() const;
 	void removeBg(unsigned int idx);
 	void saveBgNames(Common::OutSaveFile &fHandle);
+	const char *getBgName(uint idx = 0) const;
 
 	void refreshPalette();
 	void reloadPalette();

Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp	2008-08-06 19:53:31 UTC (rev 33666)
+++ scummvm/trunk/engines/cine/main_loop.cpp	2008-08-06 20:41:53 UTC (rev 33667)
@@ -247,6 +247,20 @@
 	}
 
 	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();
 		


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list