[Scummvm-cvs-logs] CVS: scummvm/scumm/smush imuse_channel.cpp,1.28,1.29 smush_font.cpp,1.21,1.22 smush_mixer.cpp,1.33,1.34 smush_player.cpp,1.129,1.130

Travis Howell kirben at users.sourceforge.net
Sun Aug 22 02:15:07 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11501/scumm/smush

Modified Files:
	imuse_channel.cpp smush_font.cpp smush_mixer.cpp 
	smush_player.cpp 
Log Message:

Switch smush debug to channel


Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/imuse_channel.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- imuse_channel.cpp	9 Jan 2004 23:33:46 -0000	1.28
+++ imuse_channel.cpp	22 Aug 2004 09:14:19 -0000	1.29
@@ -20,6 +20,7 @@
  */
 
 #include "stdafx.h"
+#include "scumm/scumm.h"
 #include "scumm/smush/channel.h"
 #include "scumm/smush/chunk.h"
 #include "scumm/smush/chunk_type.h"
@@ -174,7 +175,7 @@
 			_tbufferSize = remaining_size;
 			_sbufferSize -= remaining_size;
 		} else {
-			debug(2, "impossible ! : %p, %d, %d, %p(%d), %p(%d, %d)",
+			debugC(DEBUG_SMUSH, "impossible ! : %p, %d, %d, %p(%d), %p(%d, %d)",
 				this, _dataSize, _inData, _tbuffer, _tbufferSize, _sbuffer, _sbufferSize, _srbufferSize);
 			byte *old = _tbuffer;
 			int new_size = remaining_size + _tbufferSize;
@@ -240,7 +241,7 @@
 					else reqsize = 3;
 				}
 				if ((size % reqsize) != 0) {
-					debug(2, "Invalid iMUS sound data size : (%d %% %d) != 0, correcting...", size, reqsize);
+					debugC(DEBUG_SMUSH, "Invalid iMUS sound data size : (%d %% %d) != 0, correcting...", size, reqsize);
 					size += 3 - (size % reqsize);
 				}
 			}

