aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudvig Strigeus2002-02-03 16:38:29 +0000
committerLudvig Strigeus2002-02-03 16:38:29 +0000
commita4aae7dc27be179705bacbf29886f43f8733e18d (patch)
treea73cc4769275094efa16e9b9d7af1133df5591e1
parentd5e0c5021cf17939facd866f2a1ecb6d386bab19 (diff)
downloadscummvm-rg350-a4aae7dc27be179705bacbf29886f43f8733e18d.tar.gz
scummvm-rg350-a4aae7dc27be179705bacbf29886f43f8733e18d.tar.bz2
scummvm-rg350-a4aae7dc27be179705bacbf29886f43f8733e18d.zip
added SCUMMVM_SAVEPATH environment variable that specifies where savegames are stored.
svn-id: r3564
-rw-r--r--readme.txt9
-rw-r--r--saveload.cpp5
2 files changed, 12 insertions, 2 deletions
diff --git a/readme.txt b/readme.txt
index a35a6fee9f..08495c0158 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,4 +1,4 @@
-2002-01-13, version 0.1.0
+2002-02-03
ScummVM is an implementation of the SCUMM engine used in various Lucas Arts games
such as Monkey Island and Day of the Tentacle.
@@ -46,6 +46,11 @@ F5 displays a save/load box.
Space pauses.
Alt-Enter toggles full screen (on unix)
+Savegames:
+----------
+Savegames are by default put in the current directory. You can use the environment variable SCUMMVM_SAVEPATH to specify where to put save games. Don't forget the trailing directory separator.
+Bash Example:
+export SCUMMVM_SAVEPATH=/tmp/scummvm_savegames/
Playing sound with Timidity:
----------------------------
@@ -56,5 +61,7 @@ $ timidity -irv 7777
Then just start ScummVM and you should have sound.
In order to use timidity, you need to compile ScummVM with USE_TIMIDITY.
+If you compile ScummVM with the USE_ADLIB flag, an Adlib card will be emulated and ScummVM will output the music as sampled waves. (doesn't work with Sam&Max)
+
Good Luck,
The ScummVM team. \ No newline at end of file
diff --git a/saveload.cpp b/saveload.cpp
index ec365e0c77..845a49d58e 100644
--- a/saveload.cpp
+++ b/saveload.cpp
@@ -146,7 +146,10 @@ bool Scumm::loadState(int slot, bool compat) {
}
void Scumm::makeSavegameName(char *out, int slot, bool compatible) {
- sprintf(out, "%s.%c%.2d", _exe_name, compatible ? 'c': 's', slot);
+ const char *dir = getenv("SCUMMVM_SAVEPATH");
+ if (dir==NULL) dir="";
+ /* snprintf should be used here, but it's not portable enough */
+ sprintf(out, "%s%s.%c%.2d", dir, _exe_name, compatible ? 'c': 's', slot);
}
bool Scumm::getSavegameName(int slot, char *desc) {