[Scummvm-cvs-logs] SF.net SVN: scummvm:[34484] scummvm/trunk/engines/kyra/screen.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Sep 10 22:47:59 CEST 2008


Revision: 34484
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34484&view=rev
Author:   lordhoto
Date:     2008-09-10 20:47:58 +0000 (Wed, 10 Sep 2008)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen.cpp

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2008-09-10 19:46:08 UTC (rev 34483)
+++ scummvm/trunk/engines/kyra/screen.cpp	2008-09-10 20:47:58 UTC (rev 34484)
@@ -2736,21 +2736,7 @@
 
 	if (palData && fileSize) {
 		debugC(9, kDebugLevelScreen,"Loading a palette of size %u from '%s'", fileSize, filename);
-		if (_vm->gameFlags().platform == Common::kPlatformAmiga) {
-			assert(fileSize % 2 == 0);
-			assert(fileSize / 2 <= 256);
-			fileSize >>= 1;
-			const uint16 *src = (const uint16 *)srcData;
-			for (uint i = 0; i < fileSize; ++i) {
-				uint16 col = READ_BE_UINT16(src); ++src;
-				palData[2] = (col & 0xF) << 2; col >>= 4;
-				palData[1] = (col & 0xF) << 2; col >>= 4;
-				palData[0] = (col & 0xF) << 2; col >>= 4;
-				palData += 3;
-			}
-		} else {
-			memcpy(palData, srcData, fileSize);
-		}
+		loadPalette(srcData, palData, fileSize);
 	}
 	delete[] srcData;
 	return true;


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