Index: smush_font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_font.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- smush_font.cpp	14 Aug 2004 09:10:13 -0000	1.21
+++ smush_font.cpp	22 Aug 2004 09:14:19 -0000	1.22
@@ -158,7 +158,7 @@
 
 
 void SmushFont::drawString(const char *str, byte *buffer, int dst_width, int dst_height, int x, int y, bool center) {
-	debug(9, "SmushFont::drawString(%s, %d, %d, %d)", str, x, y, center);
+	debugC(DEBUG_SMUSH, "SmushFont::drawString(%s, %d, %d, %d)", str, x, y, center);
 
 	while (str) {
 		char line[256];
@@ -177,7 +177,7 @@
 }
 
 void SmushFont::drawStringWrap(const char *str, byte *buffer, int dst_width, int dst_height, int x, int y, int left, int right, bool center) {
-	debug(9, "SmushFont::drawStringWrap(%s, %d, %d, %d, %d, %d)", str, x, y, left, right, center);
+	debugC(DEBUG_SMUSH, "SmushFont::drawStringWrap(%s, %d, %d, %d, %d, %d)", str, x, y, left, right, center);
 
 	const int width = right - left;
 	char *s = strdup(str);

Index: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- smush_mixer.cpp	21 Jun 2004 06:59:24 -0000	1.33
+++ smush_mixer.cpp	22 Aug 2004 09:14:19 -0000	1.34
@@ -49,7 +49,7 @@
 }
 
 SmushChannel *SmushMixer::findChannel(int32 track) {
-	debug(9, "SmushMixer::findChannel(%d)", track);
+	debugC(DEBUG_SMUSH, "SmushMixer::findChannel(%d)", track);
 	for (int32 i = 0; i < NUM_CHANNELS; i++) {
 		if (_channels[i].id == track)
 			return _channels[i].chan;
@@ -61,7 +61,7 @@
 	int32 track = c->getTrackIdentifier();
 	int i;
 
-	debug(9, "SmushMixer::addChannel(%d)", track);
+	debugC(DEBUG_SMUSH, "SmushMixer::addChannel(%d)", track);
 
 	for (i = 0; i < NUM_CHANNELS; i++) {
 		if (_channels[i].id == track)
@@ -86,7 +86,7 @@
 }
 
 bool SmushMixer::handleFrame() {
-	debug(9, "SmushMixer::handleFrame()");
+	debugC(DEBUG_SMUSH, "SmushMixer::handleFrame()");
 	for (int i = 0; i < NUM_CHANNELS; i++) {
 		if (_channels[i].id != -1) {
 			if (_channels[i].chan->isTerminated()) {
@@ -133,7 +133,7 @@
 }
 
 bool SmushMixer::stop() {
-	debug(9, "SmushMixer::stop()");
+	debugC(DEBUG_SMUSH, "SmushMixer::stop()");
 	for (int i = 0; i < NUM_CHANNELS; i++) {
 		if (_channels[i].id != -1) {
 			delete _channels[i].chan;

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- smush_player.cpp	14 Aug 2004 19:42:00 -0000	1.129
+++ smush_player.cpp	22 Aug 2004 09:14:19 -0000	1.130
@@ -156,7 +156,7 @@
 		if (id == _lastId) {
 			return _lastString;
 		}
-		debug(9, "StringResource::get(%d)", id);
+		debugC(DEBUG_SMUSH, "StringResource::get(%d)", id);
 		for (int i = 0; i < _nbStrings; i++) {
 			if (_strings[i].id == id) {
 				_lastId = id;
@@ -172,7 +172,7 @@
 };
 
 static StringResource *getStrings(const char *file, bool is_encoded) {
-	debug(7, "trying to read text ressources from %s", file);
+	debugC(DEBUG_SMUSH, "trying to read text ressources from %s", file);
 	File theFile;
 
 	theFile.open(file);
@@ -305,7 +305,7 @@
 }
 
 void SmushPlayer::handleSoundBuffer(int32 track_id, int32 index, int32 max_frames, int32 flags, int32 vol, int32 pan, Chunk &b, int32 size) {
-	debug(6, "SmushPlayer::handleSoundBuffer(%d, %d)", track_id, index);
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleSoundBuffer(%d, %d)", track_id, index);
 //	if ((flags & 128) == 128) {
 //		return;
 //	}
@@ -331,7 +331,7 @@
 
 void SmushPlayer::handleSoundFrame(Chunk &b) {
 	checkBlock(b, TYPE_PSAD);
-	debug(6, "SmushPlayer::handleSoundFrame()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleSoundFrame()");
 
 	int32 track_id = b.getWord();
 	int32 index = b.getWord();
@@ -340,7 +340,7 @@
 	int32 vol = b.getByte();
 	int32 pan = b.getChar();
 	if (index == 0) {
-		debug(5, "track_id:%d, max_frames:%d, flags:%d, vol:%d, pan:%d", track_id, max_frames, flags, vol, pan);
+		debugC(DEBUG_SMUSH, "track_id:%d, max_frames:%d, flags:%d, vol:%d, pan:%d", track_id, max_frames, flags, vol, pan);
 	}
 	int32 size = b.getSize() - 10;
 	handleSoundBuffer(track_id, index, max_frames, flags, vol, pan, b, size);
@@ -349,7 +349,7 @@
 void SmushPlayer::handleSkip(Chunk &b) {
 	checkBlock(b, TYPE_SKIP, 4);
 	int32 code = b.getDword();
-	debug(6, "SmushPlayer::handleSkip(%d)", code);
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleSkip(%d)", code);
 	if (code >= 0 && code < 37)
 		_skipNext = _skips[code];
 	else
@@ -357,13 +357,13 @@
 }
 
 void SmushPlayer::handleStore(Chunk &b) {
-	debug(6, "SmushPlayer::handleStore()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleStore()");
 	checkBlock(b, TYPE_STOR, 4);
 	_storeFrame = true;
 }
 
 void SmushPlayer::handleFetch(Chunk &b) {
-	debug(6, "SmushPlayer::handleFetch()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleFetch()");
 	checkBlock(b, TYPE_FTCH, 6);
 
 	if (_frameBuffer != NULL) {
@@ -373,7 +373,7 @@
 
 void SmushPlayer::handleIACT(Chunk &b) {
 	checkBlock(b, TYPE_IACT, 8);
-	debug(6, "SmushPlayer::handleImuseAction()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleImuseAction()");
 
 	/* int code = */ b.getWord();
 	int flags = b.getWord();
@@ -404,7 +404,7 @@
 		} else {
 			error("ImuseChannel::handleIACT(): bad track_flags: %d", track_flags);
 		}
-		debug(6, "SmushPlayer::handleIACT(): %d, %d, %d", track, index, track_flags);
+		debugC(DEBUG_SMUSH, "SmushPlayer::handleIACT(): %d, %d, %d", track, index, track_flags);
 
 		SmushChannel *c = _smixer->findChannel(track);
 		if (c == 0) {
@@ -634,7 +634,7 @@
 
 void SmushPlayer::handleDeltaPalette(Chunk &b) {
 	checkBlock(b, TYPE_XPAL);
-	debug(6, "SmushPlayer::handleDeltaPalette()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleDeltaPalette()");
 
 	if (b.getSize() == 0x300 * 3 + 4) {
 
@@ -663,7 +663,7 @@
 
 void SmushPlayer::handleNewPalette(Chunk &b) {
 	checkBlock(b, TYPE_NPAL, 0x300);
-	debug(6, "SmushPlayer::handleNewPalette()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleNewPalette()");
 
 	if (_skipPalette)
 		return;
@@ -824,7 +824,7 @@
 
 void SmushPlayer::handleFrame(Chunk &b) {
 	checkBlock(b, TYPE_FRME);
-	debug(6, "SmushPlayer::handleFrame(%d)", _frame);
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleFrame(%d)", _frame);
 	_skipNext = false;
 
 	uint32 start_time, end_time;
@@ -895,14 +895,14 @@
 	updateScreen();
 	_smixer->handleFrame();
 
-	debug(5, "Smush stats: FRME( %03d ), Limit(%d)", end_time - start_time, _speed / 1000);
+	debugC(DEBUG_SMUSH, "Smush stats: FRME( %03d ), Limit(%d)", end_time - start_time, _speed / 1000);
 
 	_frame++;
 }
 
 void SmushPlayer::handleAnimHeader(Chunk &b) {
 	checkBlock(b, TYPE_AHDR, 0x300 + 6);
-	debug(6, "SmushPlayer::handleAnimHeader()");
+	debugC(DEBUG_SMUSH, "SmushPlayer::handleAnimHeader()");
 
 	_version = b.getWord();
 	_nbframes = b.getWord();
@@ -1070,7 +1070,7 @@
 	_vm->_system->copyRectToScreen(_dst, _width, 0, 0, _width, _height);
 	_updateNeeded = true;
 	end_time = _vm->_system->get_msecs();
-	debug(4, "Smush stats: updateScreen( %03d )", end_time - start_time);
+	debugC(DEBUG_SMUSH, "Smush stats: updateScreen( %03d )", end_time - start_time);
 }
 
 void SmushPlayer::insanity(bool flag) {
@@ -1152,7 +1152,7 @@
 
 			end_time = _vm->_system->get_msecs();
 
-			debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time);
+			debugC(DEBUG_SMUSH, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time);
 
 		}
 		if (_vm->_smushVideoShouldFinish || _vm->_quit || _vm->_saveLoadFlag)





More information about the Scummvm-git-logs mailing list