aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gameDetector.cpp4
-rw-r--r--gui.cpp8
-rw-r--r--readme.txt48
-rw-r--r--scumm.h1
-rw-r--r--scummvm.cpp8
-rw-r--r--sdl.cpp14
-rw-r--r--sound/imuse.cpp4
-rw-r--r--sound/mididrv.cpp2
8 files changed, 60 insertions, 29 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp
index b93d99893c..bbc9180bc1 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -297,9 +297,9 @@ static const VersionSettings version_settings[] = {
{"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, 3, 2,
GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT},
{"samnmax", "Sam & Max", GID_SAMNMAX, 6, 4, 2,
- GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER | GF_ADLIB_DEFAULT},
+ GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_DRAWOBJ_OTHER_ORDER},
{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0,
- GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY},
+ GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT},
/* Scumm Version 7 */
{"ft", "Full Throttle", GID_FT, 7, 3, 0,
diff --git a/gui.cpp b/gui.cpp
index be1414f244..280e430587 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -654,7 +654,7 @@ void Gui::handleCommand(int cmd)
getSavegameNames(_slotIndex + 9);
draw(20, 28);
return;
- case 3: /* save button */
+ case 3: /* save button */
_cur_page = 2;
getSavegameNames(0);
draw(0, 100);
@@ -677,6 +677,9 @@ void Gui::handleCommand(int cmd)
case 8:
if (lastEdit == -1 || game_names[lastEdit][0] == 0)
return;
+ if (_cur_page == 2)
+ _slotIndex++;
+
_s->_saveLoadSlot = lastEdit + _slotIndex;
_s->_saveLoadCompatible = false;
_s->_saveLoadFlag = 1;
@@ -711,6 +714,9 @@ void Gui::getSavegameNames(int start)
{
int i;
_slotIndex = start;
+ if (_cur_page == 2)
+ start++;
+
for (i = 0; i < 9; i++, start++) {
valid_games[i] = _s->getSavegameName(start, game_names[i]);
}
diff --git a/readme.txt b/readme.txt
index 595d2cbdd9..0f8ec7caad 100644
--- a/readme.txt
+++ b/readme.txt
@@ -236,23 +236,45 @@ Note that filters are very slow when ScummVM is compiled in a debug
configuration without optimisations. And there is always a speed impact when
using any form of anti-aliasing/linear filtering.
+Autosaves:
+----------
+
+Because ScummVM is still a beta product, it -can- crash and/or hang
+occasionally. As such, every five minutes it will save a game in Slot 0.
+
+
+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. Also be aware that saved games
+can, and probably WILL, break between ScummVM releases.
+
+Bash Example:
+ export SCUMMVM_SAVEPATH=/tmp/scummvm_savegames/
+
+Windows example:
+ set SCUMMVM_SAVEPATH=C:\saved_games\
+
Music and Sound:
----------------
By default, on most operating systems, ScummVM will automatically use ADLIB
emulation. However, some games do not include Adlib music - such as Sam and
-Max. Note: MIDI may not be available on all operating systems or may need manual
-configuration.
+Max. Note: MIDI may not be available on all operating systems or may need
+manual configuration.
If you ARE using MIDI, you have several different choices of output,
depending on your operating system and configuration.
-eadlib - Uses internal Adlib Emulation (default)
- -ewindows - Windows MIDI. Uses built-in sequencer. Only on Windows
+ -ewindows - Windows MIDI. Uses built-in sequencer, for Windows users
-etimidity - Uses Timidity for music. Requires Timidity.
- -eseq - Uses /dev/sequencer for MIDI. *nix only.
+ -eseq - Uses /dev/sequencer for MIDI, *nix users.
-eqt - Quicktime sound, for Macintosh users.
- -eamidi - Uses the MorphOS MIDI system. MorphOS only.
+ -ecore - Core sound, for Macintosh users.
+ -eamidi - Uses the MorphOS MIDI system, for MorphOS users
-enull - Null output. Don't play any music.
@@ -304,22 +326,6 @@ MONSTER.SOU file to a temporary folder. Then run:
In about 30 minutes or so, you will have a much smaller monster.so3 file, copy
this file to your game dir. You can safely remove the monter.sou file.
-
-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. Also be aware that saved games
-can, and probably WILL, break between ScummVM releases.
-
-Bash Example:
- export SCUMMVM_SAVEPATH=/tmp/scummvm_savegames/
-
-Windows example:
- set SCUMMVM_SAVEPATH=C:\saved_games\
-
-
Coding style:
------------
For ScummVM coding, we use hugging braces, and two-space tab indents.
diff --git a/scumm.h b/scumm.h
index 2e87d9e42b..4e8c8d209b 100644
--- a/scumm.h
+++ b/scumm.h
@@ -705,6 +705,7 @@ public:
/* Save/Load class - some of this may be GUI */
byte _saveLoadFlag, _saveLoadSlot;
+ bool _doAutosave;
bool _saveLoadCompatible;
char _saveLoadName[32];
diff --git a/scummvm.cpp b/scummvm.cpp
index 9201e8e041..7818eec41c 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -274,6 +274,14 @@ int Scumm::scummLoop(int delta)
_saveLoadFlag = 0;
}
+ if (_doAutosave) {
+ _saveLoadSlot = 0;
+ sprintf(_saveLoadName, "Autosave %d", _saveLoadSlot);
+ _saveLoadFlag = 1;
+ _saveLoadCompatible = false;
+ _doAutosave = false;
+ }
+
if (_completeScreenRedraw) {
int i;
Actor *a;
diff --git a/sdl.cpp b/sdl.cpp
index fefb9bf93a..f568508041 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -179,6 +179,7 @@ private:
void hotswap_gfx_mode();
void get_320x200_image(byte *buf);
+ static uint32 autosave(uint32);
};
int Init_2xSaI (uint32 BitFormat);
@@ -191,23 +192,30 @@ void SuperEagle(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
void AdvMame2x(uint8 *srcPtr, uint32 srcPitch, uint8 *null,
uint8 *dstPtr, uint32 dstPitch, int width, int height);
-
-
void atexit_proc() {
SDL_ShowCursor(SDL_ENABLE);
SDL_Quit();
}
+uint32 OSystem_SDL::autosave(uint32 interval)
+{
+ g_scumm->_doAutosave = true;
+
+ return interval;
+}
+
+
OSystem *OSystem_SDL::create(int gfx_mode, bool full_screen) {
OSystem_SDL *syst = new OSystem_SDL();
syst->_mode = gfx_mode;
syst->_full_screen = full_screen;
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) ==-1) {
+ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER) ==-1) {
error("Could not initialize SDL: %s.\n", SDL_GetError());
}
SDL_ShowCursor(SDL_DISABLE);
+ SDL_SetTimer(5 * 60 * 1000, (SDL_TimerCallback) autosave);
/* Clean up on exit */
atexit(atexit_proc);
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 7a08fa7b21..73739eeae8 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -782,11 +782,13 @@ byte *IMuse::findTag(int sound, char *tag, int index)
ptr += 4;
pos = 0;
+
while (pos < size) {
if (!memcmp(ptr + pos, tag, 4) && !index--)
return ptr + pos + 8;
pos += READ_BE_UINT32_UNALIGNED(ptr + pos + 4) + 8;
}
+
debug(1, "IMuse::findTag failed finding sound %d", sound);
return NULL;
@@ -1627,7 +1629,7 @@ int IMuse::initialize(OSystem *syst, MidiDriver *midi, SoundMixer *mixer)
_driver = driv;
_hardware_type = driv->get_hardware_type();
_game_tempo = driv->get_base_tempo();
-
+
driv->init(this,syst);
_master_volume = 127;
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 8030bd28e0..ff1e305f9e 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -91,7 +91,7 @@ void CALLBACK MidiDriver_WIN::midi_callback(HMIDIOUT hmo, UINT wMsg,
}
}
-int MidiDriver_WIN::open(int mode) {
+int MidiDriver_WIN::open(int mode) {
if (_mode != 0)
return MERR_ALREADY_OPEN;