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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jan 3 16:20:33 CET 2008


Revision: 30201
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30201&view=rev
Author:   lordhoto
Date:     2008-01-03 07:20:33 -0800 (Thu, 03 Jan 2008)

Log Message:
-----------
Resolve portabillity issues introduced with last commit.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/resource.cpp
    scummvm/trunk/engines/kyra/resource.h
    scummvm/trunk/engines/kyra/staticres.cpp

Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp	2008-01-03 14:53:18 UTC (rev 30200)
+++ scummvm/trunk/engines/kyra/resource.cpp	2008-01-03 15:20:33 UTC (rev 30201)
@@ -69,8 +69,8 @@
 
 	if (_vm->game() == GI_KYRA1) {
 		// we're loading KYRA.DAT here too (but just for Kyrandia 1)
-		if (!loadPakFile(StaticResource::_staticDataFile) || !StaticResource::checkKyraDat()) {
-			Common::String errorMessage = "You're missing the '" + StaticResource::_staticDataFile + "' file or it got corrupted, (re)get it from the ScummVM website";
+		if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) {
+			Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website";
 			GUI::MessageDialog errorMsg(errorMessage);
 			errorMsg.runModal();
 			error(errorMessage.c_str());
@@ -145,7 +145,7 @@
 		return true;
 	}
 
-	const bool isKyraDat = filename.equalsIgnoreCase(StaticResource::_staticDataFile);
+	const bool isKyraDat = filename.equalsIgnoreCase(StaticResource::staticDataFilename());
 	uint32 size = 0;
 
 	Common::File handle;

Modified: scummvm/trunk/engines/kyra/resource.h
===================================================================
--- scummvm/trunk/engines/kyra/resource.h	2008-01-03 14:53:18 UTC (rev 30200)
+++ scummvm/trunk/engines/kyra/resource.h	2008-01-03 15:20:33 UTC (rev 30201)
@@ -226,7 +226,7 @@
 
 class StaticResource {
 public:
-	static const Common::String _staticDataFile;
+	static const Common::String staticDataFilename() { return "kyra.dat"; }
 
 	StaticResource(KyraEngine *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {}
 	~StaticResource() { deinit(); }

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2008-01-03 14:53:18 UTC (rev 30200)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2008-01-03 15:20:33 UTC (rev 30201)
@@ -39,7 +39,7 @@
 
 bool StaticResource::checkKyraDat() {
 	Common::File kyraDat;
-	if (!kyraDat.open(StaticResource::_staticDataFile))
+	if (!kyraDat.open(StaticResource::staticDataFilename()))
 		return false;
 
 	uint32 size = kyraDat.size() - 16;
@@ -50,7 +50,7 @@
 	kyraDat.close();
 
 	uint8 digestCalc[16];
-	if (!Common::md5_file(StaticResource::_staticDataFile.c_str(), digestCalc, size))
+	if (!Common::md5_file(StaticResource::staticDataFilename().c_str(), digestCalc, size))
 		return false;
 
 	for (int i = 0; i < 16; ++i)
@@ -854,8 +854,6 @@
 	_screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0);
 }
 
-const Common::String StaticResource::_staticDataFile = "kyra.dat";
-
 const ScreenDim Screen::_screenDimTable[] = {
 	{ 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 },
 	{ 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 },


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