[Scummvm-cvs-logs] SF.net SVN: scummvm:[52495] scummvm/trunk/engines/hugo

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Thu Sep 2 14:50:12 CEST 2010


Revision: 52495
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52495&view=rev
Author:   strangerke
Date:     2010-09-02 12:50:10 +0000 (Thu, 02 Sep 2010)

Log Message:
-----------
HUGO: Cleanup and fix mouse pointer issue

- Suppress commented code
- Suppress readConfig() and writeConfig()
- Fix the disappearing mouse issue

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/engine.cpp
    scummvm/trunk/engines/hugo/file.cpp
    scummvm/trunk/engines/hugo/file.h
    scummvm/trunk/engines/hugo/hugo.cpp

Modified: scummvm/trunk/engines/hugo/engine.cpp
===================================================================
--- scummvm/trunk/engines/hugo/engine.cpp	2010-09-02 11:43:00 UTC (rev 52494)
+++ scummvm/trunk/engines/hugo/engine.cpp	2010-09-02 12:50:10 UTC (rev 52495)
@@ -124,26 +124,18 @@
 		_config.cx = VIEW_DX * 2;                   // Window view size
 		_config.cy = VIEW_DY * 2;
 
-//		_config.wx = 0;
-//		_config.wy = 0;
-
 		_config.musicVolume = 85;                   // Music volume %
 		_config.soundVolume = 100;                  // Sound volume %
 		initPlaylist(_config.playlist);             // Initialize default tune playlist
 
 		file().readBootFile();    // Read startup structure
-		file().readConfig();      // Read user's saved config
 
 		cx = _config.cx;                            // Save these around OnFileNew()
 		cy = _config.cy;
-//		wx = _config.wx;
-//		wy = _config.wy;
 		break;
 	case RESET:
 		_config.cx = cx;                            // Restore cx, cy
 		_config.cy = cy;
-//		_config.wx = wx;
-//		_config.wy = wy;
 
 		// Find first tune and play it
 		for (i = 0; i < MAX_TUNES; i++)

Modified: scummvm/trunk/engines/hugo/file.cpp
===================================================================
--- scummvm/trunk/engines/hugo/file.cpp	2010-09-02 11:43:00 UTC (rev 52494)
+++ scummvm/trunk/engines/hugo/file.cpp	2010-09-02 12:50:10 UTC (rev 52495)
@@ -815,44 +815,6 @@
 		Utils::Error(GEN_ERR, "%s", "Program startup file invalid");
 }
 
-void FileManager::readConfig() {
-// Read the user's config if it exists
-	Common::File f;
-	fpath_t  path;
-	config_t tmpConfig = _config;
-
-	debugC(1, kDebugFile, "readConfig");
-
-	sprintf(path, "%s%s", _vm.getGameStatus().path, CONFIGFILE);
-	if (f.open(path)) {
-		// If config format changed, ignore it and use defaults
-		if (f.size() != sizeof(_config)) {
-			warning("Incompatible %s: file size: %ld expected size: %ld. Skipping loading.", CONFIGFILE, f.size(), sizeof(_config));
-		} else {
-			if (f.read(&_config, sizeof(_config)) != sizeof(_config))
-				_config = tmpConfig;
-		}
-
-		f.close();
-	}
-}
-
-void FileManager::writeConfig() {
-// Write the user's config
-	FILE   *f;
-	fpath_t path;
-
-	debugC(1, kDebugFile, "writeConfig");
-
-	// Write user's config
-	// No error checking in case CD-ROM with no alternate path specified
-	sprintf(path, "%s%s", _vm.getGameStatus().path, CONFIGFILE);
-	if ((f = fopen(path, "w+")) != NULL)
-		fwrite(&_config, sizeof(_config), 1, f);
-
-	fclose(f);
-}
-
 uif_hdr_t *FileManager::getUIFHeader(uif_t id) {
 // Returns address of uif_hdr[id], reading it in if first call
 	static uif_hdr_t UIFHeader[MAX_UIFS];           // Lookup for uif fonts/images

Modified: scummvm/trunk/engines/hugo/file.h
===================================================================
--- scummvm/trunk/engines/hugo/file.h	2010-09-02 11:43:00 UTC (rev 52494)
+++ scummvm/trunk/engines/hugo/file.h	2010-09-02 12:50:10 UTC (rev 52495)
@@ -57,7 +57,6 @@
 	void     openDatabaseFiles();
 	void     readBackground(int screenIndex);
 	void     readBootFile();
-	void     readConfig();
 	void     readImage(int objNum, object_t *objPtr);
 	void     readOverlay(int screenNum, image_pt image, ovl_t overlayType);
 	void     readUIFItem(short id, byte *buf);
@@ -65,7 +64,6 @@
 	void     restoreSeq(object_t *obj);
 	void     saveGame(short slot, const char *descrip);
 	void     saveSeq(object_t *obj);
-	void     writeConfig();
 
 private:
 	HugoEngine &_vm;

Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp	2010-09-02 11:43:00 UTC (rev 52494)
+++ scummvm/trunk/engines/hugo/hugo.cpp	2010-09-02 12:50:10 UTC (rev 52495)
@@ -174,6 +174,9 @@
 
 	while (!doQuitFl) {
 		g_system->updateScreen();
+
+		// WORKAROUND: Force the mouse cursor to be displayed. This fixes the disappearing mouse cursor issue.
+		g_system->showMouse(true);
 		runMachine();
 		// Handle input
 		Common::Event event;


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