aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorArnaud Boutonné2010-09-02 12:50:10 +0000
committerArnaud Boutonné2010-09-02 12:50:10 +0000
commit21a09427de2cc8b251a13150d6d4ba8576fa1430 (patch)
treee2aa640c2a397e5183dc1ac5ad8bd2b3d1df0438 /engines
parente284852b64cc772c6475fc9d2db35122bea090f8 (diff)
downloadscummvm-rg350-21a09427de2cc8b251a13150d6d4ba8576fa1430.tar.gz
scummvm-rg350-21a09427de2cc8b251a13150d6d4ba8576fa1430.tar.bz2
scummvm-rg350-21a09427de2cc8b251a13150d6d4ba8576fa1430.zip
HUGO: Cleanup and fix mouse pointer issue
- Suppress commented code - Suppress readConfig() and writeConfig() - Fix the disappearing mouse issue svn-id: r52495
Diffstat (limited to 'engines')
-rw-r--r--engines/hugo/engine.cpp8
-rw-r--r--engines/hugo/file.cpp38
-rw-r--r--engines/hugo/file.h2
-rw-r--r--engines/hugo/hugo.cpp3
4 files changed, 3 insertions, 48 deletions
diff --git a/engines/hugo/engine.cpp b/engines/hugo/engine.cpp
index 1a097cd90a..ab31f5da93 100644
--- a/engines/hugo/engine.cpp
+++ b/engines/hugo/engine.cpp
@@ -124,26 +124,18 @@ void HugoEngine::initConfig(inst_t action) {
_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++)
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 2a76d13ee7..b4645c4d0b 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -815,44 +815,6 @@ void FileManager::readBootFile() {
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
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index d1de591cf3..c044a7307f 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -57,7 +57,6 @@ public:
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 @@ public:
void restoreSeq(object_t *obj);
void saveGame(short slot, const char *descrip);
void saveSeq(object_t *obj);
- void writeConfig();
private:
HugoEngine &_vm;
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 1c0b52e49a..32dd841929 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -174,6 +174,9 @@ Common::Error HugoEngine::run() {
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;