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

yuv422 yuv422 at users.noreply.github.com
Sun Aug 16 12:27:16 UTC 2020


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

Summary:
ade35be6e6 DRAGONS: Don't log at debug level 0


Commit: ade35be6e63b84e7f1bcf4470d028fe084c3a85d
    https://github.com/scummvm/scummvm/commit/ade35be6e63b84e7f1bcf4470d028fe084c3a85d
Author: Eric Fry (yuv422 at users.noreply.github.com)
Date: 2020-08-16T22:25:03+10:00

Commit Message:
DRAGONS: Don't log at debug level 0

Changed paths:
    engines/dragons/actor.cpp
    engines/dragons/actorresource.cpp
    engines/dragons/background.cpp
    engines/dragons/credits.cpp
    engines/dragons/dragonflg.cpp
    engines/dragons/dragons.cpp
    engines/dragons/font.cpp
    engines/dragons/scene.cpp
    engines/dragons/scriptopcodes.cpp
    engines/dragons/sound.cpp
    engines/dragons/talk.cpp
    engines/dragons/vabsound.cpp


diff --git a/engines/dragons/actor.cpp b/engines/dragons/actor.cpp
index 62100ba24c..8452bd82ce 100644
--- a/engines/dragons/actor.cpp
+++ b/engines/dragons/actor.cpp
@@ -48,7 +48,7 @@ Actor *ActorManager::loadActor(uint32 resourceId, uint32 sequenceId, int16 x, in
 }
 
 Actor *ActorManager::loadActor(uint32 resourceId, uint32 sequenceId, int16 x, int16 y) {
-	debug("Load actor: resourceId: %d, SequenceId: %d, position: (%d,%d)", resourceId, sequenceId, x, y);
+	debug(1, "Load actor: resourceId: %d, SequenceId: %d, position: (%d,%d)", resourceId, sequenceId, x, y);
 	ActorResource *resource = _actorResourceLoader->load(resourceId);
 	//Actor *actor = new Actor(_actorResourceLoader->load(resourceId), x, y, sequenceId);
 	Actor *actor = findFreeActor((int16)resourceId);
@@ -250,7 +250,7 @@ bool Actor::startWalk(int16 destX, int16 destY, uint16 flags) {
 		0, 0, 1, -1, 1, 1, -1, -1
 	};
 
-	debug("startWalk(%d, %d, %d)", _actorID, destX, destY);
+	debug(1, "startWalk(%d, %d, %d)", _actorID, destX, destY);
 	bool wasAlreadyWalking = isFlagSet(ACTOR_FLAG_10);
 
 	clearFlag(ACTOR_FLAG_10);
diff --git a/engines/dragons/actorresource.cpp b/engines/dragons/actorresource.cpp
index f65f404f9c..aac5875d26 100644
--- a/engines/dragons/actorresource.cpp
+++ b/engines/dragons/actorresource.cpp
@@ -41,7 +41,7 @@ ActorResource *ActorResourceLoader::load(uint32 resourceId) {
 	byte *scrData = _bigFileArchive->load(filename, size);
 	Common::SeekableReadStream *readStream = new Common::MemoryReadStream(scrData, size, DisposeAfterUse::NO);
 
-	debug("Loading '%s'", filename);
+	debug(1, "Loading '%s'", filename);
 	actorResource->load(resourceId, scrData, *readStream);
 	return actorResource;
 }
@@ -71,7 +71,7 @@ bool ActorResource::load(uint32 id, byte *dataStart, Common::SeekableReadStream
 
 	_framesCount = (paletteOffset - stream.readUint16LE()) / 0xe;
 
-	debug("Frame Count: %d", _framesCount);
+	debug(3, "Frame Count: %d", _framesCount);
 
 	_frames = new ActorFrame[_framesCount];
 	for (int i = 0; i < _framesCount; i++) {
diff --git a/engines/dragons/background.cpp b/engines/dragons/background.cpp
index 9a13029259..f41eec5b0d 100644
--- a/engines/dragons/background.cpp
+++ b/engines/dragons/background.cpp
@@ -133,7 +133,7 @@ bool Background::load(byte *dataStart, uint32 size) {
 		_tileMap[i].size = stream.readUint32LE();
 		_tileMap[i].map = dataStart + tilemapOffset;
 		_tileMap[i].tileIndexOffset = tileindexOffset;
-		debug("Tilemap (%d, %d) map: %X", _tileMap[i].w, _tileMap[i].h, tilemapOffset);
+		debug(3, "Tilemap (%d, %d) map: %X", _tileMap[i].w, _tileMap[i].h, tilemapOffset);
 
 		tilemapOffset += _tileMap[i].size;
 	}
@@ -155,8 +155,8 @@ bool Background::load(byte *dataStart, uint32 size) {
 	_priorityLayer = new PriorityLayer();
 	_priorityLayer->load(priorityTilemap, _tileDataOffset);
 
-	debug("Tiles: %X", tilesOffset);
-	debug("tileIndexOffset: %d", _tileMap[0].tileIndexOffset);
+	debug(3, "Tiles: %X", tilesOffset);
+	debug(3, "tileIndexOffset: %d", _tileMap[0].tileIndexOffset);
 
 	for (int i = 0; i < 3; i++) {
 		_layerSurface[i] = initGfxLayer(_tileMap[i]);
@@ -311,7 +311,7 @@ Background *BackgroundResourceLoader::load(uint32 sceneId) {
 }
 
 Background *BackgroundResourceLoader::load(const char *filename) {
-	debug("Loading %s", filename);
+	debug(1, "Loading %s", filename);
 	uint32 size;
 	byte *scrData = _bigFileArchive->load(filename, size);
 	Background *bg = new Background();
diff --git a/engines/dragons/credits.cpp b/engines/dragons/credits.cpp
index 54e4c7eefb..361b2170c0 100644
--- a/engines/dragons/credits.cpp
+++ b/engines/dragons/credits.cpp
@@ -81,7 +81,7 @@ void Credits::update() {
 		if (_yOffset % 8 == 0) {
 			if (_curPosition <= _dataLength) {
 				uint32 length = strlen(_curPtr);
-				debug("Credit line: %s", _curPtr);
+				debug(3, "Credit line: %s", _curPtr);
 				convertToWideChar(line, (byte *)_curPtr, 40);
 				_curPtr += length + 1;
 				_curPosition += length + 1;
diff --git a/engines/dragons/dragonflg.cpp b/engines/dragons/dragonflg.cpp
index ddb63e7631..448591ac57 100644
--- a/engines/dragons/dragonflg.cpp
+++ b/engines/dragons/dragonflg.cpp
@@ -92,7 +92,7 @@ void Properties::print(char *prefix) {
 		str[i] = get(i) ? '1' : '0';
 	}
 	str[i] = 0;
-	debug("%s: props = %s", prefix, str);
+	debug(3, "%s: props = %s", prefix, str);
 
 	delete[] str;
 }
diff --git a/engines/dragons/dragons.cpp b/engines/dragons/dragons.cpp
index 523033223c..d6774e9167 100644
--- a/engines/dragons/dragons.cpp
+++ b/engines/dragons/dragons.cpp
@@ -973,7 +973,7 @@ void DragonsEngine::waitForFramesAllowSkip(uint16 numFrames) {
 }
 
 void DragonsEngine::playOrStopSound(uint16 soundId) {
-	debug("play sound 0x%x", soundId);
+	debug(1, "play sound 0x%x", soundId);
 
 	this->_sound->playOrStopSound(soundId);
 }
diff --git a/engines/dragons/font.cpp b/engines/dragons/font.cpp
index 761a0e8f81..a093ce462b 100644
--- a/engines/dragons/font.cpp
+++ b/engines/dragons/font.cpp
@@ -235,7 +235,7 @@ void FontManager::drawTextDialogBox(uint32 x1, uint32 y1, uint32 x2, uint32 y2)
 }
 
 void FontManager::clearTextDialog(uint32 x1, uint32 y1, uint32 x2, uint32 y2) {
-	debug("Clear text (%d,%d) -> (%d,%d)", x1, y1, x2, y2);
+	debug(3, "Clear text (%d,%d) -> (%d,%d)", x1, y1, x2, y2);
 //	assert(x1 > 0);
 //	assert(y1 > 0);
 	_surface->fillRect(Common::Rect((x1-1) * 8, (y1-1) * 8, (x2 + 1) * 8 + 1, (y2 + 1) * 8 + 1), 0);
diff --git a/engines/dragons/scene.cpp b/engines/dragons/scene.cpp
index 18027040e9..ba3a15e05a 100644
--- a/engines/dragons/scene.cpp
+++ b/engines/dragons/scene.cpp
@@ -184,7 +184,7 @@ void Scene::loadSceneData(uint32 sceneId, uint32 cameraPointId) {
 		_vm->getINI(1)->y = _camera.y;
 	}
 
-	debug("Flicker: (%X, %X)", _camera.x, _camera.y);
+	debug(3, "Flicker: (%X, %X)", _camera.x, _camera.y);
 
 	if (_camera.x > 160) {
 		_camera.x -= 160;
@@ -206,7 +206,7 @@ void Scene::loadSceneData(uint32 sceneId, uint32 cameraPointId) {
 		_camera.y = _stage->getHeight() - 200;
 	}
 
-	debug("Camera: (%d, %d)", _camera.x, _camera.y);
+	debug(3, "Camera: (%d, %d)", _camera.x, _camera.y);
 
 	// 0x8002ff80
 	_vm->fadeToBlack();
diff --git a/engines/dragons/scriptopcodes.cpp b/engines/dragons/scriptopcodes.cpp
index 5c5dde41d2..139761260f 100644
--- a/engines/dragons/scriptopcodes.cpp
+++ b/engines/dragons/scriptopcodes.cpp
@@ -90,7 +90,7 @@ ScriptOpcodes::~ScriptOpcodes() {
 void ScriptOpcodes::execOpcode(ScriptOpCall &scriptOpCall) {
 	if (!_opcodes[scriptOpCall._op])
 		error("ScriptOpcodes::execOpcode() Unimplemented opcode %d (0x%X)", scriptOpCall._op, scriptOpCall._op);
-	debug("execScriptOpcode(0x%X) @%lX  %s", scriptOpCall._op, scriptOpCall._code - scriptOpCall._base, _opcodeNames[scriptOpCall._op].c_str());
+	debug(1, "execScriptOpcode(0x%X) @%lX  %s", scriptOpCall._op, scriptOpCall._code - scriptOpCall._base, _opcodeNames[scriptOpCall._op].c_str());
 	(*_opcodes[scriptOpCall._op])(scriptOpCall);
 }
 
@@ -659,7 +659,7 @@ void ScriptOpcodes::opRunSpecialOpCode(ScriptOpCall &scriptOpCall) {
 		error("Invalid Special OpCode %d", specialOpCode);
 	}
 
-	debug("Special opCode %X", specialOpCode);
+	debug(1, "Special opCode %X", specialOpCode);
 	_specialOpCodes->run(specialOpCode);
 }
 
diff --git a/engines/dragons/sound.cpp b/engines/dragons/sound.cpp
index d9c44cc28d..79de0e9d71 100644
--- a/engines/dragons/sound.cpp
+++ b/engines/dragons/sound.cpp
@@ -71,7 +71,7 @@ void CdIntToPos_0(uint32 param_1) { //, byte *param_2)
 						   (uint)(second >> 4) * 10 + ((uint)second & 0xf)) * 0x4b +
 						  (uint)(sector >> 4) * 10 + ((uint)sector & 0xf) + -0x96;
 
-	debug("Seek Audio %2X:%2X:%2X  in: %d out %d", minute, second, sector, param_1, out);
+	debug(3, "Seek Audio %2X:%2X:%2X  in: %d out %d", minute, second, sector, param_1, out);
 
 	return;
 }
@@ -127,7 +127,7 @@ bool SoundManager::getSpeechLocation(uint32 talkId, struct SpeechLocation *locat
 			location->startOffset = startOffset;
 			location->sectorEnd = end;
 			foundId = true;
-			debug("sectors [%d-%d] unk byte = %d", start * 32, end * 32, startOffset);
+			debug(3, "sectors [%d-%d] unk byte = %d", start * 32, end * 32, startOffset);
 			break;
 		}
 	}
@@ -519,7 +519,7 @@ void SoundManager::playMusic(int16 song) {
 
 	memcpy(sceneName, _vm->_dragonRMS->getSceneName(_vm->getCurrentSceneId()), 4);
 	snprintf(filename, 12, "%sz%02d.msq", sceneName, song);
-	debug("Load music file %s", filename);
+	debug(1, "Load music file %s", filename);
 
 	uint32 dataSize;
 	byte *seqData = _bigFileArchive->load(filename, dataSize);
diff --git a/engines/dragons/talk.cpp b/engines/dragons/talk.cpp
index f57ae948ad..37ee6ba296 100644
--- a/engines/dragons/talk.cpp
+++ b/engines/dragons/talk.cpp
@@ -62,7 +62,7 @@ bool Talk::loadText(uint32 textIndex, uint16 *textBuffer, uint16 bufferLength) {
 	sprintf(filename, "drag%04d.txt", fileNo);
 	uint32 size;
 	byte *data = _bigfileArchive->load(filename, size);
-	debug("DIALOG: %s, %s, %d", filename, data, fileOffset);
+	debug(1, "DIALOG: %s, %s, %d", filename, data, fileOffset);
 	printWideText(data + 10 + fileOffset);
 
 	copyTextToBuffer(textBuffer, data + 10 + fileOffset, bufferLength);
@@ -87,7 +87,7 @@ void Talk::printWideText(byte *text) {
 		text += 2;
 	}
 	buf[MIN(i, 1999)] = 0;
-	debug("TEXT: %s", buf);
+	debug(1, "TEXT: %s", buf);
 }
 
 void
@@ -867,7 +867,7 @@ uint Talk::somethingTextAndSpeechAndAnimRelated(Actor *actor, int16 sequenceId1,
 }
 
 void Talk::talkFromIni(uint32 iniId, uint32 textIndex) {
-	debug("Main actor talk: 0x%04x and text 0x%04x", iniId, textIndex);
+	debug(3, "Main actor talk: 0x%04x and text 0x%04x", iniId, textIndex);
 
 	if (textIndex == 0) {
 		return;
@@ -1011,7 +1011,7 @@ uint32 Talk::strlenUTF16(uint16 *text) {
 }
 
 void Talk::drawDialogBox(uint32 x1, uint32 y1, uint32 x2, uint32 y2, uint16 unk) {
-	debug("drawTextDialogBox(%d, %d, %d, %d, %d)", x1, y1, x2, y2, unk);
+	debug(3, "drawTextDialogBox(%d, %d, %d, %d, %d)", x1, y1, x2, y2, unk);
 	_vm->_fontManager->drawTextDialogBox(x1, y1, x2, y2);
 }
 
diff --git a/engines/dragons/vabsound.cpp b/engines/dragons/vabsound.cpp
index 5924229fbb..0412d5d824 100644
--- a/engines/dragons/vabsound.cpp
+++ b/engines/dragons/vabsound.cpp
@@ -110,7 +110,7 @@ Audio::AudioStream *VabSound::getAudioStream(uint16 program, uint16 key) {
 			vagID = _toneAttrs[i].vag - 1;
 		}
 	}
-	debug("Playing program %d, numTones: %d, key %d vagID %d, vagOffset: %x, size: %x", program, _programAttrs[program].tones, key, vagID, _vagOffsets[vagID], _vagSizes[vagID]);
+	debug(3, "Playing program %d, numTones: %d, key %d vagID %d, vagOffset: %x, size: %x", program, _programAttrs[program].tones, key, vagID, _vagOffsets[vagID], _vagSizes[vagID]);
 	Audio::AudioStream *str = Audio::makeXAStream(
 			new Common::MemoryReadStream(&_vbData[_vagOffsets[vagID]], _vagSizes[vagID], DisposeAfterUse::NO),
 			11025,




More information about the Scummvm-git-logs mailing list