[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.14,1.15 gfx.cpp,1.65,1.66 main.cpp,1.6,1.7 resource.cpp,1.67,1.68 scumm.h,1.119,1.120 scummvm.cpp,1.112,1.113 sdl.cpp,1.92,1.93 system.h,1.7,1.8
Ludvig Strigeus
strigeus at users.sourceforge.net
Tue Apr 16 05:08:19 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv12090
Modified Files:
gameDetector.cpp gfx.cpp main.cpp resource.cpp scumm.h
scummvm.cpp sdl.cpp system.h
Log Message:
endian fixes,
don't use adlib driver if sound initialization fails,
simon1 savedialog works
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** gameDetector.cpp 15 Apr 2002 18:07:55 -0000 1.14
--- gameDetector.cpp 16 Apr 2002 12:07:16 -0000 1.15
***************
*** 381,386 ****
if (!_gameDataPath) {
warning("No path was provided. Assuming that data file are in the current directory");
! _gameDataPath = (char *)malloc(sizeof(char) * 2);
! strcpy(_gameDataPath, "");
}
--- 381,385 ----
if (!_gameDataPath) {
warning("No path was provided. Assuming that data file are in the current directory");
! _gameDataPath = strdup("");
}
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** gfx.cpp 15 Apr 2002 17:45:52 -0000 1.65
--- gfx.cpp 16 Apr 2002 12:07:16 -0000 1.66
***************
*** 158,186 ****
}
- void Scumm::redrawLines(int from, int to)
- {
- VirtScreen *vs = virtscr;
- int i, j;
-
- if (to <= from)
- return;
-
- for (i = 0; i != ARRAYSIZE(virtscr); i++, vs++) {
- if (to > vs->topline && from < vs->topline + vs->height) {
- int min = from - vs->topline;
- int max = to - vs->topline;
- if (min < 0)
- min = 0;
- if (max > vs->height)
- max = vs->height;
- for (j = 0; j != 40; j++) {
- vs->tdirty[j] = min;
- vs->bdirty[j] = max;
- }
- gdi.updateDirtyScreen(vs);
- }
- }
- }
-
void Scumm::updateDirtyScreen(int slot)
{
--- 158,161 ----
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/main.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** main.cpp 15 Apr 2002 18:07:55 -0000 1.6
--- main.cpp 16 Apr 2002 12:07:16 -0000 1.7
***************
*** 71,74 ****
--- 71,75 ----
simon->_game = detector._gameId - GID_SIMON_FIRST;
simon->set_volume(detector._sfx_volume);
+ simon->_game_path = detector._gameDataPath;
simon->go();
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** resource.cpp 13 Apr 2002 18:31:44 -0000 1.67
--- resource.cpp 16 Apr 2002 12:07:16 -0000 1.68
***************
*** 738,742 ****
return READ_LE_UINT32(ptr) - 6;
else
! return READ_BE_UINT32(ptr - 4) - 8;
}
--- 738,742 ----
return READ_LE_UINT32(ptr) - 6;
else
! return READ_BE_UINT32_UNALIGNED(ptr - 4) - 8;
}
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** scumm.h 15 Apr 2002 20:22:46 -0000 1.119
--- scumm.h 16 Apr 2002 12:07:17 -0000 1.120
***************
*** 83,87 ****
#define RES_DATA(x) (((byte*)x) + sizeof(ResHdr))
! #define RES_SIZE(x) ( READ_BE_UINT32(&((ResHdr*)x)->size) )
--- 83,87 ----
#define RES_DATA(x) (((byte*)x) + sizeof(ResHdr))
! #define RES_SIZE(x) ( READ_BE_UINT32_UNALIGNED(&((ResHdr*)x)->size) )
***************
*** 595,602 ****
Scumm(); // constructor
! /* video buffer */
! byte _videoBuffer[328*200]; // main video buffer
!
! /* system call object */
/* Scumm main loop */
--- 595,599 ----
Scumm(); // constructor
! byte *_videoBuffer;
/* Scumm main loop */
***************
*** 1123,1127 ****
void redrawBGStrip(int start, int num);
void redrawBGAreas();
- void redrawLines(int from, int to);
void moveCamera();
--- 1120,1123 ----
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** scummvm.cpp 15 Apr 2002 18:07:55 -0000 1.112
--- scummvm.cpp 16 Apr 2002 12:07:17 -0000 1.113
***************
*** 64,67 ****
--- 64,68 ----
loadCharset(1);
+
initScreens(0, 16, 320, 144);
***************
*** 1212,1215 ****
--- 1213,1217 ----
/* Create a primary virtual screen */
+ _videoBuffer = (byte*)malloc(328*200);
allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
***************
*** 1287,1291 ****
/* bind the mixer to the system => mixer will be invoked
* automatically when samples need to be generated */
! scumm->_mixer->bind_to_system(syst);
scumm->_mixer->set_volume(128);
--- 1289,1301 ----
/* bind the mixer to the system => mixer will be invoked
* automatically when samples need to be generated */
! if (!scumm->_mixer->bind_to_system(syst)) {
! warning("Sound initialization failed");
! if (detector->_use_adlib) {
! detector->_use_adlib = false;
! detector->_midi_driver = MD_NULL;
! warning("Adlib music was selected, switching to midi null driver");
! }
! }
!
scumm->_mixer->set_volume(128);
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** sdl.cpp 15 Apr 2002 17:45:52 -0000 1.92
--- sdl.cpp 16 Apr 2002 12:07:18 -0000 1.93
***************
*** 53,57 ****
// Set function that generates samples
! void set_sound_proc(void *param, SoundProc *proc, byte sound);
// Quit
--- 53,57 ----
// Set function that generates samples
! bool set_sound_proc(void *param, SoundProc *proc, byte sound);
// Quit
***************
*** 459,462 ****
--- 459,464 ----
void OSystem_SDL::add_dirty_rgn_auto(const byte *buf) {
+ assert( ((uint32)buf & 3) == 0);
+
/* generate a table of the checksums */
mk_checksums(buf);
***************
*** 714,718 ****
}
! void OSystem_SDL::set_sound_proc(void *param, SoundProc *proc, byte format) {
SDL_AudioSpec desired;
--- 716,720 ----
}
! bool OSystem_SDL::set_sound_proc(void *param, SoundProc *proc, byte format) {
SDL_AudioSpec desired;
***************
*** 725,730 ****
desired.callback = proc;
desired.userdata = param;
! SDL_OpenAudio(&desired, NULL);
SDL_PauseAudio(0);
}
--- 727,735 ----
desired.callback = proc;
desired.userdata = param;
! if (SDL_OpenAudio(&desired, NULL) != 0) {
! return false;
! }
SDL_PauseAudio(0);
+ return true;
}
***************
*** 1032,1036 ****
void *create_thread(ThreadProc *proc, void *param) { return NULL; }
bool poll_event(Event *event) { return false; }
! void set_sound_proc(void *param, SoundProc *proc, byte sound) {}
void quit() { exit(1); }
uint32 property(int param, uint32 value) { return 0; }
--- 1037,1041 ----
void *create_thread(ThreadProc *proc, void *param) { return NULL; }
bool poll_event(Event *event) { return false; }
! bool set_sound_proc(void *param, SoundProc *proc, byte sound) {}
void quit() { exit(1); }
uint32 property(int param, uint32 value) { return 0; }
Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/system.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** system.h 14 Apr 2002 19:43:11 -0000 1.7
--- system.h 16 Apr 2002 12:07:18 -0000 1.8
***************
*** 90,94 ****
// Format is the sample type format.
// Only 16-bit signed mode is needed for simon & scumm
! virtual void set_sound_proc(void *param, SoundProc *proc, byte format) = 0;
// Get or set a property
--- 90,94 ----
// Format is the sample type format.
// Only 16-bit signed mode is needed for simon & scumm
! virtual bool set_sound_proc(void *param, SoundProc *proc, byte format) = 0;
// Get or set a property
More information about the Scummvm-git-logs
mailing list