[Scummvm-cvs-logs] SF.net SVN: scummvm:[55372] scummvm/trunk/engines/mohawk

fuzzie at users.sourceforge.net fuzzie at users.sourceforge.net
Fri Jan 21 12:53:45 CET 2011


Revision: 55372
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55372&view=rev
Author:   fuzzie
Date:     2011-01-21 11:53:44 +0000 (Fri, 21 Jan 2011)

Log Message:
-----------
MOHAWK: De-hardcode CSTime font paths.

The original Broderbund release had the installer data in a different
directory.

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/cstime.cpp
    scummvm/trunk/engines/mohawk/cstime_ui.cpp

Modified: scummvm/trunk/engines/mohawk/cstime.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/cstime.cpp	2011-01-21 10:59:49 UTC (rev 55371)
+++ scummvm/trunk/engines/mohawk/cstime.cpp	2011-01-21 11:53:44 UTC (rev 55372)
@@ -33,8 +33,10 @@
 #include "mohawk/sound.h"
 #include "mohawk/video.h"
 
+#include "common/config-manager.h"
 #include "common/events.h"
 #include "common/EventRecorder.h"
+#include "common/fs.h"
 
 #include "engines/util.h"
 
@@ -44,6 +46,13 @@
 	_rnd = new Common::RandomSource();
 	g_eventRec.registerRandomSource(*_rnd, "cstime");
 
+	// If the user just copied the CD contents, the fonts are in a subdirectory.
+	const Common::FSNode gameDataDir(ConfMan.get("path"));
+	// They're in setup/data32 for 'Where in Time is Carmen Sandiego?'.
+	SearchMan.addSubDirectoryMatching(gameDataDir, "setup/data32");
+	// They're in 95instal for 'Carmen Sandiego's Great Chase Through Time'.
+	SearchMan.addSubDirectoryMatching(gameDataDir, "95instal");
+
 	_state = kCSTStateStartup;
 
 	reset();

Modified: scummvm/trunk/engines/mohawk/cstime_ui.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/cstime_ui.cpp	2011-01-21 10:59:49 UTC (rev 55371)
+++ scummvm/trunk/engines/mohawk/cstime_ui.cpp	2011-01-21 11:53:44 UTC (rev 55372)
@@ -63,11 +63,11 @@
 	_note = new CSTimeCarmenNote(_vm);
 	_options = new CSTimeOptions(_vm);
 
-	if (!_normalFont.loadFromFON("95instal/EvP14.fon"))
+	if (!_normalFont.loadFromFON("EvP14.fon"))
 		error("failed to load normal font");
-	if (!_dialogFont.loadFromFON("95instal/Int1212.fon"))
+	if (!_dialogFont.loadFromFON("Int1212.fon"))
 		error("failed to load dialog font");
-	if (!_rolloverFont.loadFromFON("95instal/Int1818.fon"))
+	if (!_rolloverFont.loadFromFON("Int1818.fon"))
 		error("failed to load rollover font");
 
 	_uiFeature = NULL;


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