[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.39,1.40 gui.cpp,1.37,1.38 readme.txt,1.35,1.36 scumm.h,1.144,1.145 scummvm.cpp,1.127,1.128 sdl.cpp,1.101,1.102
James Brown
ender at users.sourceforge.net
Fri Apr 26 21:32:03 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv13062
Modified Files:
gameDetector.cpp gui.cpp readme.txt scumm.h scummvm.cpp
sdl.cpp
Log Message:
Add autosave support, fix sm and max midi.
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** gameDetector.cpp 26 Apr 2002 23:41:11 -0000 1.39
--- gameDetector.cpp 27 Apr 2002 04:31:24 -0000 1.40
***************
*** 298,304 ****
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},
{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0,
! GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY},
/* Scumm Version 7 */
--- 298,304 ----
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},
{"snmdemo", "Sam & Max (Demo)", GID_SAMNMAX, 6, 3, 0,
! GF_NEW_OPCODES | GF_AFTER_V6 | GF_USE_KEY | GF_ADLIB_DEFAULT},
/* Scumm Version 7 */
Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** gui.cpp 21 Apr 2002 21:54:08 -0000 1.37
--- gui.cpp 27 Apr 2002 04:31:24 -0000 1.38
***************
*** 655,659 ****
draw(20, 28);
return;
! case 3: /* save button */
_cur_page = 2;
getSavegameNames(0);
--- 655,659 ----
draw(20, 28);
return;
! case 3: /* save button */
_cur_page = 2;
getSavegameNames(0);
***************
*** 678,681 ****
--- 678,684 ----
if (lastEdit == -1 || game_names[lastEdit][0] == 0)
return;
+ if (_cur_page == 2)
+ _slotIndex++;
+
_s->_saveLoadSlot = lastEdit + _slotIndex;
_s->_saveLoadCompatible = false;
***************
*** 712,715 ****
--- 715,721 ----
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]);
Index: readme.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/readme.txt,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** readme.txt 26 Apr 2002 14:13:39 -0000 1.35
--- readme.txt 27 Apr 2002 04:31:24 -0000 1.36
***************
*** 237,240 ****
--- 237,261 ----
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:
***************
*** 242,247 ****
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.
If you ARE using MIDI, you have several different choices of output,
--- 263,268 ----
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.
If you ARE using MIDI, you have several different choices of output,
***************
*** 249,257 ****
-eadlib - Uses internal Adlib Emulation (default)
! -ewindows - Windows MIDI. Uses built-in sequencer. Only on Windows
-etimidity - Uses Timidity for music. Requires Timidity.
! -eseq - Uses /dev/sequencer for MIDI. *nix only.
-eqt - Quicktime sound, for Macintosh users.
! -eamidi - Uses the MorphOS MIDI system. MorphOS only.
-enull - Null output. Don't play any music.
--- 270,279 ----
-eadlib - Uses internal Adlib Emulation (default)
! -ewindows - Windows MIDI. Uses built-in sequencer, for Windows users
-etimidity - Uses Timidity for music. Requires Timidity.
! -eseq - Uses /dev/sequencer for MIDI, *nix users.
-eqt - Quicktime sound, for Macintosh users.
! -ecore - Core sound, for Macintosh users.
! -eamidi - Uses the MorphOS MIDI system, for MorphOS users
-enull - Null output. Don't play any music.
***************
*** 304,323 ****
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:
--- 326,329 ----
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** scumm.h 26 Apr 2002 18:52:33 -0000 1.144
--- scumm.h 27 Apr 2002 04:31:24 -0000 1.145
***************
*** 706,709 ****
--- 706,710 ----
/* Save/Load class - some of this may be GUI */
byte _saveLoadFlag, _saveLoadSlot;
+ bool _doAutosave;
bool _saveLoadCompatible;
char _saveLoadName[32];
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -C2 -d -r1.127 -r1.128
*** scummvm.cpp 26 Apr 2002 14:13:39 -0000 1.127
--- scummvm.cpp 27 Apr 2002 04:31:24 -0000 1.128
***************
*** 275,278 ****
--- 275,286 ----
}
+ if (_doAutosave) {
+ _saveLoadSlot = 0;
+ sprintf(_saveLoadName, "Autosave %d", _saveLoadSlot);
+ _saveLoadFlag = 1;
+ _saveLoadCompatible = false;
+ _doAutosave = false;
+ }
+
if (_completeScreenRedraw) {
int i;
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.101
retrieving revision 1.102
diff -C2 -d -r1.101 -r1.102
*** sdl.cpp 24 Apr 2002 07:42:29 -0000 1.101
--- sdl.cpp 27 Apr 2002 04:31:24 -0000 1.102
***************
*** 180,183 ****
--- 180,184 ----
void get_320x200_image(byte *buf);
+ static uint32 autosave(uint32);
};
***************
*** 192,197 ****
uint8 *dstPtr, uint32 dstPitch, int width, int height);
-
-
void atexit_proc() {
SDL_ShowCursor(SDL_ENABLE);
--- 193,196 ----
***************
*** 199,202 ****
--- 198,209 ----
}
+ 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();
***************
*** 204,212 ****
syst->_full_screen = full_screen;
! if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) ==-1) {
error("Could not initialize SDL: %s.\n", SDL_GetError());
}
SDL_ShowCursor(SDL_DISABLE);
/* Clean up on exit */
--- 211,220 ----
syst->_full_screen = full_screen;
! 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 */
More information about the Scummvm-git-logs
mailing list