[Scummvm-git-logs] scummvm master -> b34411bc23f9cfce0574de61f393e98c816a5f8d

sev- noreply at scummvm.org
Sat Feb 22 14:51:39 UTC 2025


This automated email contains information about 10 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fe27041c57 COMMON: Hid "file not found" debug message deeper
45f18df63b VIDEO: QTVR: Do not error out on non-QTVR movies
204af35019 COMMON: Added debug level for global graphics
0bfebda407 COMMON: Added Rect::debugPrintC()
0988c49f5b IMAGE: Put PICT parser debug messages into 'ggraphics' debug channel
6ae04dc157 COMMON: Added 'gvideo' global debug channel
531e1effbd VIDEO: Switched decoder debug output to 'gvideo' debug channel
c5ad81dd5d COMMON: Added debugPrintC() method to Common::Rational
2435439665 COMMON: FORMATS: Put QT parser debug output to 'gvideo' debug channel
b34411bc23 ENGINES: [a-k]*: Switched Debug Channels from bitfield to sequential enum


Commit: fe27041c571abf153500f81f451d6ade7cdc1c01
    https://github.com/scummvm/scummvm/commit/fe27041c571abf153500f81f451d6ade7cdc1c01
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:23+01:00

Commit Message:
COMMON: Hid "file not found" debug message deeper

Changed paths:
    common/file.cpp


diff --git a/common/file.cpp b/common/file.cpp
index 45f1087f09d..c81f1763f02 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -80,7 +80,7 @@ bool File::open(SeekableReadStream *stream, const String &name) {
 		_handle = stream;
 		_name = name;
 	} else {
-		debug(2, "File::open: opening '%s' failed", name.c_str());
+		debug(8, "File::open: opening '%s' failed", name.c_str());
 	}
 	return _handle != nullptr;
 }


Commit: 45f18df63beaebd81a001b47161b5acb2032e32d
    https://github.com/scummvm/scummvm/commit/45f18df63beaebd81a001b47161b5acb2032e32d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:23+01:00

Commit Message:
VIDEO: QTVR: Do not error out on non-QTVR movies

Changed paths:
    video/qtvr_decoder.cpp


diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 46b36b3c81c..10323c081fc 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -274,7 +274,7 @@ void QuickTimeDecoder::setUpdateMode(Common::String mode) {
 
 void QuickTimeDecoder::setTargetSize(uint16 w, uint16 h) {
 	if (!isVR())
-		error("QuickTimeDecoder::setTargetSize() called on non-VR movie");
+		warning("QuickTimeDecoder::setTargetSize() called on non-VR movie");
 
 	if (_qtvrType == QTVRType::PANORAMA) {
 		_width = w;


Commit: 204af35019646b421a0a87e3a417a6306cdac97e
    https://github.com/scummvm/scummvm/commit/204af35019646b421a0a87e3a417a6306cdac97e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:23+01:00

Commit Message:
COMMON: Added debug level for global graphics

Changed paths:
    common/debug.cpp
    common/debug.h


diff --git a/common/debug.cpp b/common/debug.cpp
index 3dc37c8b212..5d2d8fae01c 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -36,6 +36,7 @@ const DebugChannelDef gDebugChannels[] = {
 	{ kDebugGlobalDetection, "detection", "debug messages for advancedDetector" },
 	{ kDebugLevelMainGUI,    "maingui",   "debug messages for GUI" },
 	{ kDebugLevelMacGUI,     "macgui",    "debug messages for MacGUI" },
+	{ kDebugLevelGGraphics,  "ggraphics", "debug messages for global graphics" },
 	DEBUG_CHANNEL_END
 };
 namespace Common {
diff --git a/common/debug.h b/common/debug.h
index a2a69972344..970b5ee49ac 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -163,6 +163,7 @@ enum GlobalDebugLevels {
 	kDebugLevelEventRec,
 	kDebugLevelMainGUI,
 	kDebugLevelMacGUI,
+	kDebugLevelGGraphics,
 };
 
 /** @} */


Commit: 0bfebda4071f67b413580053b2a6b2868533c628
    https://github.com/scummvm/scummvm/commit/0bfebda4071f67b413580053b2a6b2868533c628
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
COMMON: Added Rect::debugPrintC()

Changed paths:
    common/rect.h


diff --git a/common/rect.h b/common/rect.h
index 9ff9ffcff8c..36968ccc0fa 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -371,6 +371,13 @@ struct Rect {
 		debug(debuglevel, "%s %d, %d, %d, %d", caption, left, top, right, bottom);
 	}
 
+	 /**
+	 * Print debug messages related to this class.
+	 */
+	void debugPrintC(int debuglevel, uint32 debugChannels, const char *caption = "Rect:") const {
+		debugC(debuglevel, debugChannels, "%s %d, %d, %d, %d", caption, left, top, right, bottom);
+	}
+
 	/**
 	 * Create a rectangle around the given center.
 	 * @note The center point is rounded up and left when given an odd width and height.


Commit: 0988c49f5b816cc7bea880f19c4c584dc86ead8a
    https://github.com/scummvm/scummvm/commit/0988c49f5b816cc7bea880f19c4c584dc86ead8a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
IMAGE: Put PICT parser debug messages into 'ggraphics' debug channel

Changed paths:
    image/pict.cpp


diff --git a/image/pict.cpp b/image/pict.cpp
index defeb3c09ef..1d41281038c 100644
--- a/image/pict.cpp
+++ b/image/pict.cpp
@@ -106,18 +106,18 @@ void PICTDecoder::o_nop(Common::SeekableReadStream &) {
 void PICTDecoder::o_clip(Common::SeekableReadStream &stream) {
 	// Ignore
 	int size = stream.readUint16BE();
-	debug(3, "CLIP: size is %d", size);
+	debugC(3, kDebugLevelGGraphics, "CLIP: size is %d", size);
 	if (size >= 10) {
 		int x1 = stream.readSint16BE();
 		int y1 = stream.readSint16BE();
 		int x2 = stream.readSint16BE();
 		int y2 = stream.readSint16BE();
-		debug(3, "CLIP: RECT encountered: %d %d %d %d", x1, y1, x2, y2);
+		debugC(3, kDebugLevelGGraphics, "CLIP: RECT encountered: %d %d %d %d", x1, y1, x2, y2);
 		stream.skip(size - 10);
-		debug(3, "CLIP: skipped %d bytes", size - 10);
+		debugC(3, kDebugLevelGGraphics, "CLIP: skipped %d bytes", size - 10);
 	} else {
 		stream.skip(size - 2);
-		debug(3, "CLIP: skipped %d bytes", size - 2);
+		debugC(3, kDebugLevelGGraphics, "CLIP: skipped %d bytes", size - 2);
 	}
 }
 
@@ -334,7 +334,7 @@ bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {
 	_imageRect.left = stream.readUint16BE();
 	_imageRect.bottom = stream.readUint16BE();
 	_imageRect.right = stream.readUint16BE();
-	_imageRect.debugPrint(8, "PICTDecoder::loadStream(): loaded rect: ");
+	_imageRect.debugPrintC(8, kDebugLevelGGraphics, "PICTDecoder::loadStream(): loaded rect: ");
 
 	// NOTE: This is only a subset of the full PICT format.
 	//     - Only V2 (Extended) Images Supported
@@ -363,7 +363,7 @@ bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {
 
 		for (uint32 i = 0; i < _opcodes.size(); i++) {
 			if (_opcodes[i].op == opcode) {
-				debug(4, "Running PICT opcode %04x '%s'", opcode, _opcodes[i].desc);
+				debugC(4, kDebugLevelGGraphics, "Running PICT opcode %04x '%s'", opcode, _opcodes[i].desc);
 				(this->*(_opcodes[i].proc))(stream);
 				break;
 			} else if (i == _opcodes.size() - 1) {


Commit: 6ae04dc1577f8ba986b4d2c5f5111b810c75f963
    https://github.com/scummvm/scummvm/commit/6ae04dc1577f8ba986b4d2c5f5111b810c75f963
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
COMMON: Added 'gvideo' global debug channel

Changed paths:
    common/debug.cpp
    common/debug.h


diff --git a/common/debug.cpp b/common/debug.cpp
index 5d2d8fae01c..e48f25253a3 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -37,6 +37,7 @@ const DebugChannelDef gDebugChannels[] = {
 	{ kDebugLevelMainGUI,    "maingui",   "debug messages for GUI" },
 	{ kDebugLevelMacGUI,     "macgui",    "debug messages for MacGUI" },
 	{ kDebugLevelGGraphics,  "ggraphics", "debug messages for global graphics" },
+	{ kDebugLevelGVideo,     "gvideo",    "debug messages for global video" },
 	DEBUG_CHANNEL_END
 };
 namespace Common {
diff --git a/common/debug.h b/common/debug.h
index 970b5ee49ac..e0e88cae4bf 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -164,6 +164,7 @@ enum GlobalDebugLevels {
 	kDebugLevelMainGUI,
 	kDebugLevelMacGUI,
 	kDebugLevelGGraphics,
+	kDebugLevelGVideo,
 };
 
 /** @} */


Commit: 531e1effbdc0ccedd186e47c7eb0c73af02f1e33
    https://github.com/scummvm/scummvm/commit/531e1effbdc0ccedd186e47c7eb0c73af02f1e33
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
VIDEO: Switched decoder debug output to 'gvideo' debug channel

Changed paths:
    video/avi_decoder.cpp
    video/dxa_decoder.cpp
    video/mkv_decoder.cpp
    video/mpegps_decoder.cpp
    video/paco_decoder.cpp
    video/qt_decoder.cpp


diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 71b581edc68..475f32945d8 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -184,7 +184,7 @@ bool AVIDecoder::parseNextChunk() {
 	if (_fileStream->eos())
 		return false;
 
-	debug(6, "Decoding tag %s", tag2str(tag));
+	debugC(6, kDebugLevelGVideo, "Decoding tag %s", tag2str(tag));
 
 	switch (tag) {
 	case ID_LIST:
@@ -249,7 +249,7 @@ void AVIDecoder::handleList(uint32 listSize) {
 	listSize -= 4; // Subtract away listType's 4 bytes
 	uint32 curPos = _fileStream->pos();
 
-	debug(7, "Found LIST of type %s", tag2str(listType));
+	debugC(7, kDebugLevelGVideo, "Found LIST of type %s", tag2str(listType));
 
 	switch (listType) {
 	case ID_MOVI: // Movie List
@@ -541,7 +541,7 @@ void AVIDecoder::handleNextPacket(TrackStatus &status) {
 		if (status.track->getTrackType() == Track::kTrackTypeVideo) {
 			// Horrible AVI video has a premature end
 			// Force the frame to be the last frame
-			debug(7, "Forcing end of AVI video");
+			debugC(7, kDebugLevelGVideo, "Forcing end of AVI video");
 			((AVIVideoTrack *)status.track)->forceTrackEnd();
 		}
 
@@ -563,7 +563,7 @@ void AVIDecoder::handleNextPacket(TrackStatus &status) {
 			if (status.track->getTrackType() == Track::kTrackTypeVideo) {
 				// Horrible AVI video has a premature end
 				// Force the frame to be the last frame
-				debug(7, "Forcing end of AVI video");
+				debugC(7, kDebugLevelGVideo, "Forcing end of AVI video");
 				((AVIVideoTrack *)status.track)->forceTrackEnd();
 			}
 
@@ -866,7 +866,7 @@ byte AVIDecoder::getStreamIndex(uint32 tag) {
 void AVIDecoder::readOldIndex(uint32 size) {
 	uint32 entryCount = size / 16;
 
-	debug(7, "Old Index: %d entries", entryCount);
+	debugC(7, kDebugLevelGVideo, "Old Index: %d entries", entryCount);
 
 	if (entryCount == 0)
 		return;
@@ -882,12 +882,12 @@ void AVIDecoder::readOldIndex(uint32 size) {
 	// If it's absolute, the offset will equal the start of the movie list
 	bool isAbsolute = firstEntry.offset == _movieListStart;
 
-	debug(6, "Old index is %s", isAbsolute ? "absolute" : "relative");
+	debugC(6, kDebugLevelGVideo, "Old index is %s", isAbsolute ? "absolute" : "relative");
 
 	if (!isAbsolute)
 		firstEntry.offset += _movieListStart - 4;
 
-	debug(7, "Index 0: Tag '%s', Offset = %d, Size = %d (Flags = %d)", tag2str(firstEntry.id), firstEntry.offset, firstEntry.size, firstEntry.flags);
+	debugC(7, kDebugLevelGVideo, "Index 0: Tag '%s', Offset = %d, Size = %d (Flags = %d)", tag2str(firstEntry.id), firstEntry.offset, firstEntry.size, firstEntry.flags);
 	_indexEntries.push_back(firstEntry);
 
 	for (uint32 i = 1; i < entryCount; i++) {
@@ -902,7 +902,7 @@ void AVIDecoder::readOldIndex(uint32 size) {
 			indexEntry.offset += _movieListStart - 4;
 
 		_indexEntries.push_back(indexEntry);
-		debug(7, "Index %d: Tag '%s', Offset = %d, Size = %d (Flags = %d)", i, tag2str(indexEntry.id), indexEntry.offset, indexEntry.size, indexEntry.flags);
+		debugC(7, kDebugLevelGVideo, "Index %d: Tag '%s', Offset = %d, Size = %d (Flags = %d)", i, tag2str(indexEntry.id), indexEntry.offset, indexEntry.size, indexEntry.flags);
 	}
 }
 
@@ -1041,7 +1041,7 @@ void AVIDecoder::AVIVideoTrack::forceDimensions(uint16 width, uint16 height) {
 
 bool AVIDecoder::AVIVideoTrack::rewind() {
 	_curFrame = -1;
-	 
+
 	useInitialPalette();
 
 	delete _videoCodec;
diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp
index d0e5dcd7ff8..620b76fb9a7 100644
--- a/video/dxa_decoder.cpp
+++ b/video/dxa_decoder.cpp
@@ -109,7 +109,7 @@ DXADecoder::DXAVideoTrack::DXAVideoTrack(Common::SeekableReadStream *stream) {
 	_surface = new Graphics::Surface();
 	_surface->format = Graphics::PixelFormat::createFormatCLUT8();
 
-	debug(2, "flags 0x0%x framesCount %d width %d height %d rate %d", flags, getFrameCount(), getWidth(), getHeight(), getFrameRate().toInt());
+	debugC(2, kDebugLevelGVideo, "flags 0x0%x framesCount %d width %d height %d rate %d", flags, getFrameCount(), getWidth(), getHeight(), getFrameRate().toInt());
 
 	_frameSize = _width * _height;
 	_decompBufferSize = _frameSize;
diff --git a/video/mkv_decoder.cpp b/video/mkv_decoder.cpp
index 9e0efa5e421..606ab19f182 100644
--- a/video/mkv_decoder.cpp
+++ b/video/mkv_decoder.cpp
@@ -155,7 +155,7 @@ bool MKVDecoder::loadStream(Common::SeekableReadStream *stream) {
 	uint32 i = 0;
 	const unsigned long j = _pTracks->GetTracksCount();
 
-	debug(1, "Number of tracks: %lu", j);
+	debugC(1, kDebugLevelGVideo, "Number of tracks: %lu", j);
 
 	enum {VIDEO_TRACK = 1, AUDIO_TRACK = 2};
 	_vTrack = -1;
@@ -321,7 +321,7 @@ MKVDecoder::VPXVideoTrack::VPXVideoTrack(const mkvparser::Track *const pTrack) {
 	if (_pixelFormat.bytesPerPixel == 1)
 		_pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);
 
-	debug(1, "VideoTrack: %d x %d", _width, _height);
+	debugC(1, kDebugLevelGVideo, "VideoTrack: %d x %d", _width, _height);
 
 	_endOfVideo = false;
 	_nextFrameStartTime = 0.0;
@@ -391,7 +391,7 @@ MKVDecoder::VorbisAudioTrack::VorbisAudioTrack(const mkvparser::Track *const pTr
 	const long long audioBitDepth = pAudioTrack->GetBitDepth();
 	const double audioSampleRate = pAudioTrack->GetSamplingRate();
 
-	debug(1, "audioChannels %lld audioBitDepth %lld audioSamplerate %f", audioChannels, audioBitDepth, audioSampleRate);
+	debugC(1, kDebugLevelGVideo, "audioChannels %lld audioBitDepth %lld audioSamplerate %f", audioChannels, audioBitDepth, audioSampleRate);
 
 	size_t audioHeaderSize;
 	byte *audioHeader = const_cast<byte *>(pAudioTrack->GetCodecPrivate(audioHeaderSize));
diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp
index 2e912826007..9e7fed1a335 100644
--- a/video/mpegps_decoder.cpp
+++ b/video/mpegps_decoder.cpp
@@ -686,7 +686,7 @@ void MPEGPSDecoder::MPEGVideoTrack::findDimensions(Common::SeekableReadStream *f
 	if (_pixelFormat.bytesPerPixel == 1)
 		_pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0);
 
-	debug(3, "MPEG dimensions: %dx%d", _width, _height);
+	debugC(3, kDebugLevelGVideo, "MPEG dimensions: %dx%d", _width, _height);
 
 	firstPacket->seek(0);
 }
diff --git a/video/paco_decoder.cpp b/video/paco_decoder.cpp
index dbd870cf277..6e79442e97b 100644
--- a/video/paco_decoder.cpp
+++ b/video/paco_decoder.cpp
@@ -213,7 +213,7 @@ void PacoDecoder::readNextPacket() {
 
 	uint32 nextFrame = _fileStream->pos() + _frameSizes[_curFrame];
 
-	debug(2, " frame %3d size %d @ %lX", _curFrame, _frameSizes[_curFrame], long(_fileStream->pos()));
+	debugC(2, kDebugLevelGVideo, " frame %3d size %d @ %lX", _curFrame, _frameSizes[_curFrame], long(_fileStream->pos()));
 
 	_curFrame++;
 
@@ -222,7 +222,7 @@ void PacoDecoder::readNextPacket() {
 		int frameType = _fileStream->readByte();
 		int v = _fileStream->readByte();
 		uint32 chunkSize =  (v << 16 ) | _fileStream->readUint16BE();
-		debug(2, "  slot type %d size %d @ %lX", frameType, chunkSize, long(_fileStream->pos() - 4));
+		debugC(2, kDebugLevelGVideo, "  slot type %d size %d @ %lX", frameType, chunkSize, long(_fileStream->pos() - 4));
 
 		switch (frameType) {
 		case AUDIO:
@@ -317,13 +317,13 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 	uint compr = fileStream->readByte();	    	// compression method and flags
 	fileStream->readByte();							// padding
 
-	debug(5, "    +%d,%d - %dx%d compr %X", x, y, bw, bh, compr);
+	debugC(5, kDebugLevelGVideo, "    +%d,%d - %dx%d compr %X", x, y, bw, bh, compr);
 
 	compr = compr & 0xF;
 
 	uint8 *fdata = new uint8[1048576];              // 0x100000 copied from original pacodec
 	fileStream->read(fdata, chunkSize - 10);       // remove header length
-	debug(5, "pos: %ld", long(fileStream->pos()));
+	debugC(5, kDebugLevelGVideo, "pos: %ld", long(fileStream->pos()));
 	int16 xpos = x, ypos = y, ypos2 = y;
 	byte *dst = (byte *)_surface->getPixels() + x + y * w;
 
@@ -334,13 +334,13 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 
 	while (ypos < y + bh) {
 		c = *src++;
-		debug(5, "debug info: ypos %d y %d bh %d src: %d", ypos, y, bh, c);
+		debugC(5, kDebugLevelGVideo, "debug info: ypos %d y %d bh %d src: %d", ypos, y, bh, c);
 
 		if (c == 0 ){ // long operation
 			int16 op = src[0] >> 4;
 			int16 len = ((src[0] & 0xF) << 8) | src[1];
 			src += 2;
-			debug(5, "    long operation: opcode: %d", op);
+			debugC(5, kDebugLevelGVideo, "    long operation: opcode: %d", op);
 			switch (op) {
 			case COPY:
 				while (len--)
@@ -387,15 +387,15 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 				break;
 			default:
 				PUTPIX(0xFF);
-				debug(5, "PacoDecoder::PacoVideoTrack::handleFrame: Long op: 0x0 op %d", op);
+				debugC(5, kDebugLevelGVideo, "PacoDecoder::PacoVideoTrack::handleFrame: Long op: 0x0 op %d", op);
 			}
 
 		} else if (c < 128) { // copy the same amount of pixels
-			debug(5, "    copy pixels: %d", c);
+			debugC(5, kDebugLevelGVideo, "    copy pixels: %d", c);
 			while (c--)
 				PUTPIX(*src++);
 		} else if (c < 254) { // repeat the following value 256 - op times
-			debug(5, "    copy pixels -op: %d", 256 - c);
+			debugC(5, kDebugLevelGVideo, "    copy pixels -op: %d", 256 - c);
 			c1 = *src++;
 			c = 256 - c;
 			while (c--)
@@ -408,7 +408,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 			if (!c) {                                   // compact RLE mode
 				unsigned mask = (src[0] << 8) | src[1];
 				src += 2;
-				debug(5, "debug info compact RLE: c: %d mask: %d", c, mask);
+				debugC(5, kDebugLevelGVideo, "debug info compact RLE: c: %d mask: %d", c, mask);
 
 				for (i = 0; i < 16; i++, mask >>= 1) {
 					if (mask & 1)
@@ -421,10 +421,10 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 					if (op == 0) {                      // low nibble....
 						op = len;
 						len = *src++;
-						debug(5, "debug info compact: op: %d", op);
+						debugC(5, kDebugLevelGVideo, "debug info compact: op: %d", op);
 						switch (op) {
 						case COPY:
-							debug(5, "debug info COPY: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info COPY: %d", len);
 							while (len--) {
 								c = *src++;
 								PUTPIX(clrs[c >> 4]);
@@ -435,13 +435,13 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 							}
 							break;
 						case RLE:
-							debug(5, "debug info RLE: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info RLE: %d", len);
 							c = *src++;
 							while (len--)
 								PUTPIX(clrs[c & 0xF]);
 							break;
 						case PRLE:
-							debug(5, "debug info PRLE: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info PRLE: %d", len);
 							c = *src++;
 							c1 = clrs[c >> 4];
 							c2 = clrs[c & 0xF];
@@ -451,7 +451,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 							}
 							break;
 						case QRLE:
-							debug(5, "debug info QRLE: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info QRLE: %d", len);
 							c = *src++;
 							c1 = clrs[c >> 4];
 							c2 = clrs[c & 0xF];
@@ -466,12 +466,12 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 							}
 							break;
 						case SKIP:
-							debug(5, "debug info SKIP: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info SKIP: %d", len);
 							while (len--)
 								SKIP();
 							break;
 						case ENDCURRENTLINE:
-							debug(5, "debug info ENDCURRENTLINE: %d", len);
+							debugC(5, "debug info ENDCURRENTLINE: %d", len);
 							xpos = x + bw;
 							ypos += len;
 							break;
@@ -479,7 +479,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 							warning("PacoDecoder::PacoVideoTrack::handleFrame: Compact RLE mode: 0x0 op %d", op);
 						}
 					} else if (op < 8) {                // copy 1-7 colors
-						debug(5, "debug info copy 1-7 colors: %d", len);
+						debugC(5, kDebugLevelGVideo, "debug info copy 1-7 colors: %d", len);
 						PUTPIX(clrs[len]);
 						op--;
 						while (op--) {
@@ -491,17 +491,17 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 							PUTPIX(clrs[c & 0xF]);
 						}
 					} else if (op < 14) {              // repeat color
-						debug(5, "debug info Repeat color: %d", len);
+						debugC(5, kDebugLevelGVideo, "debug info Repeat color: %d", len);
 						op = 16 - op;
 						while (op--)
 							PUTPIX(clrs[len]);
 					} else if (op < 15) {               // skip number of pixels in low nibbel
-						debug(5, "debug info Skip number of pixels: %d", len);
+						debugC(5, kDebugLevelGVideo, "debug info Skip number of pixels: %d", len);
 						while (len--)
 							SKIP();
 					} else {
 						if (len < 8) {                  // Pair run
-							debug(5, "debug info pair run: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info pair run: %d", len);
 							c = *src++;
 							c1 = clrs[c >> 4];
 							c2 = clrs[c & 0xF];
@@ -510,7 +510,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 								PUTPIX(c2);
 							}
 						} else {                        // Quad run
-							debug(5, "debug info quad run: %d", len);
+							debugC(5, kDebugLevelGVideo, "debug info quad run: %d", len);
 							len = 16 - len;
 							c = *src++;
 							c1 = clrs[c >> 4];
@@ -528,7 +528,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 					}
 				}
 			} else {
-				debug(5, "debug info SKIP: %d", c);
+				debugC(5, kDebugLevelGVideo, "debug info SKIP: %d", c);
 				while (c--)
 					SKIP();
 			}
@@ -538,7 +538,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 			// (but 256 - len times)
 			c = *src++;
 			if (c < 128) {                             // pair run
-				debug(5, "debug info PAIR RUN: %d", c);
+				debugC(5, kDebugLevelGVideo, "debug info PAIR RUN: %d", c);
 
 				c1 = *src++;
 				c2 = *src++;
@@ -547,7 +547,7 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 					PUTPIX(c2);
 				}
 			} else {                                    // quad run
-				debug(5, "debug info QUAD RUN: %d", c);
+				debugC(5, kDebugLevelGVideo, "debug info QUAD RUN: %d", c);
 				c = 256 - c;
 				c1 = *src++;
 				c2 = *src++;
@@ -561,9 +561,9 @@ void PacoDecoder::PacoVideoTrack::handleFrame(Common::SeekableReadStream *fileSt
 				}
 			}
 		}
-		if (xpos > x + bw) debug(5, "!!!");
+		if (xpos > x + bw) debugC(5, kDebugLevelGVideo, "!!!");
 		if (xpos >= x + bw) {
-			debug(5, "debug info ADJUST LINE");
+			debugC(5, kDebugLevelGVideo, "debug info ADJUST LINE");
 			xpos = x;
 			ypos++;
 			ADJUST_LINE;
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index 4631c8d6ebf..72768c71a0e 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -118,7 +118,7 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() {
 
 Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize) {
 	if (track->codecType == CODEC_TYPE_VIDEO) {
-		debug(0, "Video Codec FourCC: \'%s\'", tag2str(format));
+		debugC(0, kDebugLevelGVideo, "Video Codec FourCC: \'%s\'", tag2str(format));
 
 		VideoSampleDesc *entry = new VideoSampleDesc(track, format);
 
@@ -158,7 +158,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
 		byte colorDepth = entry->_bitsPerSample & 0x1F;
 		bool colorGreyscale = (entry->_bitsPerSample & 0x20) != 0;
 
-		debug(0, "color depth: %d", colorDepth);
+		debugC(0, kDebugLevelGVideo, "color depth: %d", colorDepth);
 
 		// if the depth is 2, 4, or 8 bpp, file is palettized
 		if (colorDepth == 2 || colorDepth == 4 || colorDepth == 8) {
@@ -166,7 +166,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
 			entry->_palette = new byte[256 * 3]();
 
 			if (colorGreyscale) {
-				debug(0, "Greyscale palette");
+				debugC(0, kDebugLevelGVideo, "Greyscale palette");
 
 				// compute the greyscale palette
 				uint16 colorCount = 1 << colorDepth;
@@ -182,7 +182,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
 				// if flag bit 3 is set, use the default palette
 				//uint16 colorCount = 1 << colorDepth;
 
-				debug(0, "Predefined palette! %dbpp", colorDepth);
+				debugC(0, kDebugLevelGVideo, "Predefined palette! %dbpp", colorDepth);
 				if (colorDepth == 2)
 					memcpy(entry->_palette, quickTimeDefaultPalette4, 4 * 3);
 				else if (colorDepth == 4)
@@ -190,7 +190,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
 				else if (colorDepth == 8)
 					memcpy(entry->_palette, quickTimeDefaultPalette256, 256 * 3);
 			} else {
-				debug(0, "Palette from file");
+				debugC(0, kDebugLevelGVideo, "Palette from file");
 
 				// load the palette from the file
 				uint32 colorStart = _fd->readUint32BE();


Commit: c5ad81dd5d47b52e33ceb92dbd7b99254d56dabf
    https://github.com/scummvm/scummvm/commit/c5ad81dd5d47b52e33ceb92dbd7b99254d56dabf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
COMMON: Added debugPrintC() method to Common::Rational

Changed paths:
    common/rational.cpp
    common/rational.h


diff --git a/common/rational.cpp b/common/rational.cpp
index 691c5d1f87c..28a7bb04bce 100644
--- a/common/rational.cpp
+++ b/common/rational.cpp
@@ -300,6 +300,10 @@ void Rational::debugPrint(int debuglevel, const char *caption) const {
 	debug(debuglevel, "%s %d/%d", caption, _num, _denom);
 }
 
+void Rational::debugPrintC(int debuglevel, uint32 debugChannel, const char *caption) const {
+	debugC(debuglevel, debugChannel, "%s %d/%d", caption, _num, _denom);
+}
+
 bool operator==(int left, const Rational &right) {
 	return right == left;
 }
diff --git a/common/rational.h b/common/rational.h
index dbfbe6ab2f3..8d99a17856d 100644
--- a/common/rational.h
+++ b/common/rational.h
@@ -96,6 +96,7 @@ public:
 	bool isOne() const { return _num == _denom; }
 
 	void debugPrint(int debuglevel = 0, const char *caption = "Rational:") const;
+	void debugPrintC(int debuglevel, uint32 debugChannel, const char *caption = "Rational:") const;
 
 private:
 	int _num;


Commit: 2435439665d61d5f415bc0c58ce8913897b041eb
    https://github.com/scummvm/scummvm/commit/2435439665d61d5f415bc0c58ce8913897b041eb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
COMMON: FORMATS: Put QT parser debug output to 'gvideo' debug channel

Changed paths:
    common/formats/quicktime.cpp


diff --git a/common/formats/quicktime.cpp b/common/formats/quicktime.cpp
index 489dc3120d4..8793b4da11a 100644
--- a/common/formats/quicktime.cpp
+++ b/common/formats/quicktime.cpp
@@ -259,7 +259,7 @@ int QuickTimeParser::readDefault(Atom atom) {
 
 		total_size += 8;
 		a.offset += 8;
-		debug(4, "type: %08x  %.4s  sz: %x %x %x", a.type, tag2str(a.type), a.size, atom.size, total_size);
+		debugC(4, kDebugLevelGVideo, "type: %08x  %.4s  sz: %x %x %x", a.type, tag2str(a.type), a.size, atom.size, total_size);
 
 		if (a.size == 1) { // 64 bit extended size
 			warning("64 bit extended size is not supported in QuickTime");
@@ -284,10 +284,10 @@ int QuickTimeParser::readDefault(Atom atom) {
 
 		if (a.size + (uint32)_fd->pos() > (uint32)_fd->size()) {
 			_fd->seek(_fd->size());
-			debug(0, "Skipping junk found at the end of the QuickTime file");
+			debugC(0, kDebugLevelGVideo, "Skipping junk found at the end of the QuickTime file");
 			return 0;
 		} else if (_parseTable[i].type == 0) { // skip leaf atom data
-			debug(0, ">>> Skipped [%s] (%08x) at %d (0x%x)", tag2str(a.type), a.type, (uint32)_fd->pos(), (uint32)_fd->pos());
+			debugC(0, kDebugLevelGVideo, ">>> Skipped [%s] (%08x) at %d (0x%x)", tag2str(a.type), a.type, (uint32)_fd->pos(), (uint32)_fd->pos());
 
 			_fd->seek(a.size, SEEK_CUR);
 		} else {
@@ -391,7 +391,7 @@ int QuickTimeParser::readMVHD(Atom atom) {
 	}
 
 	_timeScale = _fd->readUint32BE(); // time scale
-	debug(0, "time scale = %i\n", _timeScale);
+	debugC(0, kDebugLevelGVideo, "time scale = %i\n", _timeScale);
 
 	// duration
 	_duration = (version == 1) ? (_fd->readUint32BE(), _fd->readUint32BE()) : _fd->readUint32BE();
@@ -412,8 +412,8 @@ int QuickTimeParser::readMVHD(Atom atom) {
 	_scaleFactorX = Rational(0x10000, xMod);
 	_scaleFactorY = Rational(0x10000, yMod);
 
-	_scaleFactorX.debugPrint(1, "readMVHD(): scaleFactorX =");
-	_scaleFactorY.debugPrint(1, "readMVHD(): scaleFactorY =");
+	_scaleFactorX.debugPrintC(1, kDebugLevelGVideo, "readMVHD(): scaleFactorX =");
+	_scaleFactorY.debugPrintC(1, kDebugLevelGVideo, "readMVHD(): scaleFactorY =");
 
 	_fd->readUint32BE(); // preview time
 	_fd->readUint32BE(); // preview duration
@@ -487,8 +487,8 @@ int QuickTimeParser::readTKHD(Atom atom) {
 	track->scaleFactorX = Rational(0x10000, xMod);
 	track->scaleFactorY = Rational(0x10000, yMod);
 
-	track->scaleFactorX.debugPrint(1, "readTKHD(): scaleFactorX =");
-	track->scaleFactorY.debugPrint(1, "readTKHD(): scaleFactorY =");
+	track->scaleFactorX.debugPrintC(1, kDebugLevelGVideo, "readTKHD(): scaleFactorX =");
+	track->scaleFactorY.debugPrintC(1, kDebugLevelGVideo, "readTKHD(): scaleFactorY =");
 
 	// these are fixed-point, 16:16
 	//_fd->readUint32BE() >> 16; // track width
@@ -507,7 +507,7 @@ int QuickTimeParser::readELST(Atom atom) {
 	uint32 editCount = _fd->readUint32BE();
 	track->editList.resize(editCount);
 
-	debug(2, "Track %d edit list count: %d", _tracks.size() - 1, editCount);
+	debugC(2, kDebugLevelGVideo, "Track %d edit list count: %d", _tracks.size() - 1, editCount);
 
 	uint32 offset = 0;
 
@@ -516,8 +516,8 @@ int QuickTimeParser::readELST(Atom atom) {
 		track->editList[i].mediaTime = _fd->readSint32BE();
 		track->editList[i].mediaRate = Rational(_fd->readUint32BE(), 0x10000);
 		track->editList[i].timeOffset = offset;
-		debugN(3, "\tDuration = %d (Offset = %d), Media Time = %d, ", track->editList[i].trackDuration, offset, track->editList[i].mediaTime);
-		track->editList[i].mediaRate.debugPrint(3, "Media Rate =");
+		debugCN(3, kDebugLevelGVideo, "\tDuration = %d (Offset = %d), Media Time = %d, ", track->editList[i].trackDuration, offset, track->editList[i].mediaTime);
+		track->editList[i].mediaRate.debugPrintC(3, kDebugLevelGVideo, "Media Rate =");
 		offset += track->editList[i].trackDuration;
 	}
 
@@ -534,13 +534,13 @@ int QuickTimeParser::readHDLR(Atom atom) {
 	uint32 ctype = _fd->readUint32BE();
 	uint32 type = _fd->readUint32BE(); // component subtype
 
-	debug(0, "ctype= %s (0x%08lx)", tag2str(ctype), (long)ctype);
-	debug(0, "stype= %s", tag2str(type));
+	debugC(0, kDebugLevelGVideo, "ctype= %s (0x%08lx)", tag2str(ctype), (long)ctype);
+	debugC(0, kDebugLevelGVideo, "stype= %s", tag2str(type));
 
 	if (ctype == MKTAG('m', 'h', 'l', 'r')) // MOV
-		debug(0, "MOV detected");
+		debugC(0, kDebugLevelGVideo, "MOV detected");
 	else if (ctype == 0)
-		debug(0, "MPEG-4 detected");
+		debugC(0, kDebugLevelGVideo, "MPEG-4 detected");
 
 	if (type == MKTAG('v', 'i', 'd', 'e'))
 		track->codecType = CODEC_TYPE_VIDEO;
@@ -613,7 +613,7 @@ int QuickTimeParser::readSTSD(Atom atom) {
 		_fd->readUint16BE(); // reserved
 		_fd->readUint16BE(); // index
 
-		debug(0, "sampledesc %d: size=%d 4CC= %s codec_type=%d", i, size, tag2str(format), track->codecType);
+		debugC(0, kDebugLevelGVideo, "sampledesc %d: size=%d 4CC= %s codec_type=%d", i, size, tag2str(format), track->codecType);
 
 		track->sampleDescs.push_back(readSampleDesc(track, format, size - 16));
 
@@ -641,7 +641,7 @@ int QuickTimeParser::readSTSC(Atom atom) {
 
 	track->sampleToChunkCount = _fd->readUint32BE();
 
-	debug(0, "track[%i].stsc.entries = %i", _tracks.size() - 1, track->sampleToChunkCount);
+	debugC(0, kDebugLevelGVideo, "track[%i].stsc.entries = %i", _tracks.size() - 1, track->sampleToChunkCount);
 
 	track->sampleToChunk = new SampleToChunkEntry[track->sampleToChunkCount];
 
@@ -666,7 +666,7 @@ int QuickTimeParser::readSTSS(Atom atom) {
 
 	track->keyframeCount = _fd->readUint32BE();
 
-	debug(0, "keyframeCount = %d", track->keyframeCount);
+	debugC(0, kDebugLevelGVideo, "keyframeCount = %d", track->keyframeCount);
 
 	track->keyframes = new uint32[track->keyframeCount];
 
@@ -675,7 +675,7 @@ int QuickTimeParser::readSTSS(Atom atom) {
 
 	for (uint32 i = 0; i < track->keyframeCount; i++) {
 		track->keyframes[i] = _fd->readUint32BE() - 1; // Adjust here, the frames are based on 1
-		debug(6, "keyframes[%d] = %d", i, track->keyframes[i]);
+		debugC(6, kDebugLevelGVideo, "keyframes[%d] = %d", i, track->keyframes[i]);
 
 	}
 	return 0;
@@ -690,7 +690,7 @@ int QuickTimeParser::readSTSZ(Atom atom) {
 	track->sampleSize = _fd->readUint32BE();
 	track->sampleCount = _fd->readUint32BE();
 
-	debug(5, "sampleSize = %d sampleCount = %d", track->sampleSize, track->sampleCount);
+	debugC(5, kDebugLevelGVideo, "sampleSize = %d sampleCount = %d", track->sampleSize, track->sampleCount);
 
 	if (track->sampleSize)
 		return 0; // there isn't any table following
@@ -702,7 +702,7 @@ int QuickTimeParser::readSTSZ(Atom atom) {
 
 	for(uint32 i = 0; i < track->sampleCount; i++) {
 		track->sampleSizes[i] = _fd->readUint32BE();
-		debug(6, "sampleSizes[%d] = %d", i, track->sampleSizes[i]);
+		debugC(6, kDebugLevelGVideo, "sampleSizes[%d] = %d", i, track->sampleSizes[i]);
 	}
 
 	return 0;
@@ -718,13 +718,13 @@ int QuickTimeParser::readSTTS(Atom atom) {
 	track->timeToSampleCount = _fd->readUint32BE();
 	track->timeToSample = new TimeToSampleEntry[track->timeToSampleCount];
 
-	debug(0, "track[%d].stts.entries = %d", _tracks.size() - 1, track->timeToSampleCount);
+	debugC(0, kDebugLevelGVideo, "track[%d].stts.entries = %d", _tracks.size() - 1, track->timeToSampleCount);
 
 	for (int32 i = 0; i < track->timeToSampleCount; i++) {
 		track->timeToSample[i].count = _fd->readUint32BE();
 		track->timeToSample[i].duration = _fd->readUint32BE();
 
-		debug(1, "\tCount = %d, Duration = %d", track->timeToSample[i].count, track->timeToSample[i].duration);
+		debugC(1, kDebugLevelGVideo, "\tCount = %d, Duration = %d", track->timeToSample[i].count, track->timeToSample[i].duration);
 
 		totalSampleCount += track->timeToSample[i].count;
 	}
@@ -857,7 +857,7 @@ int QuickTimeParser::readESDS(Atom atom) {
 
 	sampleDesc->_extraData = _fd->readStream(length);
 
-	debug(0, "MPEG-4 object type = %02x", sampleDesc->_objectTypeMP4);
+	debugC(0, kDebugLevelGVideo, "MPEG-4 object type = %02x", sampleDesc->_objectTypeMP4);
 	return 0;
 }
 
@@ -1008,12 +1008,12 @@ int QuickTimeParser::readDREF(Atom atom) {
 				track->filename = _fd->readString('\0', filenameSize);
 				_fd->seek(63 - filenameSize, SEEK_CUR);
 				_fd->seek(16, SEEK_CUR);
-				debug(5, "volume: %s, filename: %s", track->volume.c_str(), track->filename.c_str());
+				debugC(5, kDebugLevelGVideo, "volume: %s, filename: %s", track->volume.c_str(), track->filename.c_str());
 
 				track->nlvlFrom = _fd->readSint16BE();
 				track->nlvlTo = _fd->readSint16BE();
 				_fd->seek(16, SEEK_CUR);
-				debug(5, "nlvlFrom: %d, nlvlTo: %d", track->nlvlFrom, track->nlvlTo);
+				debugC(5, kDebugLevelGVideo, "nlvlFrom: %d, nlvlTo: %d", track->nlvlFrom, track->nlvlTo);
 
 				for (int16 subType = 0; subType != -1 && _fd->pos() < endPos;) {
 					subType = _fd->readSint16BE();
@@ -1024,10 +1024,10 @@ int QuickTimeParser::readDREF(Atom atom) {
 						if (track->path.substr(0, volumeSize) == track->volume) {
 							track->path = track->path.substr(volumeSize);
 						}
-						debug(5, "path: %s", track->path.c_str());
+						debugC(5, kDebugLevelGVideo, "path: %s", track->path.c_str());
 					} else if (subType == 0) {
 						track->directory = _fd->readString('\0', subTypeSize);
-						debug(5, "directory: %s", track->directory.c_str());
+						debugC(5, kDebugLevelGVideo, "directory: %s", track->directory.c_str());
 					} else {
 						_fd->seek(subTypeSize, SEEK_CUR);
 					}


Commit: b34411bc23f9cfce0574de61f393e98c816a5f8d
    https://github.com/scummvm/scummvm/commit/b34411bc23f9cfce0574de61f393e98c816a5f8d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-22T15:51:24+01:00

Commit Message:
ENGINES: [a-k]*: Switched Debug Channels from bitfield to sequential enum

Changed paths:
    engines/access/access.h
    engines/adl/adl.h
    engines/agi/agi.h
    engines/agos/agos.h
    engines/ags/detection.h
    engines/asylum/detection.h
    engines/bladerunner/bladerunner.h
    engines/crab/detection.h
    engines/cryomni3d/cryomni3d.h
    engines/dgds/sound/scispan.h
    engines/dreamweb/dreamweb.h
    engines/efh/efh.h
    engines/glk/glk.h
    engines/gnap/gnap.h
    engines/gob/gob.h
    engines/groovie/groovie.h
    engines/hdb/hdb.h
    engines/hopkins/hopkins.h
    engines/hpl1/debug.h
    engines/hugo/hugo.h
    engines/immortal/detection.h
    engines/kingdom/detection.cpp
    engines/kingdom/kingdom.h
    engines/kyra/kyra_v1.h


diff --git a/engines/access/access.h b/engines/access/access.h
index 776915095ca..96d79c77eec 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -62,10 +62,10 @@
 namespace Access {
 
 enum AccessDebugChannels {
-	kDebugPath      = 1 << 0,
-	kDebugScripts	= 1 << 1,
-	kDebugGraphics	= 1 << 2,
-	kDebugSound     = 1 << 3
+	kDebugPath = 1,
+	kDebugScripts,
+	kDebugGraphics,
+	kDebugSound,
 };
 
 extern const char *const _estTable[];
diff --git a/engines/adl/adl.h b/engines/adl/adl.h
index cea2313c8d5..3c151fdeec1 100644
--- a/engines/adl/adl.h
+++ b/engines/adl/adl.h
@@ -66,7 +66,7 @@ class GraphicsMan;
 class ScriptEnv;
 
 enum kDebugChannels {
-	kDebugChannelScript = 1 << 0
+	kDebugChannelScript = 1,
 };
 
 enum ADLAction {
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index b003b839966..ee1f87a24bc 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -151,17 +151,17 @@ enum AGIErrors {
 };
 
 enum kDebugLevels {
-	kDebugLevelMain =      1 << 0,
-	kDebugLevelResources = 1 << 1,
-	kDebugLevelSprites =   1 << 2,
-	kDebugLevelPictures =  1 << 3,
-	kDebugLevelInventory = 1 << 4,
-	kDebugLevelInput =     1 << 5,
-	kDebugLevelMenu =      1 << 6,
-	kDebugLevelScripts =   1 << 7,
-	kDebugLevelSound =     1 << 8,
-	kDebugLevelText =      1 << 9,
-	kDebugLevelSavegame =  1 << 10
+	kDebugLevelMain = 1,
+	kDebugLevelResources,
+	kDebugLevelSprites,
+	kDebugLevelPictures,
+	kDebugLevelInventory,
+	kDebugLevelInput,
+	kDebugLevelMenu,
+	kDebugLevelScripts,
+	kDebugLevelSound,
+	kDebugLevelText,
+	kDebugLevelSavegame,
 };
 
 /**
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 6a8d22375f2..b14b76d7147 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -70,11 +70,11 @@ class SeekableAudioStream;
 namespace AGOS {
 
 enum {
-	kDebugOpcode = 1 << 0,
-	kDebugVGAOpcode = 1 << 1,
-	kDebugSubroutine = 1 << 2,
-	kDebugVGAScript = 1 << 3,
-	kDebugImageDump = 1 << 4
+	kDebugOpcode = 1,
+	kDebugVGAOpcode,
+	kDebugSubroutine,
+	kDebugVGAScript,
+	kDebugImageDump,
 };
 
 enum AGOSAction {
diff --git a/engines/ags/detection.h b/engines/ags/detection.h
index 63409024a1d..07253fe4284 100644
--- a/engines/ags/detection.h
+++ b/engines/ags/detection.h
@@ -27,11 +27,11 @@
 namespace AGS {
 
 enum AGSDebugChannels {
-	kDebugGraphics = 1 << 0,
-	kDebugPath     = 1 << 1,
-	kDebugScan     = 1 << 2,
-	kDebugFilePath = 1 << 3,
-	kDebugScript   = 1 << 4
+	kDebugGraphics = 1,
+	kDebugPath,
+	kDebugScan,
+	kDebugFilePath,
+	kDebugScript,
 };
 
 enum GameFlag {
diff --git a/engines/asylum/detection.h b/engines/asylum/detection.h
index add204c40b9..e017ec22e42 100644
--- a/engines/asylum/detection.h
+++ b/engines/asylum/detection.h
@@ -25,20 +25,20 @@
 namespace Asylum {
 
 enum kDebugLevels {
-	kDebugLevelMain      = 1 << 0,
-	kDebugLevelResources = 1 << 1,
-	kDebugLevelSprites   = 1 << 2,
-	kDebugLevelInput     = 1 << 3,
-	kDebugLevelMenu      = 1 << 4,
-	kDebugLevelScripts   = 1 << 5,
-	kDebugLevelSound     = 1 << 6,
-	kDebugLevelSavegame  = 1 << 7,
-	kDebugLevelScene     = 1 << 8,
-	kDebugLevelObjects   = 1 << 9,
-	kDebugLevelActor     = 1 << 10,
-	kDebugLevelEncounter = 1 << 11,
-	kDebugLevelVideo     = 1 << 12,
-	kDebugLevelCommands  = 1 << 13
+	kDebugLevelMain = 1,
+	kDebugLevelResources,
+	kDebugLevelSprites,
+	kDebugLevelInput,
+	kDebugLevelMenu,
+	kDebugLevelScripts,
+	kDebugLevelSound,
+	kDebugLevelSavegame,
+	kDebugLevelScene,
+	kDebugLevelObjects,
+	kDebugLevelActor,
+	kDebugLevelEncounter,
+	kDebugLevelVideo,
+	kDebugLevelCommands,
 };
 
 } // End of namespace Asylum
diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h
index fa8811b05bf..c744a326f30 100644
--- a/engines/bladerunner/bladerunner.h
+++ b/engines/bladerunner/bladerunner.h
@@ -56,9 +56,9 @@ struct ADGameDescription;
 namespace BladeRunner {
 
 enum DebugLevels {
-	kDebugScript = 1 << 0,
-	kDebugSound = 1 << 1,
-	kDebugAnimation = 1 << 2
+	kDebugScript = 1,
+	kDebugSound,
+	kDebugAnimation,
 };
 
 class Actor;
diff --git a/engines/crab/detection.h b/engines/crab/detection.h
index d9c09899e27..d3966d5e63d 100644
--- a/engines/crab/detection.h
+++ b/engines/crab/detection.h
@@ -27,11 +27,11 @@
 namespace Crab {
 
 enum CrabDebugChannels {
-	kDebugGraphics = 1 << 0,
-	kDebugPath = 1 << 1,
-	kDebugScan = 1 << 2,
-	kDebugFilePath = 1 << 3,
-	kDebugScript = 1 << 4,
+	kDebugGraphics = 1,
+	kDebugPath,
+	kDebugScan,
+	kDebugFilePath,
+	kDebugScript,
 };
 
 #define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
diff --git a/engines/cryomni3d/cryomni3d.h b/engines/cryomni3d/cryomni3d.h
index 4f4d772603f..b6e5d5bb830 100644
--- a/engines/cryomni3d/cryomni3d.h
+++ b/engines/cryomni3d/cryomni3d.h
@@ -65,9 +65,9 @@ class DATSeekableStream;
 
 // Engine Debug Flags
 enum {
-	kDebugFile     = (1 << 0),
-	kDebugVariable = (1 << 1),
-	kDebugSaveLoad = (1 << 2)
+	kDebugFile = 1,
+	kDebugVariable,
+	kDebugSaveLoad,
 };
 
 enum DragStatus {
diff --git a/engines/dgds/sound/scispan.h b/engines/dgds/sound/scispan.h
index 8be1811cccc..0642f3ac16c 100644
--- a/engines/dgds/sound/scispan.h
+++ b/engines/dgds/sound/scispan.h
@@ -34,7 +34,7 @@ namespace Dgds {
 
 /** Engine debug levels */
 enum kSciDebugLevels {
-    kDebugLevelSound = 1 << 7,
+    kDebugLevelSound = 1,
 };
 
 
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 325debe8e8d..aa1a266a65e 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -92,8 +92,8 @@ const unsigned int kNumPersonTexts = 1026;
 
 // Engine Debug Flags
 enum {
-	kDebugAnimation = (1 << 0),
-	kDebugSaveLoad = (1 << 1)
+	kDebugAnimation = 1,
+	kDebugSaveLoad,
 };
 
 struct DreamWebGameDescription;
diff --git a/engines/efh/efh.h b/engines/efh/efh.h
index 66b9ca5ac62..73743785303 100644
--- a/engines/efh/efh.h
+++ b/engines/efh/efh.h
@@ -59,11 +59,11 @@ static const uint8 kSavegameVersion = 1;
 #define EFH_SAVE_HEADER MKTAG('E', 'F', 'H', 'S')
 
 enum EfhDebugChannels {
-	kDebugEngine = 1 << 0,
-	kDebugUtils = 1 << 1,
-	kDebugGraphics = 1 << 2,
-	kDebugScript = 1 << 3,
-	kDebugFight = 1 << 4
+	kDebugEngine = 1,
+	kDebugUtils,
+	kDebugGraphics,
+	kDebugScript,
+	kDebugFight,
 };
 
 class EfhGraphicsStruct {
diff --git a/engines/glk/glk.h b/engines/glk/glk.h
index 805686eb693..31a93fcaba2 100644
--- a/engines/glk/glk.h
+++ b/engines/glk/glk.h
@@ -47,11 +47,11 @@ class Streams;
 class Windows;
 
 enum GlkDebugChannels {
-	kDebugCore      = 1 << 0,
-	kDebugScripts   = 1 << 1,
-	kDebugGraphics  = 1 << 2,
-	kDebugSound     = 1 << 3,
-	kDebugSpeech    = 1 << 4
+	kDebugCore = 1,
+	kDebugScripts,
+	kDebugGraphics,
+	kDebugSound,
+	kDebugSpeech,
 };
 
 
diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h
index 7015e7d02b9..4591e542704 100644
--- a/engines/gnap/gnap.h
+++ b/engines/gnap/gnap.h
@@ -88,8 +88,8 @@ struct Hotspot {
 const int kMaxTimers = 10;
 
 enum GnapDebugChannels {
-	kDebugBasic	= 1 << 0,
-	kDebugMusic = 1 << 1
+	kDebugBasic	= 1,
+	kDebugMusic,
 };
 
 enum {
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 71fffd8814c..c1add27b54e 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -69,7 +69,7 @@
  * - Nathan Vacances CM1/CE2
  * - The Bizarre Adventures of Woodruff and the Schnibble
  * - Fascination
- * - Inca II: Nations of Immortality 
+ * - Inca II: Nations of Immortality
  * - Urban Runner
  * - Bambou le sauveur de la jungle
  * - Playtoons 1 Uncle Archibald
@@ -146,18 +146,18 @@ enum EndiannessMethod {
 };
 
 enum {
-	kDebugFuncOp     = 1 <<  0,
-	kDebugDrawOp     = 1 <<  1,
-	kDebugGobOp      = 1 <<  2,
-	kDebugSound      = 1 <<  3,
-	kDebugExpression = 1 <<  4,
-	kDebugGameFlow   = 1 <<  5,
-	kDebugFileIO     = 1 <<  6,
-	kDebugSaveLoad   = 1 <<  7,
-	kDebugGraphics   = 1 <<  8,
-	kDebugVideo      = 1 <<  9,
-	kDebugHotspots   = 1 << 10,
-	kDebugDemo       = 1 << 11
+	kDebugFuncOp = 1,
+	kDebugDrawOp,
+	kDebugGobOp,
+	kDebugSound,
+	kDebugExpression,
+	kDebugGameFlow,
+	kDebugFileIO,
+	kDebugSaveLoad,
+	kDebugGraphics,
+	kDebugVideo,
+	kDebugHotspots,
+	kDebugDemo,
 };
 
 class GobEngine : public Engine {
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index f9dd88d3ce5..5321fdb88ad 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -58,19 +58,17 @@ class Script;
 class VideoPlayer;
 
 enum DebugLevels {
-	kDebugVideo = 1 << 0,
-	kDebugResource = 1 << 1,
-	kDebugScript = 1 << 2,
-	kDebugUnknown = 1 << 3,
-	kDebugHotspots = 1 << 4,
-	kDebugCursor = 1 << 5,
-	kDebugMIDI = 1 << 6,
-	kDebugScriptvars = 1 << 7,
-	kDebugLogic = 1 << 8,
-	kDebugFast = 1 << 9
-	//kDebugTlcGame = 1 << 10
-	// the current limitation is 32 debug levels (1 << 31 is the last one)
-	// but some are used by system, so avoid high values.
+	kDebugVideo = 1,
+	kDebugResource,
+	kDebugScript,
+	kDebugUnknown,
+	kDebugHotspots,
+	kDebugCursor,
+	kDebugMIDI,
+	kDebugScriptvars,
+	kDebugLogic,
+	kDebugFast,
+	//kDebugTlcGame,
 };
 
 /**
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 7c2eccc0661..f16b73a7939 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -79,15 +79,6 @@ struct ADGameDescription;
 
 namespace HDB {
 
-enum GameFeatures {
-	ADGF_TALKIE = 1 << 0
-};
-
-enum HDBDebugChannels {
-	kDebugExample1 = 1 << 0,
-	kDebugExample2 = 1 << 1
-};
-
 enum GameState {
 	GAME_TITLE,
 	GAME_MENU,
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 4d2b3f68eed..cf83a38ff87 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -71,8 +71,8 @@ enum HOPKINSAction {
 };
 
 enum HopkinsDebugChannels {
-	kDebugPath     = 1 << 0,
-	kDebugGraphics = 1 << 1
+	kDebugPath = 1,
+	kDebugGraphics,
 };
 
 /**
diff --git a/engines/hpl1/debug.h b/engines/hpl1/debug.h
index 1a3c1996466..08dcadef854 100644
--- a/engines/hpl1/debug.h
+++ b/engines/hpl1/debug.h
@@ -30,16 +30,16 @@
 namespace Hpl1 {
 
 enum DebugChannels {
-	kDebugGraphics = 1 << 0,
-	kDebugResourceLoading = 1 << 1,
-	kDebugFilePath = 1 << 2,
-	kDebugOpenGL = 1 << 3,
-	kDebugRenderer = 1 << 4,
-	kDebugAudio = 1 << 5,
-	kDebugSaves = 1 << 6,
-	kDebugTextures = 1 << 7,
-	kDebugScripts = 1 << 8,
-	kDebugShaders = 1 << 9,
+	kDebugGraphics = 1,
+	kDebugResourceLoading,
+	kDebugFilePath,
+	kDebugOpenGL,
+	kDebugRenderer,
+	kDebugAudio,
+	kDebugSaves,
+	kDebugTextures,
+	kDebugScripts,
+	kDebugShaders,
 };
 
 enum DebugLevels {
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 69e197e69be..e43497e8c7b 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -112,16 +112,16 @@ enum HUGOAction {
 };
 
 enum HugoDebugChannels {
-	kDebugSchedule  = 1 <<  0,
-	kDebugEngine    = 1 <<  1,
-	kDebugDisplay   = 1 <<  2,
-	kDebugMouse     = 1 <<  3,
-	kDebugParser    = 1 <<  4,
-	kDebugFile      = 1 <<  5,
-	kDebugRoute     = 1 <<  6,
-	kDebugInventory = 1 <<  7,
-	kDebugObject    = 1 <<  8,
-	kDebugMusic     = 1 <<  9
+	kDebugSchedule = 1,
+	kDebugEngine,
+	kDebugDisplay,
+	kDebugMouse,
+	kDebugParser,
+	kDebugFile,
+	kDebugRoute,
+	kDebugInventory,
+	kDebugObject,
+	kDebugMusic,
 };
 
 enum HugoRegistered {
diff --git a/engines/immortal/detection.h b/engines/immortal/detection.h
index 7a7d6f4c91a..99baaff7b60 100644
--- a/engines/immortal/detection.h
+++ b/engines/immortal/detection.h
@@ -26,10 +26,6 @@
 
 namespace Immortal {
 
-enum ImmortalDebugChannels {
-	kDebugTest = 1 << 0
-};
-
 extern const PlainGameDescriptor immortalGames[];
 extern const ADGameDescription gameDescriptions[];
 
diff --git a/engines/kingdom/detection.cpp b/engines/kingdom/detection.cpp
index 5b6c02542e6..31069d2bef2 100644
--- a/engines/kingdom/detection.cpp
+++ b/engines/kingdom/detection.cpp
@@ -26,11 +26,6 @@
 
 #include "kingdom/kingdom.h"
 
-static const DebugChannelDef debugFlagList[] = {
-	{Kingdom::kDebugGeneral, "general", "General debug level"},
-	DEBUG_CHANNEL_END
-};
-
 static const PlainGameDescriptor kingdomGames[] = {
 	{"kingdom", "Kingdom: The Far Reaches"},
 	{nullptr, nullptr}
@@ -104,10 +99,6 @@ public:
 	const char *getOriginalCopyright() const override {
 		return "Kingdom: The far Reaches (C) 1995 Virtual Image Productions";
 	}
-
-	const DebugChannelDef *getDebugChannels() const override {
-		return debugFlagList;
-	}
 };
 
 REGISTER_PLUGIN_STATIC(KINGDOM_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, KingdomMetaEngineDetection);
diff --git a/engines/kingdom/kingdom.h b/engines/kingdom/kingdom.h
index 83160cf879d..720d46e8831 100644
--- a/engines/kingdom/kingdom.h
+++ b/engines/kingdom/kingdom.h
@@ -40,10 +40,6 @@
 #include "kingdom/logic.h"
 
 namespace Kingdom {
-	enum KingdomDebugChannels {
-		kDebugGeneral = 1 << 0
-	};
-
 	struct KingArtEntry {
 		uint8 _width;
 		uint8 _height;
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index d8ee41ed63b..ec0a3007ba5 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -93,17 +93,17 @@ struct KeyCodeHash : public Common::UnaryFunction<Common::KeyCode, uint> {
 // TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable
 // in the future we maybe merge some flags  and/or create new ones
 enum DebugLevels {
-	kDebugLevelScriptFuncs = 1 <<  0, ///< debug level for o#_* functions
-	kDebugLevelScript      = 1 <<  1, ///< debug level for "EMCInterpreter" functions
-	kDebugLevelSprites     = 1 <<  2, ///< debug level for "Sprites" functions
-	kDebugLevelScreen      = 1 <<  3, ///< debug level for "Screen" functions
-	kDebugLevelSound       = 1 <<  4, ///< debug level for "Sound" functions
-	kDebugLevelAnimator    = 1 <<  5, ///< debug level for "ScreenAnimator" functions
-	kDebugLevelMain        = 1 <<  6, ///< debug level for common "KyraEngine(_v#)" functions && "TextDisplayer" functions
-	kDebugLevelGUI         = 1 <<  7, ///< debug level for "KyraEngine*" gui functions
-	kDebugLevelSequence    = 1 <<  8, ///< debug level for "SeqPlayer" functions
-	kDebugLevelMovie       = 1 <<  9, ///< debug level for movie specific funtions
-	kDebugLevelTimer       = 1 << 10  ///< debug level for "TimerManager" functions
+	kDebugLevelScriptFuncs = 1, ///< debug level for o#_* functions
+	kDebugLevelScript,			///< debug level for "EMCInterpreter" functions
+	kDebugLevelSprites,			///< debug level for "Sprites" functions
+	kDebugLevelScreen,			///< debug level for "Screen" functions
+	kDebugLevelSound,			///< debug level for "Sound" functions
+	kDebugLevelAnimator,		///< debug level for "ScreenAnimator" functions
+	kDebugLevelMain,		 	///< debug level for common "KyraEngine(_v#)" functions && "TextDisplayer" functions
+	kDebugLevelGUI,				///< debug level for "KyraEngine*" gui functions
+	kDebugLevelSequence,		///< debug level for "SeqPlayer" functions
+	kDebugLevelMovie,			///< debug level for movie specific funtions
+	kDebugLevelTimer,			///< debug level for "TimerManager" functions
 };
 
 enum AudioResourceSet {




More information about the Scummvm-git-logs mailing list