[Scummvm-cvs-logs] CVS: scummvm readme.txt,1.59,1.60 script_v1.cpp,1.107,1.108 scumm.h,1.159,1.160 scummvm.cpp,1.150,1.151 sdl.cpp,1.120,1.121 sound.cpp,1.86,1.87 system.h,1.19,1.20
James Brown
ender at users.sourceforge.net
Tue May 14 11:15:02 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.h,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummvm actor.h,NONE,1.1 actor.cpp,1.64,1.65 boxes.cpp,1.27,1.28 object.cpp,1.67,1.68 script.cpp,1.57,1.58 script_v1.cpp,1.108,1.109 script_v2.cpp,1.61,1.62 scumm.h,1.160,1.161 scummvm.cpp,1.151,1.152 sound.cpp,1.87,1.88 string.cpp,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv5220
Modified Files:
readme.txt script_v1.cpp scumm.h scummvm.cpp sdl.cpp sound.cpp
system.h
Log Message:
Remove SCUMM dependancies from SDL.C - This fixes a regular crash in Simon due to the autosaver.
This changes the OSystem interface. Porters beware.
Index: readme.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/readme.txt,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- readme.txt 13 May 2002 17:36:29 -0000 1.59
+++ readme.txt 14 May 2002 18:14:15 -0000 1.60
@@ -464,6 +464,7 @@
Thanks!
Special thanks to:
+ Sander Buskens - For his work on the initial reversing of Monkey2
Jimmi Thogersen - For ScummRev, and much obscure code/documentation
Kevin Carnes - For Scumm16, the basis of ScummVM older gfx codecs
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- script_v1.cpp 11 May 2002 19:17:58 -0000 1.107
+++ script_v1.cpp 14 May 2002 18:14:15 -0000 1.108
@@ -2710,13 +2710,14 @@
offset = 0;
delay = (int)((getVarOrDirectWord(0x40) & 0xffff) * 7.5);
if (_gameId == GID_LOOM256) {
+ _vars[VAR_MI1_TIMER] = 0;
#ifdef COMPRESSED_SOUND_FILE
if (playMP3CDTrack(1, 0, offset, delay) == -1)
#endif
_system->play_cdrom(1, 0, offset, delay);
- }
- else
+ } else {
warning("parseString: 8");
+ }
}
break;
case 15:
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- scumm.h 13 May 2002 15:28:59 -0000 1.159
+++ scumm.h 14 May 2002 18:14:15 -0000 1.160
@@ -1140,7 +1140,8 @@
uint32 _CLUT_offs, _EPAL_offs;
uint32 _IM00_offs, _PALS_offs;
- bool _fullScreen, _fullRedraw, _BgNeedsRedraw, _shakeEnabled;
+ //ender: fullscreen
+ bool _fullRedraw, _BgNeedsRedraw, _shakeEnabled;
bool _screenEffectFlag, _completeScreenRedraw;
int _cursorHotspotX, _cursorHotspotY, _cursorWidth, _cursorHeight;
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -d -r1.150 -r1.151
--- scummvm.cpp 12 May 2002 17:51:40 -0000 1.150
+++ scummvm.cpp 14 May 2002 18:14:15 -0000 1.151
@@ -28,6 +28,12 @@
#include "string.h"
#include "gameDetector.h"
+int autosave(int interval) /* Not in class to prevent being bound */
+{
+ g_scumm->_doAutosave = true;
+ return interval;
+}
+
void Scumm::initRandSeeds()
{
_randSeed1 = 0xA943DE35;
@@ -170,6 +176,8 @@
#ifdef COMPRESSED_SOUND_FILE
_current_cache = 0;
#endif
+
+ _system->set_timer(5 * 60 * 1000, &autosave);
}
@@ -1198,7 +1206,7 @@
_fastMode ^= 1;
else if (event.kbd.keycode=='g')
_fastMode ^= 2;
- else if ((event.kbd.keycode=='d') && (_fullScreen == false))
+ else if ((event.kbd.keycode=='d') && (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)))
g_debugger.attach(this);
else if (event.kbd.keycode=='s')
resourceStats();
@@ -1410,7 +1418,7 @@
g_scumm = scumm;
/* END HACK */
- scumm->_fullScreen = detector->_fullScreen;
+// scumm->_fullScreen = detector->_fullScreen;
scumm->_debugMode = detector->_debugMode;
scumm->_bootParam = detector->_bootParam;
scumm->_gameDataPath = detector->_gameDataPath;
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- sdl.cpp 11 May 2002 21:22:05 -0000 1.120
+++ sdl.cpp 14 May 2002 18:14:15 -0000 1.121
@@ -96,6 +96,9 @@
// Set a parameter
uint32 property(int param, Property *value);
+ // Add a callback timer
+ void set_timer(int timer, void* callback);
+
static OSystem *create(int gfx_mode, bool full_screen);
private:
@@ -176,8 +179,7 @@
void hotswap_gfx_mode();
- void get_320x200_image(byte *buf);
- static uint32 autosave(uint32);
+ void get_320x200_image(byte *buf);
void setup_icon();
};
@@ -203,14 +205,6 @@
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;
@@ -225,7 +219,6 @@
#endif /* doesn't do COOPERATIVE mode*/
SDL_ShowCursor(SDL_DISABLE);
- SDL_SetTimer(5 * 60 * 1000, (SDL_TimerCallback) autosave);
/* Setup the icon */
syst->setup_icon();
@@ -236,6 +229,9 @@
return syst;
}
+void OSystem_SDL::set_timer(int timer, void* callback) {
+ SDL_SetTimer(timer, (SDL_TimerCallback) callback);
+}
OSystem *OSystem_SDL_create(int gfx_mode, bool full_screen) {
return OSystem_SDL::create(gfx_mode, full_screen);
}
@@ -891,7 +887,6 @@
case PROP_TOGGLE_FULLSCREEN:
_full_screen ^= true;
- g_scumm->_fullScreen = _full_screen;
if (!SDL_WM_ToggleFullScreen(sdl_hwscreen)) {
/* if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode */
@@ -899,6 +894,9 @@
}
return 1;
+ case PROP_GET_FULLSCREEN:
+ return _full_screen;
+
case PROP_SET_WINDOW_CAPTION:
SDL_WM_SetCaption(value->caption, value->caption);
return 1;
@@ -1050,9 +1048,6 @@
}
void OSystem_SDL::play_cdrom(int track, int num_loops, int start_frame, int end_frame) {
- /* Reset sync count */
- g_scumm->_vars[g_scumm->VAR_MI1_TIMER] = 0;
-
if (!num_loops && !start_frame)
return;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- sound.cpp 13 May 2002 08:25:58 -0000 1.86
+++ sound.cpp 14 May 2002 18:14:16 -0000 1.87
@@ -160,6 +160,7 @@
ptr = getResourceAddress(rtSound, sound);
if (ptr != NULL && READ_UINT32_UNALIGNED(ptr) == MKID('SOUN')) {
ptr += 8;
+ _vars[VAR_MI1_TIMER] = 0;
#ifdef COMPRESSED_SOUND_FILE
if ((playMP3CDTrack(ptr[16], ptr[17] == 0xff ? -1 : ptr[17],
(ptr[18] * 60 + ptr[19]) * 75 + ptr[20], 0)) == -1)
Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/system.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- system.h 5 May 2002 20:04:25 -0000 1.19
+++ system.h 14 May 2002 18:14:16 -0000 1.20
@@ -62,6 +62,7 @@
PROP_SET_GFX_MODE = 4,
PROP_SHOW_DEFAULT_CURSOR = 5,
PROP_GET_SAMPLE_RATE = 6,
+ PROP_GET_FULLSCREEN = 7
};
union Property {
char *caption;
@@ -134,6 +135,9 @@
// Update cdrom audio status
virtual void update_cdrom() = 0;
+
+ // Add a new callback timer
+ virtual void set_timer(int timer, void* callback) = 0;
// Quit
virtual void quit() = 0;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.h,1.16,1.17
- Next message: [Scummvm-cvs-logs] CVS: scummvm actor.h,NONE,1.1 actor.cpp,1.64,1.65 boxes.cpp,1.27,1.28 object.cpp,1.67,1.68 script.cpp,1.57,1.58 script_v1.cpp,1.108,1.109 script_v2.cpp,1.61,1.62 scumm.h,1.160,1.161 scummvm.cpp,1.151,1.152 sound.cpp,1.87,1.88 string.cpp,1.40,1.41
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list