[Scummvm-cvs-logs] SF.net SVN: scummvm:[47342] scummvm/trunk/engines/sci/engine/vm.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sun Jan 17 19:27:57 CET 2010


Revision: 47342
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47342&view=rev
Author:   m_kiewitz
Date:     2010-01-17 18:27:57 +0000 (Sun, 17 Jan 2010)

Log Message:
-----------
SCI: another speed throttler, delays decrementing cycles/cycleCnt selectors, disabled code just for reference

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/vm.cpp

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-17 13:07:50 UTC (rev 47341)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-01-17 18:27:57 UTC (rev 47342)
@@ -1199,10 +1199,28 @@
 			s->r_acc = OBJ_PROPERTY(obj, (opparams[0] >> 1)) = ACC_ARITHMETIC_L(1 + /*acc*/);
 			break;
 
-		case 0x36: // dpToa
+		case 0x36: { // dpToa
 			s->r_acc = OBJ_PROPERTY(obj, (opparams[0] >> 1));
+#if 0
+			// Speed throttling is possible here as well
+			// although this opens other issues like mud wrestling in lsl5 uses another local variable for delays
+			Object *var_container = obj;
+			if (!(obj->getInfoSelector().offset & SCRIPT_INFO_CLASS))
+				var_container = s->_segMan->getObject(obj->getSuperClassSelector());
+			uint16 varSelector = var_container->getVarSelector(opparams[0] >> 1);
+//			printf("%X\n", varSelector);
+//			printf("%s\n", s->_kernel->getSelectorName(varSelector).c_str());
+			if ((varSelector == 0x84) || (varSelector == 0x92))) {
+				// selectors cycles, cycleCnt from lsl5 hardcoded
+				uint32 curTime = g_system->getMillis();
+				if (s->_lastAnimateTime + 30 > curTime)
+					break;
+				s->_lastAnimateTime = curTime;
+			}
+#endif
 			s->r_acc = OBJ_PROPERTY(obj, (opparams[0] >> 1)) = ACC_ARITHMETIC_L(-1 + /*acc*/);
 			break;
+		}
 
 		case 0x37: // ipTos
 			validate_arithmetic(OBJ_PROPERTY(obj, (opparams[0] >> 1)));


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