aboutsummaryrefslogtreecommitdiff
path: root/scummvm.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2002-04-17 20:34:10 +0000
committerNicolas Bacca2002-04-17 20:34:10 +0000
commit900e3bd586a0425a5735e7dcb4b32a1917bb87f2 (patch)
tree7e80a366bac0650a23d3d77fa76f25bceca81f43 /scummvm.cpp
parentbb06400d007d0056434fe4a0076e8dacfcd26aec (diff)
downloadscummvm-rg350-900e3bd586a0425a5735e7dcb4b32a1917bb87f2.tar.gz
scummvm-rg350-900e3bd586a0425a5735e7dcb4b32a1917bb87f2.tar.bz2
scummvm-rg350-900e3bd586a0425a5735e7dcb4b32a1917bb87f2.zip
Restored update mess ...
svn-id: r3982
Diffstat (limited to 'scummvm.cpp')
-rw-r--r--scummvm.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/scummvm.cpp b/scummvm.cpp
index 277872ebfc..0d6385a207 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -906,6 +906,7 @@ void Scumm::convertKeysToClicks()
Actor *Scumm::derefActorSafe(int id, const char *errmsg)
{
if (id < 1 || id >= NUM_ACTORS) {
+ if (_debugMode)
warning
("Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.",
id, errmsg, vm.slot[_curExecScript].number, _opcode);
@@ -1152,6 +1153,7 @@ void Scumm::waitForTimer(int msec_delay) {
}
}
+ _system->update_cdrom(); /* Loop CD Audio if needed */
if (_system->get_msecs() >= start_time + msec_delay)
break;
_system->delay_msecs(10);
@@ -1216,6 +1218,7 @@ void Scumm::launch()
_minHeapThreshold = 400000;
/* Create a primary virtual screen */
+ _videoBuffer = (byte*)malloc(328*200);
allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
initVirtScreen(0, 0, 200, false, false);
@@ -1290,10 +1293,18 @@ Scumm *Scumm::createFromDetector(GameDetector *detector, OSystem *syst)
syst->property(OSystem::PROP_OPEN_CD, detector->_cdrom);
/* bind the mixer to the system => mixer will be invoked
- * automatically when samples need to be generated */
- scumm->_mixer->bind_to_system(syst);
+ * 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);
+
scumm->_fullScreen = detector->_fullScreen;
scumm->_debugMode = detector->_debugMode;
scumm->_bootParam = detector->_bootParam;