aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2002-08-18 22:47:11 +0000
committerMax Horn2002-08-18 22:47:11 +0000
commitd354eaaf422cd7059c6997db14853d35d0111173 (patch)
treebdedf8abe1805e90a4f271a5ceac4dcf8a8f0090 /simon
parent7604484caf2d5846a1cc1606c577fedc5791089c (diff)
downloadscummvm-rg350-d354eaaf422cd7059c6997db14853d35d0111173.tar.gz
scummvm-rg350-d354eaaf422cd7059c6997db14853d35d0111173.tar.bz2
scummvm-rg350-d354eaaf422cd7059c6997db14853d35d0111173.zip
more code unification; as a side effect, simon can take advantage of the save path settings in the config file (inspired by patch #587694)
svn-id: r4770
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp12
-rw-r--r--simon/simon.h2
-rw-r--r--simon/simonres.cpp2
3 files changed, 2 insertions, 14 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 6b626964b6..c7e34ccbcb 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -126,7 +126,6 @@ SimonState::SimonState(GameDetector *detector, OSystem *syst)
midi.set_driver(driver);
_game = detector->_gameId;
- _game_path = detector->_gameDataPath;
/* Setup mixer */
if (!_mixer->bind_to_system(syst))
@@ -4541,16 +4540,7 @@ bool SimonState::save_game(uint slot, const char *caption)
char *SimonState::gen_savename(int slot)
{
static char buf[256];
- const char *dir;
-
- /* perhaps getenv should be added to OSystem */
-#ifndef _WIN32_WCE
- dir = getenv("SCUMMVM_SAVEPATH");
- if (dir == NULL)
- dir = "";
-#else
- dir = _game_path;
-#endif
+ const char *dir = getSavePath();
sprintf(buf, "%sSAVE.%.3d", dir, slot);
return buf;
diff --git a/simon/simon.h b/simon/simon.h
index f4e999d311..fce335b15a 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -110,8 +110,6 @@ struct GameSpecificSettings;
class SimonState : public Engine {
public:
- char *_game_path;
-
byte *_vc_ptr; /* video code ptr */
uint32 *_game_offsets_ptr;
diff --git a/simon/simonres.cpp b/simon/simonres.cpp
index 3ee30ae90e..7b36d1f770 100644
--- a/simon/simonres.cpp
+++ b/simon/simonres.cpp
@@ -97,7 +97,7 @@ FILE *SimonState::fopen_maybe_lowercase(const char *filename)
{
FILE *in;
char buf[256], dotbuf[256], *e;
- const char *s = _game_path;
+ const char *s = _gameDataPath;
if (filename == NULL || *filename == '\0')
return NULL;