[Scummvm-cvs-logs] SF.net SVN: scummvm: [32157] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sat May 17 21:01:00 CEST 2008
Revision: 32157
http://scummvm.svn.sourceforge.net/scummvm/?rev=32157&view=rev
Author: drmccoy
Date: 2008-05-17 12:01:00 -0700 (Sat, 17 May 2008)
Log Message:
-----------
Changing debug channels a bit
Modified Paths:
--------------
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/gob/gob.h
scummvm/trunk/engines/gob/inter_v2.cpp
scummvm/trunk/engines/gob/inter_v4.cpp
scummvm/trunk/engines/gob/sound/adlib.cpp
scummvm/trunk/engines/gob/sound/cdrom.cpp
scummvm/trunk/engines/gob/sound/sound.cpp
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/gob.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -85,12 +85,13 @@
Common::addSpecialDebugLevel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level");
Common::addSpecialDebugLevel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level");
Common::addSpecialDebugLevel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level");
- Common::addSpecialDebugLevel(kDebugMusic, "Music", "CD, Adlib and Infogrames music debug level");
+ Common::addSpecialDebugLevel(kDebugSound, "Sound", "Sound output debug level");
Common::addSpecialDebugLevel(kDebugParser, "Parser", "Parser debug level");
Common::addSpecialDebugLevel(kDebugGameFlow, "Gameflow", "Gameflow debug level");
Common::addSpecialDebugLevel(kDebugFileIO, "FileIO", "File Input/Output debug level");
Common::addSpecialDebugLevel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level");
Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level");
+ Common::addSpecialDebugLevel(kDebugVideo, "Video", "IMD/VMD video debug level");
Common::addSpecialDebugLevel(kDebugCollisions, "Collisions", "Collisions debug level");
syst->getEventManager()->registerRandomSource(_rnd, "gob");
Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/gob.h 2008-05-17 19:01:00 UTC (rev 32157)
@@ -100,13 +100,14 @@
kDebugFuncOp = 1 << 0,
kDebugDrawOp = 1 << 1,
kDebugGobOp = 1 << 2,
- kDebugMusic = 1 << 3, // CD, Adlib and Infogrames music
+ kDebugSound = 1 << 3,
kDebugParser = 1 << 4,
kDebugGameFlow = 1 << 5,
kDebugFileIO = 1 << 6,
kDebugSaveLoad = 1 << 7,
kDebugGraphics = 1 << 8,
- kDebugCollisions = 1 << 9
+ kDebugVideo = 1 << 9,
+ kDebugCollisions = 1 << 10
};
inline char *strncpy0(char *dest, const char *src, size_t n) {
Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/inter_v2.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -1087,6 +1087,8 @@
}
void Inter_v2::o2_waitCDTrackEnd() {
+ debugC(1, kDebugSound, "CDROM: Waiting for playback to end");
+
while (_vm->_sound->cdGetTrackPos() >= 0)
_vm->_util->longDelay(1);
}
@@ -2056,7 +2058,6 @@
strncpy0(fileName, GET_VAR_STR(varName), 15);
strcat(fileName, ".INS");
- debugC(1, kDebugMusic, "Loading Infogrames instrument file \"%s\"", fileName);
_vm->_sound->infogramesLoadInstruments(fileName);
}
@@ -2069,7 +2070,6 @@
strncpy0(fileName, GET_VAR_STR(varName), 15);
strcat(fileName, ".DUM");
- debugC(1, kDebugMusic, "Playing Infogrames music file \"%s\"", fileName);
_vm->_sound->infogramesLoadSong(fileName);
_vm->_sound->infogramesPlay();
Modified: scummvm/trunk/engines/gob/inter_v4.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v4.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/inter_v4.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -687,6 +687,8 @@
}
if (op == NULL) {
+ warning("unimplemented opcodeGoblin: %d", i);
+
int16 val;
_vm->_global->_inter_execPtr -= 2;
@@ -739,11 +741,14 @@
palEnd = _vm->_parse->parseValExpr();
palCmd = 1 << (flags & 0x3F);
+ debugC(1, kDebugVideo, "Playing video \"%s\" @ %d+%d, frames %d - %d, "
+ "paletteCmd %d (%d - %d), flags %X", fileName, x, y, startFrame, lastFrame,
+ palCmd, palStart, palEnd, flags);
+
close = false;
if (lastFrame == -1) {
close = true;
} else if (lastFrame == -3) {
-// warning("Woodruff Stub: Video/Music command -3: Play background video %s, %d, %d, %d, %d", fileName, startFrame, x, y, VAR_OFFSET(7872));
_vm->_mult->_objects[startFrame].pAnimData->animation = -startFrame - 1;
@@ -767,17 +772,16 @@
warning("Woodruff Stub: Video/Music command -4: Play background video %s", fileName);
return;
} else if (lastFrame == -5) {
-// warning("Woodruff Stub: Video/Music command -5: Stop background music");
_vm->_sound->bgStop();
return;
} else if (lastFrame == -6) {
-// warning("Woodruff Stub: Video/Music command -6: Load background video %s", fileName);
return;
+ } else if (lastFrame == -7) {
+ return;
} else if (lastFrame == -8) {
warning("Woodruff Stub: Video/Music command -8: Play background video %s", fileName);
return;
} else if (lastFrame == -9) {
-// warning("Woodruff Stub: Video/Music command -9: Play background music %s (%d-%d)", fileName, palEnd, palStart);
_vm->_sound->bgStop();
_vm->_sound->bgSetPlayMode(BackgroundAtmosphere::kPlayModeRandom);
_vm->_sound->bgPlay(fileName, palStart);
Modified: scummvm/trunk/engines/gob/sound/adlib.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/adlib.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/sound/adlib.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -125,7 +125,7 @@
}
void AdLib::writeOPL(byte reg, byte val) {
- debugC(6, kDebugMusic, "writeOPL(%02X, %02X)", reg, val);
+ debugC(6, kDebugSound, "writeOPL(%02X, %02X)", reg, val);
OPLWriteReg(_opl, reg, val);
}
Modified: scummvm/trunk/engines/gob/sound/cdrom.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/cdrom.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/sound/cdrom.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -83,8 +83,6 @@
if (!_LICbuffer)
return;
- debugC(1, kDebugMusic, "CDROM::startTrack(%s)", trackName);
-
byte *matchPtr = getTrackBuffer(trackName);
if (!matchPtr) {
warning("Track \"%s\" not found", trackName);
@@ -114,8 +112,6 @@
// HSG encodes frame information into a double word:
// minute multiplied by 4500, plus second multiplied by 75,
// plus frame, minus 150
- debugC(1, kDebugMusic, "CDROM::play(%d, %d)", from, to);
-
AudioCD.play(1, 1, from, to - from + 1);
_cdPlaying = true;
}
@@ -159,8 +155,6 @@
}
void CDROM::stop() {
- debugC(1, kDebugMusic, "CDROM::stop()");
-
_curTrackBuffer = 0;
AudioCD.stop();
_cdPlaying = false;
Modified: scummvm/trunk/engines/gob/sound/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/sound.cpp 2008-05-17 18:24:14 UTC (rev 32156)
+++ scummvm/trunk/engines/gob/sound/sound.cpp 2008-05-17 19:01:00 UTC (rev 32157)
@@ -92,6 +92,8 @@
if (!sndDesc)
return false;
+ debugC(2, kDebugSound, "Loading sample \"%s\"", fileName);
+
int16 handle = _vm->_dataIO->openData(fileName);
if (handle < 0) {
warning("Can't open sample file \"%s\"", fileName);
@@ -137,6 +139,8 @@
if (!_pcspeaker)
return;
+ debugC(1, kDebugSound, "PCSpeaker: Playing tone (%d, %d)", frequency, length);
+
_pcspeaker->speakerOn(frequency, length);
}
@@ -144,6 +148,8 @@
if (!_pcspeaker)
return;
+ debugC(1, kDebugSound, "PCSpeaker: Stopping tone");
+
_pcspeaker->speakerOff();
}
@@ -158,6 +164,8 @@
if (!_infogrames)
return false;
+ debugC(1, kDebugSound, "Infogrames: Loading instruments \"%s\"", fileName);
+
return _infogrames->loadInstruments(fileName);
}
@@ -165,6 +173,8 @@
if (!_infogrames)
return false;
+ debugC(1, kDebugSound, "Infogrames: Loading song \"%s\"", fileName);
+
return _infogrames->loadSong(fileName);
}
@@ -172,6 +182,8 @@
if (!_infogrames)
return;
+ debugC(1, kDebugSound, "Infogrames: Starting playback");
+
_infogrames->play();
}
@@ -179,6 +191,8 @@
if (!_infogrames)
return;
+ debugC(1, kDebugSound, "Infogrames: Stopping playback");
+
_infogrames->stop();
}
@@ -186,6 +200,8 @@
if (!_adlib)
return false;
+ debugC(1, kDebugSound, "Adlib: Loading data (\"%s\")", fileName);
+
return _adlib->load(fileName);
}
@@ -193,6 +209,8 @@
if (!_adlib)
return false;
+ debugC(1, kDebugSound, "Adlib: Loading data (%d)", index);
+
return _adlib->load(data, size, index);
}
@@ -200,6 +218,8 @@
if (!_adlib)
return;
+ debugC(1, kDebugSound, "Adlib: Unloading data");
+
_adlib->unload();
}
@@ -207,7 +227,7 @@
if (!_adlib || _adlib->isPlaying())
return;
- debugC(1, kDebugMusic, "Adlib::playTrack(%s)", trackname);
+ debugC(1, kDebugSound, "Adlib: Playing track \"%s\"", trackname);
_adlib->unload();
_adlib->load(trackname);
@@ -235,6 +255,8 @@
if (!_adlib)
return;
+ debugC(1, kDebugSound, "Adlib: Starting playback");
+
_adlib->startPlay();
}
@@ -242,6 +264,8 @@
if (!_adlib)
return;
+ debugC(1, kDebugSound, "Adlib: Stopping playback");
+
_adlib->stopPlay();
}
@@ -278,6 +302,9 @@
if (!_blaster || !sndDesc)
return;
+ debugC(1, kDebugSound, "SoundBlaster: Playing sample (%d, %d, %d)",
+ repCount, frequency, fadeLength);
+
_blaster->playSample(*sndDesc, repCount, frequency, fadeLength);
}
@@ -285,6 +312,8 @@
if (!_blaster)
return;
+ debugC(1, kDebugSound, "SoundBlaster: Stopping playback");
+
_blaster->stopSound(fadeLength, sndDesc);
}
@@ -293,6 +322,9 @@
if (!_blaster)
return;
+ debugC(1, kDebugSound, "SoundBlaster: Playing composition (%d, %d)",
+ freqVal, sndCount);
+
blasterWaitEndPlay();
_blaster->stopComposition();
@@ -306,6 +338,8 @@
if (!_blaster)
return;
+ debugC(1, kDebugSound, "SoundBlaster: Stopping composition");
+
_blaster->stopComposition();
}
@@ -327,6 +361,8 @@
if (!_blaster)
return;
+ debugC(1, kDebugSound, "SoundBlaster: Waiting for playback to end");
+
if (stopComp)
_blaster->endComposition();
@@ -345,6 +381,8 @@
if (!_cdrom)
return;
+ debugC(1, kDebugSound, "CDROM: Loading LIC \"%s\"", fname);
+
int handle = _vm->_dataIO->openData(fname);
if (handle == -1)
@@ -366,6 +404,8 @@
if (!_cdrom)
return;
+ debugC(1, kDebugSound, "CDROM: Unloading LIC");
+
_cdrom->freeLICBuffer();
}
@@ -400,6 +440,9 @@
for (int i = 0; i < ARRAYSIZE(tracks); i++)
if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) {
+ debugC(1, kDebugSound, "CDROM: Playing background music \"%s\" (\"%s\")",
+ tracks[i][1], _vm->_game->_curTotFile);
+
_cdrom->startTrack(tracks[i][1]);
break;
}
@@ -422,6 +465,9 @@
int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2;
for (int i = 0; i < ARRAYSIZE(tracks); i++)
if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) {
+ debugC(1, kDebugSound, "CDROM: Playing mult music \"%s\" (\"%s\")",
+ tracks[i][language + 1], _vm->_game->_curTotFile);
+
_cdrom->startTrack(tracks[i][language + 1]);
break;
}
@@ -431,6 +477,7 @@
if (!_cdrom)
return;
+ debugC(1, kDebugSound, "CDROM: Playing track \"%s\"", trackName);
_cdrom->startTrack(trackName);
}
@@ -438,6 +485,7 @@
if (!_cdrom)
return;
+ debugC(1, kDebugSound, "CDROM: Stopping playback");
_cdrom->stopPlaying();
}
@@ -473,6 +521,8 @@
if (!_bgatmos)
return;
+ debugC(1, kDebugSound, "BackgroundAtmosphere: Playing \"%s\" (%d)", base, count);
+
_bgatmos->stop();
_bgatmos->queueClear();
@@ -495,6 +545,8 @@
if (!_bgatmos)
return;
+ debugC(1, kDebugSound, "BackgroundAtmosphere: Stopping playback");
+
_bgatmos->stop();
_bgatmos->queueClear();
}
@@ -510,6 +562,8 @@
if (!_bgatmos)
return;
+ debugC(1, kDebugSound, "BackgroundAtmosphere: Shading playback");
+
_bgatmos->shade();
}
@@ -517,6 +571,8 @@
if (!_bgatmos)
return;
+ debugC(1, kDebugSound, "BackgroundAtmosphere: Unshading playback");
+
_bgatmos->unshade();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list