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

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Sat Aug 9 12:44:13 CEST 2008


Revision: 33708
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33708&view=rev
Author:   buddha_
Date:     2008-08-09 10:44:12 +0000 (Sat, 09 Aug 2008)

Log Message:
-----------
Small cleanup: Renamed rol to rolByte and made it handle all cases.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/part.cpp

Modified: scummvm/trunk/engines/cine/part.cpp
===================================================================
--- scummvm/trunk/engines/cine/part.cpp	2008-08-08 21:52:16 UTC (rev 33707)
+++ scummvm/trunk/engines/cine/part.cpp	2008-08-09 10:44:12 UTC (rev 33708)
@@ -259,8 +259,9 @@
 	return data;
 }
 
-/*! \brief Rotate value to the left by n bits */
-byte rol(byte value, int n) {
+/*! \brief Rotate byte value to the left by n bits */
+byte rolByte(byte value, uint n) {
+	n %= 8;
 	return (byte) ((value << n) | (value >> (8 - n)));
 }
 
@@ -283,7 +284,7 @@
 	// the bytes to the left by one.
 	if (crypted) {
 		for (uint index = 0; index < size; index++) {
-			dataPtr[index] = rol(dataPtr[index], 1);
+			dataPtr[index] = rolByte(dataPtr[index], 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